From d013d17725ccb8b82239cb95f29e50c2e4aa9f3c Mon Sep 17 00:00:00 2001 From: X_Rian <904416525@qq.com> Date: Thu, 24 Oct 2024 17:48:37 +0800 Subject: [PATCH] =?UTF-8?q?flx=EF=BC=9A=E6=8F=90=E4=BA=A4=E9=84=B1?= =?UTF-8?q?=E6=B9=96=E7=BE=8E=E6=B9=BEuserId=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sevenLargeScreen/indexL_syhy.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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;