From c8e23745b75911d2017d34b93d9f4713db7e75a0 Mon Sep 17 00:00:00 2001 From: yanfeiyong <2060201549@qq.com> Date: Tue, 27 May 2025 14:11:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E7=8E=AF=E5=A2=83=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 19 +-- src/views/{tongjifenxi => Home}/index.vue | 117 +++++++++--------- src/views/compilation/handbook/index.vue | 11 +- src/views/compilation/handbook/yulan.vue | 60 --------- .../{onecailiao => monolithic}/index.vue | 2 +- src/views/evalute/configtable/index.vue | 1 + src/views/index.vue | 2 +- src/views/manage-info/index.vue | 73 ++++++++--- src/views/manage/index.vue | 1 + src/views/models/badlist/index.vue | 1 + src/views/orientedtwo/content/index.vue | 1 + src/views/orientedtwo/subdivide/index.vue | 1 + 12 files changed, 128 insertions(+), 161 deletions(-) rename src/views/{tongjifenxi => Home}/index.vue (65%) delete mode 100644 src/views/compilation/handbook/yulan.vue rename src/views/compilation/{onecailiao => monolithic}/index.vue (99%) diff --git a/src/permission.js b/src/permission.js index 5b2db54..a14b5a5 100644 --- a/src/permission.js +++ b/src/permission.js @@ -32,9 +32,7 @@ router.beforeEach((to, from, next) => { const signature = params.get("signature"); const timespan = params.get("timespan"); - // ============================= - // 🔑 新增:处理 clienttoken 登录企业单点登录逻辑 - // ============================= + // clienttoken 企业单点登录 if (window.location.href.includes("clienttoken=")) { const reg = /[?&]clienttoken=([^]+)/; const match = window.location.href.match(reg); @@ -58,9 +56,6 @@ router.beforeEach((to, from, next) => { .dispatch("SingleSignOnGetInfo", { clientToken: clienttoken }) .then(() => { isRelogin.show = false; - console.log("✅ 单点登录成功"); - console.log("当前 token:", getToken()); - console.log("当前角色:", store.getters.roles); // 清除 URL 中的 clienttoken 并刷新页面 window.history.replaceState({}, "", modifiedUrl); @@ -75,8 +70,8 @@ router.beforeEach((to, from, next) => { // console.error("单点登录失败:", err); store.dispatch("LogOut").then(() => { Message.error("单点登录失败,请重试"); - // window.location.href = - // "https://qytt.sipac.gov.cn/ecobrainportal/index.html"; + window.location.href = + "https://qytt.sipac.gov.cn/ecobrainportal/index.html"; }); }); @@ -85,9 +80,7 @@ router.beforeEach((to, from, next) => { } } - // ============================= - // 📦 原有政务参数处理逻辑 - // ============================= + // 政务单点登录 if (from.path === to.path && store.getters.token) { next(); return; @@ -155,9 +148,7 @@ router.beforeEach((to, from, next) => { return; } - // ============================= - // 🔐 原始本地登录逻辑 - // ============================= + //调用原始登录 if (getToken()) { to.meta.title && store.dispatch("settings/setTitle", to.meta.title); /* has token*/ diff --git a/src/views/tongjifenxi/index.vue b/src/views/Home/index.vue similarity index 65% rename from src/views/tongjifenxi/index.vue rename to src/views/Home/index.vue index 91eee4f..2602779 100644 --- a/src/views/tongjifenxi/index.vue +++ b/src/views/Home/index.vue @@ -20,19 +20,32 @@