|
@@ -39,6 +39,7 @@ export const useAppStore = defineStore('main', {
|
|
|
barMenuName: '',
|
|
|
isSource: getStoreValue('isSource') || '', //来源
|
|
|
isLayout: getStoreValue('isLayout') || '', //是否显示layout
|
|
|
+ isLogin: getStoreValue('isLogin') || false, //是否刚登录
|
|
|
}),
|
|
|
getters: {
|
|
|
//系统信息
|
|
@@ -70,6 +71,7 @@ export const useAppStore = defineStore('main', {
|
|
|
getDragModalSortTop: state => state.dragModalSortTop,
|
|
|
getIsSource: state => state.isSource,
|
|
|
getIsLayout: state => state.isLayout,
|
|
|
+ getIsLogin: state => state.isLogin,
|
|
|
},
|
|
|
actions: {
|
|
|
//系统信息
|
|
@@ -174,6 +176,10 @@ export const useAppStore = defineStore('main', {
|
|
|
this.isLayout = value
|
|
|
setStoreValue('isLayout', value)
|
|
|
},
|
|
|
+ setIsLogin(value) {
|
|
|
+ this.isLogin = value
|
|
|
+ setStoreValue('isLogin', value)
|
|
|
+ },
|
|
|
//清除缓存和token
|
|
|
clearStoreData() {
|
|
|
//清除状态
|
|
@@ -195,6 +201,7 @@ export const useAppStore = defineStore('main', {
|
|
|
this.dragModalSortTop = []
|
|
|
this.isSource = ''
|
|
|
this.isLayout = ''
|
|
|
+ this.isLogin = null
|
|
|
//清除缓存
|
|
|
clearStoreAll()
|
|
|
removeToken()
|