|
@@ -39,7 +39,7 @@
|
|
|
return {
|
|
|
$getimg:this.$getimg,
|
|
|
backUrl:'',
|
|
|
- havePhone:false,
|
|
|
+ havePhone:true,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -84,25 +84,29 @@
|
|
|
};
|
|
|
serf.login(res.data.retBody);
|
|
|
serf.upInfo();
|
|
|
- uni.getStorage({
|
|
|
- key: 'userInfo',
|
|
|
- success: function (res) {
|
|
|
- console.log('userInfo',res.data);
|
|
|
- if(res.data.phone){
|
|
|
- serf.havePhone = true;
|
|
|
- serf.loginSuccess();
|
|
|
- }else{
|
|
|
- return;
|
|
|
+ setTimeout(getInfo,1000);
|
|
|
+ function getInfo(){
|
|
|
+ uni.getStorage({
|
|
|
+ key: 'userInfo',
|
|
|
+ success: function (res) {
|
|
|
+ console.log('userInfo',res.data);
|
|
|
+ if(res.data.phone){
|
|
|
+ serf.havePhone = true;
|
|
|
+ serf.loginSuccess();
|
|
|
+ }else{
|
|
|
+ serf.havePhone = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail:function(err){
|
|
|
+ serf.$api.msg('本次获取手机信息失败,将在下次检查!',2000);
|
|
|
+ setTimeout(()=>{
|
|
|
+ serf.loginSuccess();
|
|
|
+ },2000);
|
|
|
+ console.log('getStorage err',err);
|
|
|
}
|
|
|
- },
|
|
|
- fail:function(err){
|
|
|
- serf.$api.msg('本次获取手机信息失败,将在下次检查!',2000);
|
|
|
- setTimeout(()=>{
|
|
|
- serf.loginSuccess();
|
|
|
- },2000);
|
|
|
- console.log('getStorage err',err);
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
|
|
|
})
|