删除小程序后再进入如果已经受过权了的,就不再授权了,重新请求一下这个页面

master
chen 2022-04-02 18:06:48 +08:00
parent 5bec64ceec
commit d93d24b89f
1 changed files with 7 additions and 1 deletions

View File

@ -84,7 +84,6 @@
uni.setStorageSync('urlparams',currentPage.$page.fullPath); uni.setStorageSync('urlparams',currentPage.$page.fullPath);
if(uni.getStorageSync('token')==''){ if(uni.getStorageSync('token')==''){
this.loginEv(currentPage.options); this.loginEv(currentPage.options);
this.showAuth = true;
} }
let pagesArr = getCurrentPages(); let pagesArr = getCurrentPages();
// console.log(pagesArr.length,''); // console.log(pagesArr.length,'');
@ -115,6 +114,13 @@
uni.setStorageSync('expire',res.data.data.expire); // uni.setStorageSync('expire',res.data.data.expire); //
uni.setStorageSync('phone_active',res.data.data.phone_active); // uni.setStorageSync('phone_active',res.data.data.phone_active); //
uni.setStorageSync('is_active',res.data.data.is_active)// uni.setStorageSync('is_active',res.data.data.is_active)//
if(res.data.data.phone_active==0 || res.data.data.is_active==0) {
this.showAuth = true;
} else {
uni.reLaunch({ //
url:uni.getStorageSync('urlparams')
})
}
} }
}, },
}) })