|
|
@@ -20,7 +20,8 @@ import other from '/@/utils/other';
|
|
|
import { Local, Session } from '/@/utils/storage';
|
|
|
import mittBus from '/@/utils/mitt';
|
|
|
import setIntroduction from '/@/utils/setIconfont';
|
|
|
-import {$get} from "/@/utils/request";
|
|
|
+import {$get,$body} from "/@/utils/request";
|
|
|
+import u from "/@/utils/u";
|
|
|
|
|
|
// 引入组件
|
|
|
const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue'));
|
|
|
@@ -91,6 +92,8 @@ onMounted(() => {
|
|
|
window.addEventListener('unload', ()=>{
|
|
|
console.log("unload")
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
if (Session.get('token')) {
|
|
|
refreshEnv();
|
|
|
}
|
|
|
@@ -98,11 +101,13 @@ onMounted(() => {
|
|
|
});
|
|
|
|
|
|
const refreshEnv = ()=>{
|
|
|
-/* $get("/dict/dictList", {}).then((res: any) => {
|
|
|
- Session.set("dicts", res);
|
|
|
+ $body("/dataDict/list", {pageSize:1024}).then((res: any) => {
|
|
|
+ let {list} = res;
|
|
|
+ var dictGroup = u.groupByKey(list,"code");
|
|
|
+ Session.set("dicts", dictGroup);
|
|
|
})
|
|
|
|
|
|
- $get("/user/profile").then((obj: any) => {
|
|
|
+ $get("/admin-user/profile").then((obj: any) => {
|
|
|
if (obj) {
|
|
|
let {user, permissionList} = obj;
|
|
|
let userInfo = {...user, permList: permissionList}
|
|
|
@@ -111,7 +116,7 @@ const refreshEnv = ()=>{
|
|
|
|
|
|
}).catch(err => {
|
|
|
Session.clear();
|
|
|
- });*/
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
// 页面销毁时,关闭监听布局配置/i18n监听
|