fix: BUG修改
This commit is contained in:
parent
8174db0433
commit
a7a4ceddf4
@ -13,6 +13,7 @@ import { GlobalStore } from "@/stores";
|
||||
import { TabsStore } from "@/stores/modules/tabs";
|
||||
import { KeepAliveStore } from "@/stores/modules/keepAlive";
|
||||
import { initDynamicRouter } from "@/routers/modules/dynamicRouter";
|
||||
import { getHomePage } from "@/api/modules/goverment";
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const globalStore = GlobalStore();
|
||||
@ -39,22 +40,26 @@ const tokenIdentify = async () => {
|
||||
// await initDynamicRouter();
|
||||
// router.push(arr[result.accountType - 1]);
|
||||
// 3.清空 tabs、keepAlive 保留的数据
|
||||
// 获取module
|
||||
const res1 = await getHomePage();
|
||||
let data = {};
|
||||
data = res1.result || {};
|
||||
tabsStore.closeMultipleTab();
|
||||
keepAlive.setKeepAliveName();
|
||||
await sendMessage({ isSuccess: true }, 2);
|
||||
globalStore.setPath("/goverment/huizhou/largeScreen/largeScreenOne/index");
|
||||
await initDynamicRouter({ moduleId: "1670639811581595650" });
|
||||
globalStore.moduleId = "1670639811581595650";
|
||||
globalStore.setPath(data["惠州项目"][0].modulePath);
|
||||
await initDynamicRouter({ moduleId: data["惠州项目"][0].moduleId });
|
||||
globalStore.moduleId = data["惠州项目"][0].moduleId;
|
||||
// if (responseData.accountType === 2) {
|
||||
// await sendMessage({ isSuccess: true }, 2);
|
||||
// globalStore.setPath("/goverment/huizhou/largeScreen/largeScreenOne/index");
|
||||
// await initDynamicRouter({ moduleId: "1670639811581595650" });
|
||||
// globalStore.moduleId = "1670639811581595650";
|
||||
// } else if (responseData.accountType == 4) {
|
||||
// } else if (responseData.accountType == 3) {
|
||||
// await sendMessage({ isSuccess: true }, 2);
|
||||
// globalStore.setPath("/hz-project/largeScreen/largeScreenOne/index");
|
||||
// await initDynamicRouter({ moduleId: "1670603312504918018" });
|
||||
// globalStore.moduleId = "1670603312504918018";
|
||||
// globalStore.setPath("/goverment/huizhou/projectList/index");
|
||||
// await initDynamicRouter({ moduleId: "1681837103227502594" });
|
||||
// globalStore.moduleId = "1681837103227502594";
|
||||
// }
|
||||
} else {
|
||||
// ElMessage.error("登录信息异常,请刷新或重新登录!");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user