马宇豪
2023-05-22 d0bec404f2c22ca04e8592f1a2ba0b39eab0be2f
src/stores/userInfo.ts
@@ -15,15 +15,18 @@
            roles: [],
            authBtnList: [],
            uid: '',
            depId: null,
            projectId: '',
            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;
            this.userInfos.depId = value.depId
            // const userName = Cookies.get('userName');
            // // 模拟数据
            // let defaultRoles: Array<string> = [];