update
This commit is contained in:
11
src/pinia/SystemStore/index.js
Normal file
11
src/pinia/SystemStore/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import {defineStore} from "pinia";
|
||||
import {reactive} from "vue";
|
||||
|
||||
export const useSystemStore = defineStore('SystemStore', () => {
|
||||
const accountManagementPo = reactive({
|
||||
pid: null,
|
||||
});
|
||||
return {
|
||||
accountManagementPo,
|
||||
}
|
||||
});
|
||||
@@ -20,11 +20,17 @@ export const useUserStore = defineStore('UserStore', () => {
|
||||
Object.assign(userInfo, data);
|
||||
}
|
||||
|
||||
const setToken = (value) => {
|
||||
isLogin.value = true;
|
||||
token.value = value;
|
||||
}
|
||||
|
||||
return {
|
||||
isLogin,
|
||||
userInfo,
|
||||
token,
|
||||
logout,
|
||||
setToken,
|
||||
getUserInfo,
|
||||
}
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user