1.appvue中开启加载校验是否需要重新隐式登录
onLaunch(()=>{
let uni_id_token_expired=uni.getStorageSync("uni_id_token_expired")//获取缓存中这个字段
if(uni_id_token_expired -Date.now()>1000*60*60*5){
console.log('正常范围');
}else{
uni.login({
success:login=>{
uniIdco.loginByWeixin({
code:login.code
}).then(res=>{
userStore.loginSuccess({...res,showToast:false});
})
}
})
}
2.给index.vue开始那个新用户手,再加上一个滑动事件
<uni-popup ref="usePopup" type="center" @maskClick="closeUsePopup" @touchmove="closeUsePopup">