From 7a3bba9960237ef9b9714ff3fa7a4f9499601443 Mon Sep 17 00:00:00 2001 From: WXL (wul) <wl_5969728@163.com> Date: 星期二, 09 九月 2025 14:25:19 +0800 Subject: [PATCH] 测试完成 --- src/views/loginSSO.vue | 32 +++++++++++++++++++------------- 1 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/views/loginSSO.vue b/src/views/loginSSO.vue index cfbe7f5..6cd082c 100644 --- a/src/views/loginSSO.vue +++ b/src/views/loginSSO.vue @@ -63,14 +63,18 @@ try { console.log(11); // 浠嶶RL鍙傛暟涓幏鍙杢oken鍜屾満鏋勪俊鎭� - let { token, orgid, orgname, ZuHuID, deptCode, redirect } = - this.$route.query; + let { token, orgid, orgname, ZuHuID, deptCode } = this.$route.query; // token = // "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6Ijc5MWVkODNlLWE2MWYtNDI2MS05ZDZlLTNhOTVjYTU2YjZhMiJ9.q6jrRj8fwtb3FOqqwaxIFDr824hf85DW8heCj4qWYgRE55Pn0vkmcujFsYMrz9qqo047Gl7lv3rnok8pk7SKYQ"; // 楠岃瘉蹇呰鍙傛暟 // orgid = "30001002"; if (!token) { throw new Error("缂哄皯璁よ瘉浠ょ墝(token)"); } + console.log(token); + console.log(orgid); + console.log(orgname); + // console.log(redirect,'redirect'); + this.mateOrgid(orgid); setToken(token); this.$store.commit("SET_TOKEN", token); @@ -89,19 +93,21 @@ // 纭畾閲嶅畾鍚戣矾寰� let redirectPath = "/index"; - if (redirect) { - redirectPath = decodeURIComponent(redirect); - } else { - // 鏍规嵁鐢ㄦ埛瑙掕壊鍐冲畾榛樿璺宠浆椤甸潰 - const roles = this.$store.state.user.roles; - const username = this.$store.state.user.name; + // if (redirect) { + // console.log(redirect,'888'); - if (roles.includes("admin") || username === "admin") { - redirectPath = "/index"; - } else { - redirectPath = "/followvisit/discharge"; - } + // redirectPath = decodeURIComponent(redirect); + // } else { + // 鏍规嵁鐢ㄦ埛瑙掕壊鍐冲畾榛樿璺宠浆椤甸潰 + const roles = this.$store.state.user.roles; + const username = this.$store.state.user.name; + + if (roles.includes("admin") || username === "admin") { + redirectPath = "/index"; + } else { + redirectPath = "/followvisit/discharge"; } + // } // 璺宠浆鍒扮洰鏍囬〉闈� this.$router.replace({ path: redirectPath }); -- Gitblit v1.9.3