修复:优化访客模式

This commit is contained in:
2025-12-18 14:03:01 +08:00
parent 9e04533bdc
commit 56772970e2
2 changed files with 7 additions and 2 deletions

View File

@@ -459,7 +459,12 @@ const requestAll = async () => {
onMounted(() => {
// 重置分类索引
currentIndex.value = 0
if(!uni.getStorageSync('state') && !uni.getStorageSync('token')) {
uni.navigateTo({
url: '/pages/login/login'
});
}
if(uni.getStorageSync('state')) uni.removeStorageSync('state')
// 请求所有数据
requestAll()
})