更新:访客模式可以查看图书首页
This commit is contained in:
@@ -457,17 +457,11 @@ const requestAll = async () => {
|
||||
* 页面挂载
|
||||
*/
|
||||
onMounted(() => {
|
||||
if(!userStore.token) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
}
|
||||
// 重置分类索引
|
||||
currentIndex.value = 0
|
||||
|
||||
// 请求所有数据
|
||||
requestAll()
|
||||
console.log('进来了2');
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -485,7 +479,7 @@ onShow(() => {
|
||||
|
||||
// 刷新数据
|
||||
// requestAll()
|
||||
if(userStore.token){
|
||||
if(uni.getStorageSync('token')){
|
||||
getLearnCourse()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user