Uniapp自定义启动页
manifest.json中设置
"splashscreen" : {
"autoclose" : false,
},
app.vue
onLaunch: function() {
if (uni.getStorageSync('userInfo')) {
uni.reLaunch({
url: '/pages/index/index',
success() {
plus.navigator.closeSplashscreen()
}
})
} else {
uni.reLaunch({
url: '/pages/login/index',
success() {
plus.navigator.closeSplashscreen()
}
})
}
},