"app-plus" : {
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : true,
"autoclose" : false,
"delay" : 0
}
}
onLaunch: ()=> {
// #ifdef APP-PLUS
let userinfo = uni.getStorageSync('userinfo');
//判断是否存在登录信息
if(!userinfo.role){
//不存在则跳转登录页
uni.reLaunch({
url:"/pages/login/login",
success:()=>{
//跳转完页面后再关闭启动页
plus.navigator.closeSplashscreen();
}
})
}else{
//存在则关闭启动页进入首页
plus.navigator.closeSplashscreen();
}
// #endif
},