diff --git a/src/views/sevenLargeScreen/indexL_syhy.vue b/src/views/sevenLargeScreen/indexL_syhy.vue index 4e2d100..27a58d0 100644 --- a/src/views/sevenLargeScreen/indexL_syhy.vue +++ b/src/views/sevenLargeScreen/indexL_syhy.vue @@ -95,7 +95,7 @@ import ScaleBox from "vue3-scale-box"; import { ref, reactive, onMounted, onBeforeUnmount } from "vue"; import { useRouter } from "vue-router"; import { GlobalStore } from "@/stores"; -import { jumpLargeUserInfoApi } from "@/api/modules/login"; +import { jumpLargeUserInfoApi, jumpLargeByUserIdApi } from "@/api/modules/login"; import { COMPANY } from "@/config/config"; const store = GlobalStore(); let nowTime = ref("2023-04-16 09:22:12" as any); @@ -550,6 +550,22 @@ onMounted(async () => { // }); // console.log("当前项目的看板数据::", moduleListData.value); } + if (window.location.href.indexOf("userId") != -1) { + console.log("免登录跳转进来了吗----", window.location.href.indexOf("userId")); + const newUserId = window.location.href.split("userId=")[1].split("&")[0]; + const projectSn = window.location.href.split("sn=")[1].split("&")[0]; + const data: any = await jumpLargeByUserIdApi({ userId: newUserId }); + console.log("跳转请求的数据----", data.result); + if (data.result.sn) { + const accountTypeList = [2, 3, 4, 7]; + const sn = accountTypeList.includes(data.result.accountType) ? projectSn : data.result.sn; + store.setSN(sn); + } + store.setToken(data.result.token); + store.setAccount(data.result.account); + store.setAccountType(data.result.accountType); + store.setProjectDateAuth(data.menuAuthority); + } // await getAllModelMenu(); navigateTo(menuList.value[0], 1); activeTab.value = menuList.value[0].modulePath;