提交 03f0fbb5 编写于 作者: tao.wu's avatar tao.wu

未登录bug

上级 376280f2
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
isLogin: false, isLogin: false,
loaded: false, loaded: false,
shareObj: {}, shareObj: {},
userToken: ''
} }
}, },
created() { created() {
...@@ -108,6 +108,12 @@ export default { ...@@ -108,6 +108,12 @@ export default {
const _seft = this; const _seft = this;
this.$rocNative.appInit(); this.$rocNative.appInit();
window.__refresh = function() { window.__refresh = function() {
this.$rocNative
.getUserInfo()
.then(params => {
this.userToken = params.userToken;
this.userMobile = params.userMobile;
});
// alert('准备自动触发预约') // alert('准备自动触发预约')
// _seft.setRemind(true); // _seft.setRemind(true);
} }
...@@ -125,6 +131,7 @@ export default { ...@@ -125,6 +131,7 @@ export default {
// 通过获取token,初始化数据 // 通过获取token,初始化数据
this.$rocNative.getToken().then(res => { this.$rocNative.getToken().then(res => {
const { userToken } = res; const { userToken } = res;
this.userToken = userToken;
getRemindStatus(userToken).then(res => { getRemindStatus(userToken).then(res => {
if(res.code=='000000'){ if(res.code=='000000'){
this.isLogin = true; this.isLogin = true;
...@@ -227,9 +234,9 @@ export default { ...@@ -227,9 +234,9 @@ export default {
if(!this.loaded){ if(!this.loaded){
return; return;
} }
this.$rocNative.getToken().then(data => { // this.$rocNative.getToken().then(data => {
const { userToken } = data; // const { userToken } = data;
checkToken(userToken).then(res=>{ checkToken(this.userToken).then(res=>{
if(res.code=='200006' || res.code == '200000'){ if(res.code=='200006' || res.code == '200000'){
this.$rocNative.gotoLogin(); this.$rocNative.gotoLogin();
}else{ }else{
...@@ -290,7 +297,7 @@ export default { ...@@ -290,7 +297,7 @@ export default {
} }
}) })
}); // });
} }
}, },
checkVersion(callback){ checkVersion(callback){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册