src/stores/userInfo.ts
@@ -1,7 +1,6 @@ import { defineStore } from 'pinia'; import Cookies from 'js-cookie'; import { UserInfosStates } from './interface'; import { Session } from '/@/utils/storage'; /** * 用户信息 @@ -20,9 +19,10 @@ dataList: [] } }), persist:true, actions: { async setUserInfos(value: any) { this.userInfos.userName = value.username; this.userInfos.userName = value.realName; this.userInfos.uid = value.uid; this.userInfos.roles = value.role; // const userName = Cookies.get('userName');