修复权限缓存问题

This commit is contained in:
Zy
2026-07-20 16:43:09 +08:00
parent a5a883a652
commit 3a00c3dfe0
10 changed files with 343 additions and 306 deletions

View File

@@ -44,7 +44,9 @@
import { ref } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { logout, getSettingInfo } from '../../api/api.js'
import { clearPermList } from '../../utils/permissions.js'
import { usePermStore } from '@/stores/usePermStore'
const permStore = usePermStore()
// 响应式数据
const phoneNumber = ref('') // 绑定手机号
@@ -118,7 +120,7 @@ const confirmLogout = () => {
logout()
.then(res => {
if (res.code === 200) {
clearPermList()
permStore.clearPerm()
uni.clearStorageSync()
uni.showToast({ title: '退出登录成功', icon: 'success' })
uni.redirectTo({ url: '/pageSubPack/loginSub/pwd-login' })