31 lines
965 B
JavaScript
31 lines
965 B
JavaScript
/**
|
|
* 启用缓存加载速度会变快,但是数据安全性和实时性降低
|
|
*/
|
|
import { useStore } from '@cmp/cmp-core/store'
|
|
// 是否启用权限本地缓存
|
|
export const enablePermissionStorage = false
|
|
// 本地缓存的菜单key值
|
|
export const menuKey = 'cmcMenuData'
|
|
// 是否启用用户本地缓存
|
|
export const enableUserStorage = false
|
|
// 本地缓存的用户key值
|
|
export const userKey = 'cmcUserData'
|
|
// 本地存储的cookie kye值
|
|
export const tokenKey = 'CMC_TOKEN'
|
|
// 最大缓存组件实例数
|
|
export const cacheViewMax = 15
|
|
export const baseUrl = '/scr-web'
|
|
// 默认跳转地址
|
|
export const homePath = '/dashboard'
|
|
export const isConsole = false
|
|
export const loginKey = 'cmcLoginData'
|
|
export function resetLicense() {
|
|
const store = useStore()
|
|
store.dispatch('permission/ResetRoutes', false)
|
|
location.href = '/license'
|
|
}
|
|
export function resetLogin() {
|
|
const store = useStore()
|
|
store.dispatch('permission/ResetRoutes', true)
|
|
}
|