|
|
@@ -22,7 +22,10 @@ import mittBus from '/@/utils/mitt';
|
|
|
import setIntroduction from '/@/utils/setIconfont';
|
|
|
import {$get,$body} from "/@/utils/request";
|
|
|
import u from "/@/utils/u";
|
|
|
+import {initFrontEndControlRoutes} from "/@/router/frontEnd";
|
|
|
+import {useUserInfo} from "/@/stores/userInfo";
|
|
|
|
|
|
+const storesUserInfo = useUserInfo();
|
|
|
// 引入组件
|
|
|
const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue'));
|
|
|
const Setings = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/setings.vue'));
|
|
|
@@ -100,18 +103,21 @@ onMounted(() => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-const refreshEnv = ()=>{
|
|
|
+const refreshEnv = async ()=>{
|
|
|
$body("/dataDict/list", {pageSize:1024}).then((res: any) => {
|
|
|
let {list} = res;
|
|
|
var dictGroup = u.groupByKey(list,"code");
|
|
|
Session.set("dicts", dictGroup);
|
|
|
})
|
|
|
|
|
|
- $get("/admin-user/profile").then((obj: any) => {
|
|
|
+ $get("/admin-user/profile").then(async (obj: any) => {
|
|
|
if (obj) {
|
|
|
- let {user, permissionList} = obj;
|
|
|
- let userInfo = {...user, permList: permissionList}
|
|
|
- Session.set('userInfo',userInfo)
|
|
|
+ let user = obj[0];
|
|
|
+ let userInfo = {...user, permList: user.permissions}
|
|
|
+ Session.set('userInfo', userInfo)
|
|
|
+
|
|
|
+ await storesUserInfo.setUserInfos(userInfo);
|
|
|
+ await initFrontEndControlRoutes();
|
|
|
}
|
|
|
|
|
|
}).catch(err => {
|