|
@@ -41,17 +41,33 @@
|
|
|
|
|
|
let locationLocaturl = window.location.search;
|
|
let locationLocaturl = window.location.search;
|
|
let openId = getUrlParams(locationLocaturl,"openId");
|
|
let openId = getUrlParams(locationLocaturl,"openId");
|
|
- if(!this.vuex_hasLogin&&!!openId){
|
|
|
|
- this.$u.api.getuseinfo(openId).then(res => {
|
|
|
|
|
|
+ let token = getUrlParams(locationLocaturl,"token");
|
|
|
|
+ if(!!token){
|
|
|
|
+ this.$u.vuex('vuex_token', token);
|
|
|
|
+ };
|
|
|
|
+ if(!this.vuex_hasLogin&&!!token){
|
|
|
|
+ this.$u.api.getuseinfo().then(res => {
|
|
console.log('getuseinfo',res.retBody);
|
|
console.log('getuseinfo',res.retBody);
|
|
this.$u.vuex('vuex_user', res.retBody);
|
|
this.$u.vuex('vuex_user', res.retBody);
|
|
this.$u.vuex('vuex_hasLogin', true);
|
|
this.$u.vuex('vuex_hasLogin', true);
|
|
- this.$u.vuex('vuex_token', res.retBody.token);
|
|
|
|
if(!res.retBody.phone){
|
|
if(!res.retBody.phone){
|
|
this.openPage('/pages/template/bindPhoneNumber/bindPhoneNumber')
|
|
this.openPage('/pages/template/bindPhoneNumber/bindPhoneNumber')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // if(!this.vuex_hasLogin&&!!openId){
|
|
|
|
+ // this.$u.api.getuseinfo(openId).then(res => {
|
|
|
|
+ // console.log('getuseinfo',res.retBody);
|
|
|
|
+ // this.$u.vuex('vuex_user', res.retBody);
|
|
|
|
+ // this.$u.vuex('vuex_hasLogin', true);
|
|
|
|
+ // this.$u.vuex('vuex_token', res.retBody.token);
|
|
|
|
+ // if(!res.retBody.phone){
|
|
|
|
+ // this.openPage('/pages/template/bindPhoneNumber/bindPhoneNumber')
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
|