mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix-cookies-get-set
This commit is contained in:
parent
67393f50a7
commit
21aa8b9cc2
@ -25,18 +25,21 @@ export default {
|
||||
console.log("created")
|
||||
|
||||
// console.log(" $cookies.get('gdd_session_id') ", $cookies.get("gdd_session_id") )
|
||||
console.log("app.vue $cookies.isKey('gdd_session_id') ", $cookies.isKey("gdd_session_id") )
|
||||
const isSession = $cookies.isKey("gdd_session_id")
|
||||
// const getSession = $cookies.get("gdd_session_id")
|
||||
// console.log("this.isSession ", this.isSession )
|
||||
console.log("xx", ( isSession == true))
|
||||
// console.log("app.vue $cookies.isKey('gdd_session_id') ", $cookies.isKey("gdd_session_id") )
|
||||
// const isSession = $cookies.isKey("gdd_session_id")
|
||||
// const getSession = $cookies.get("gdd_session_id")
|
||||
// console.log("this.isSession ", this.isSession )
|
||||
// console.log("xx", ( isSession == true))
|
||||
if ( $cookies.isKey("gdd_session_id") == true) {
|
||||
//this.$store.state.email = this.$cookies.get('gdd_u')
|
||||
console.log("cookies to store.state")
|
||||
this.$store.commit('session_id', $cookies.get("gdd_session_id"))
|
||||
this.$store.commit('email', $cookies.get("gdd_u"))
|
||||
console.log("app to overview")
|
||||
this.$router.push("overview")
|
||||
}else {
|
||||
console.log("router to LOGIN")
|
||||
//this.$router.push("/login")
|
||||
console.log("app.vue to LOout")
|
||||
this.$store.dispatch('logout')
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
||||
@ -154,8 +154,8 @@ export const store = new Vuex.Store({
|
||||
console.log('action: dispatch', dispatch)
|
||||
console.log('action: state.session_id', state.session_id)
|
||||
console.log(" action: $cookies.get('gdd_session_id') ", $cookies.get("gdd_session_id") )
|
||||
commit('session_id', $cookies.get("gdd_session_id"))
|
||||
commit('email', $cookies.get("gdd_u"))
|
||||
// commit('session_id', $cookies.get("gdd_session_id"))
|
||||
// commit('email', $cookies.get("gdd_u"))
|
||||
const result = await communityAPI.balance($cookies.get("gdd_session_id"))
|
||||
console.log("accountBalance result", result)
|
||||
if(result.success) {
|
||||
|
||||
@ -4,7 +4,9 @@
|
||||
class="navbar-top navbar-expand"
|
||||
:class="{'navbar-dark': type === 'default'}"
|
||||
>
|
||||
<a href="#" aria-current="page" class="h4 mb-0 text-white text-uppercase d-none d-lg-inline-block active router-link-active"> {{$route.name}} </a>
|
||||
<a href="#" aria-current="page" class="h4 mb-0 text-uppercase d-none d-lg-inline-block active router-link-active">
|
||||
{{$route.name}}
|
||||
</a>
|
||||
<!-- Navbar links -->
|
||||
<b-navbar-nav class="align-items-center ml-md-auto">
|
||||
<!-- This item dont have <b-nav-item> because item have data-action/data-target on tag <a>, wich we cant add -->
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
<div class="text-center mb-7">
|
||||
<b-row class="justify-content-center">
|
||||
<b-col xl="5" lg="6" md="8" class="px-5">
|
||||
<h1 class="text-white">Gradido Wallet</h1>
|
||||
<p class="text-lead text-white">{{ $t('site.login.community')}}</p>
|
||||
<h1>Gradido Wallet</h1>
|
||||
<p class="text-lead">{{ $t('site.login.community')}}</p>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</div>
|
||||
@ -82,18 +82,6 @@
|
||||
onSubmit() {
|
||||
this.$store.dispatch('login', {"email": this.model.email, "password": this.model.password})
|
||||
}
|
||||
},
|
||||
created () {
|
||||
console.log("login.vue created")
|
||||
|
||||
if ( $cookies.isKey("gdd_session_id")) {
|
||||
//this.$store.state.email = this.$cookies.get('gdd_u')
|
||||
console.log("login to overview")
|
||||
this.$router.push("/overview")
|
||||
}else {
|
||||
console.log("login to LOGIN")
|
||||
//this.$router.push("/login")
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
<div class="header-body text-center mb-7">
|
||||
<b-row class="justify-content-center">
|
||||
<b-col xl="5" lg="6" md="8" class="px-5">
|
||||
<h1 class="text-white">{{ $t('site.password.title')}}</h1>
|
||||
<p class="text-lead text-white">{{ $t('site.password.subtitle')}}</p>
|
||||
<h1 >{{ $t('site.password.title')}}</h1>
|
||||
<p class="text-lead">{{ $t('site.password.subtitle')}}</p>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</div>
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
<div class="header-body text-center mb-7">
|
||||
<b-row class="justify-content-center">
|
||||
<b-col xl="5" lg="6" md="8" class="px-5">
|
||||
<h1 class="text-white">{{ $t('site.signup.title')}}</h1>
|
||||
<p class="text-lead text-white">{{ $t('site.signup.subtitle')}}</p>
|
||||
<h1 >{{ $t('site.signup.title')}}</h1>
|
||||
<p class="text-lead">{{ $t('site.signup.subtitle')}}</p>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user