处理打包报错
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { store } from '../index'
|
||||
import { store } from '../indexs'
|
||||
import { setCssVar, humpToUnderline } from '@/utils'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { store } from '@/store'
|
||||
import { store } from '@/stores/indexs'
|
||||
|
||||
interface lockInfo {
|
||||
isLock?: boolean
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { store } from '@/store'
|
||||
import { store } from '@/stores/indexs'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import remainingRouter from '@/router/modules/remaining'
|
||||
import { flatMultiLevelRoutes, generateRoute } from '@/utils/routerHelper'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
|
||||
@@ -52,7 +51,6 @@ export const usePermissionStore = defineStore('permission', {
|
||||
}
|
||||
])
|
||||
// 渲染菜单的所有路由
|
||||
this.routers = cloneDeep(remainingRouter).concat(routerMap)
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { store } from '@/store'
|
||||
import { store } from '@/stores/indexs'
|
||||
import { defineStore } from 'pinia'
|
||||
import { getAccessToken, removeToken } from '@/utils/auth'
|
||||
import { CACHE_KEY, useCache, deleteUserCache } from '@/hooks/web/useCache'
|
||||
import { getInfo, loginOut } from '@/api/login'
|
||||
// import { getInfo, loginOut } from '@/api/login'
|
||||
|
||||
const { wsCache } = useCache()
|
||||
|
||||
@@ -55,7 +55,7 @@ export const useUserStore = defineStore('admin-user', {
|
||||
}
|
||||
let userInfo = wsCache.get(CACHE_KEY.USER)
|
||||
if (!userInfo) {
|
||||
userInfo = await getInfo()
|
||||
// userInfo = await getInfo()
|
||||
}
|
||||
this.permissions = userInfo.permissions
|
||||
this.roles = userInfo.roles
|
||||
@@ -79,7 +79,7 @@ export const useUserStore = defineStore('admin-user', {
|
||||
wsCache.set(CACHE_KEY.USER, userInfo)
|
||||
},
|
||||
async loginOut() {
|
||||
await loginOut()
|
||||
// await loginOut()
|
||||
removeToken()
|
||||
deleteUserCache() // 删除用户缓存
|
||||
this.resetState()
|
||||
|
||||
Reference in New Issue
Block a user