diff --git a/f/web-kboss/src/layout/components/Navbar.vue b/f/web-kboss/src/layout/components/Navbar.vue index e8999f1..9b4459f 100644 --- a/f/web-kboss/src/layout/components/Navbar.vue +++ b/f/web-kboss/src/layout/components/Navbar.vue @@ -730,6 +730,11 @@ export default { this.editUserInfoDialog = false; }, async logout() { + let redirectPath = '' + if (this.$route && this.$route.fullPath && !this.$route.fullPath.includes('/login')) { + redirectPath = this.$route.fullPath + sessionStorage.setItem('loginRedirectPath', redirectPath) + } store.commit('tagsView/resetBreadcrumbState'); store.commit('permission/RESET_ROUTES'); sessionStorage.removeItem("auths"); @@ -750,7 +755,10 @@ export default { localStorage.removeItem("org_type") sessionStorage.removeItem('userId') this.$store.commit('setLoginState', false) - await this.$router.push(getHomePath()); + await this.$router.push({ + path: '/login', + query: redirectPath ? { redirect: redirectPath } : {} + }); }, async logout1() { logoutAPI().then((res) => { diff --git a/f/web-kboss/src/permission.js b/f/web-kboss/src/permission.js index c22e94e..eb51718 100644 --- a/f/web-kboss/src/permission.js +++ b/f/web-kboss/src/permission.js @@ -148,6 +148,9 @@ router.beforeEach(async (to, from, next) => { } // next(`/login?redirect=${to.path}`); console.log("路由执行了2@@@") + if (to.fullPath && !to.fullPath.includes('/login')) { + sessionStorage.setItem('loginRedirectPath', to.fullPath) + } next(homePath) // next(`/beforeLogin`); // console.log("111行被打印了") @@ -177,6 +180,9 @@ router.beforeEach(async (to, from, next) => { // console.log(error); Message.error(error || "Has Error"); // next(`/login?redirect=${to.path}`); + if (to.fullPath && !to.fullPath.includes('/login')) { + sessionStorage.setItem('loginRedirectPath', to.fullPath) + } next(homePath) // console.log("137行被打印了") NProgress.done(); diff --git a/f/web-kboss/src/utils/request.js b/f/web-kboss/src/utils/request.js index 192c3cf..6c46ead 100644 --- a/f/web-kboss/src/utils/request.js +++ b/f/web-kboss/src/utils/request.js @@ -44,6 +44,14 @@ if (window.location.href.includes("dev.opencomputing.cn")) { console.log("环境的前缀时" + testUrl); // 应该输出 'https://www.kaiyuancloud.cn/dev' let isRedirectingToLogin = false +const saveLoginRedirectPath = () => { + const currentRoute = router.currentRoute + const fullPath = currentRoute && currentRoute.fullPath + if (fullPath && !fullPath.includes('/login')) { + sessionStorage.setItem('loginRedirectPath', fullPath) + } +} + const getErrorStatus = (error) => { if (error && error.response && error.response.status) { return Number(error.response.status) @@ -155,6 +163,7 @@ service.interceptors.response.use( if (code == 401) { if (!isRedirectingToLogin) { isRedirectingToLogin = true + saveLoginRedirectPath() showErrorMessage('登录已过期,请重新登录') router.push({path: '/login'}).finally(() => { isRedirectingToLogin = false diff --git a/f/web-kboss/src/views/homePage/agentStore/contractCase.vue b/f/web-kboss/src/views/homePage/agentStore/contractCase.vue index e221f1b..1f386c9 100644 --- a/f/web-kboss/src/views/homePage/agentStore/contractCase.vue +++ b/f/web-kboss/src/views/homePage/agentStore/contractCase.vue @@ -36,9 +36,9 @@

应用场景

覆盖企业合同全生命周期审核链路

-
-
-
+
+
+
@@ -69,8 +69,8 @@
-
- +
+ @@ -80,8 +80,8 @@

自动解析购销、服务、租赁、合作类通用业务合同,逐条对标企业风控红线快速筛查风险点,输出初审意见,减轻法务基础审核工作量,快速完成业务前置审批。

-
-
+
+
@@ -103,8 +103,8 @@
-
- +
+ @@ -114,8 +114,8 @@

针对投融资、知识产权、工程、保密竞业等高风险专项合同,联动完整法条与司法判例开展多层级风险推演,梳理权责漏洞、违约缺陷、管辖争议等深层隐患,输出完整风控评估文档。

-
-
+
+
@@ -150,8 +150,8 @@
-
- +
+ @@ -224,8 +224,8 @@

项目亮点

全流程智能风控,四大核心审查能力落地

-
-
+
+
{{ index + 1 }}

{{ item.title }}

@@ -569,15 +569,17 @@ export default { font-size: 20px; } -.scenario-grid, +.case-scenario-grid, .solution-grid, -.highlight-grid { +.case-highlight-grid { display: grid; gap: 32px; } -.scenario-grid { - grid-template-columns: repeat(3, minmax(0, 1fr)); +.contract-case-page .case-scenario-grid { + display: grid !important; + grid-template-columns: repeat(3, minmax(0, 1fr)) !important; + gap: 32px !important; } .solution-grid { @@ -585,49 +587,52 @@ export default { gap: 48px; } -.highlight-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); +.contract-case-page .case-highlight-grid { + display: grid !important; + grid-template-columns: repeat(2, minmax(0, 1fr)) !important; + gap: 32px !important; } -.feature-card, +.contract-case-page .case-feature-card, .solution-item, -.highlight-card { +.contract-case-page .case-highlight-card { background: #fff; border-radius: 18px; box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08); transition: all 0.3s ease; } -.feature-card:hover, +.contract-case-page .case-feature-card:hover, .solution-item:hover, -.highlight-card:hover { +.contract-case-page .case-highlight-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12); } -.feature-card { - overflow: hidden; +.contract-case-page .case-feature-card { + display: block !important; + overflow: hidden !important; } -.feature-card__visual { +.case-feature-card__visual { display: flex; align-items: center; justify-content: center; height: 190px; } -.feature-card__visual svg { +.case-feature-card__visual svg { width: 84px; height: 84px; } -.feature-card__visual--illustration { +.case-feature-card__visual--illustration { position: relative; height: 192px; overflow: hidden; } -.feature-card__visual--illustration > svg { +.case-feature-card__visual--illustration > svg { position: absolute; inset: 0; width: 100%; @@ -691,7 +696,7 @@ export default { } } -.feature-card__head { +.case-feature-card__head { display: flex; align-items: center; gap: 12px; @@ -699,28 +704,28 @@ export default { margin-bottom: 16px; } -.feature-card h3, +.case-feature-card h3, .solution-item h4, -.highlight-card h3 { +.case-highlight-card h3 { margin: 0; color: #111827; font-size: 20px; font-weight: 700; } -.feature-card p, +.case-feature-card p, .solution-item p, -.highlight-card p { +.case-highlight-card p { margin: 0; color: #4b5563; line-height: 1.7; } -.feature-card > p { +.case-feature-card > p { padding: 0 32px 32px; } -.icon-gradient, +.case-icon-gradient, .solution-icon, .column-title span, .highlight-num { @@ -733,12 +738,12 @@ export default { border-radius: 12px; } -.icon-gradient { +.case-icon-gradient { width: 40px; height: 40px; } -.icon-gradient svg { +.case-icon-gradient svg { width: 20px; height: 20px; } @@ -804,8 +809,8 @@ export default { margin-bottom: 8px; } -.highlight-card { - display: flex; +.contract-case-page .case-highlight-card { + display: flex !important; gap: 18px; padding: 32px; } @@ -817,7 +822,7 @@ export default { font-weight: 800; } -.highlight-card h3 { +.case-highlight-card h3 { margin-bottom: 12px; } @@ -860,10 +865,10 @@ export default { } @media (max-width: 1024px) { - .scenario-grid, + .case-scenario-grid, .solution-grid, - .highlight-grid { - grid-template-columns: 1fr; + .case-highlight-grid { + grid-template-columns: 1fr !important; } } @@ -896,10 +901,10 @@ export default { font-size: 30px; } - .feature-card__head, - .feature-card > p, + .case-feature-card__head, + .case-feature-card > p, .solution-item, - .highlight-card { + .case-highlight-card { padding: 24px; } } diff --git a/f/web-kboss/src/views/homePage/agentStore/index.vue b/f/web-kboss/src/views/homePage/agentStore/index.vue index 6078194..bab4862 100644 --- a/f/web-kboss/src/views/homePage/agentStore/index.vue +++ b/f/web-kboss/src/views/homePage/agentStore/index.vue @@ -101,7 +101,7 @@ export default { name: 'AgentStore', data() { return { - activeMainTab: 'industry', + activeMainTab: 'general', activeSubTab: 'all', generalSubTabs: [ { id: 'all', label: '全部' }, diff --git a/f/web-kboss/src/views/homePage/components/topBox/index.vue b/f/web-kboss/src/views/homePage/components/topBox/index.vue index 208aefb..d39a91a 100644 --- a/f/web-kboss/src/views/homePage/components/topBox/index.vue +++ b/f/web-kboss/src/views/homePage/components/topBox/index.vue @@ -66,8 +66,8 @@ - -
+ +
@@ -787,6 +787,11 @@ export default Vue.extend({ // 退出登录 async logout() { + let redirectPath = '' + if (this.$route && this.$route.fullPath && !this.$route.fullPath.includes('/login')) { + redirectPath = this.$route.fullPath + sessionStorage.setItem('loginRedirectPath', redirectPath) + } this.$store.commit('setLoginState', false) store.commit('tagsView/resetBreadcrumbState'); store.commit('permission/RESET_ROUTES'); @@ -806,9 +811,10 @@ export default Vue.extend({ localStorage.removeItem("userId"); localStorage.removeItem("org_type") localStorage.removeItem('userId') - if (!window.location.href.includes('homePage/index')) { - await this.$router.push(getHomePath()); - } + await this.$router.push({ + path: '/login', + query: redirectPath ? { redirect: redirectPath } : {} + }); }, // 修改密码 diff --git a/f/web-kboss/src/views/login/indexNew.vue b/f/web-kboss/src/views/login/indexNew.vue index 80657fd..f75f700 100644 --- a/f/web-kboss/src/views/login/indexNew.vue +++ b/f/web-kboss/src/views/login/indexNew.vue @@ -462,8 +462,10 @@ export default { console.log("生成的路径是", accessRoutes); router.addRoutes(accessRoutes); - // 根据角色跳转到不同页面 - if (org_type === "2" || org_type === "3") { + // 登录过期或退出登录后,优先回到离开前的页面。 + if (this.redirectToSavedPage()) { + // 已跳转到原页面 + } else if (org_type === "2" || org_type === "3") { this.$router.push("/product/productHome"); } else if (response.roles.includes("运营")) { this.$router.push("/operation/supplierManagement"); @@ -740,6 +742,35 @@ export default { this.capsTooltip = key && key.length === 1 && key >= "A" && key <= "Z"; }, + getLoginRedirectPath() { + const queryRedirect = this.$route.query && this.$route.query.redirect + const rawPath = Array.isArray(queryRedirect) + ? queryRedirect[0] + : queryRedirect || sessionStorage.getItem('loginRedirectPath') + if (!rawPath) return '' + + let redirectPath = rawPath + try { + redirectPath = decodeURIComponent(rawPath) + } catch (error) { + redirectPath = rawPath + } + + if (!redirectPath || !redirectPath.startsWith('/') || redirectPath.includes('/login')) { + sessionStorage.removeItem('loginRedirectPath') + return '' + } + return redirectPath + }, + + redirectToSavedPage() { + const redirectPath = this.getLoginRedirectPath() + if (!redirectPath) return false + sessionStorage.removeItem('loginRedirectPath') + this.$router.push(redirectPath) + return true + }, + // 处理登录 handleLogin(formName) { this.$refs[formName].validate((valid) => { @@ -776,8 +807,10 @@ export default { sessionStorage.setItem("org_type", res.org_type); sessionStorage.setItem("username", res['user'].username); - // 根据角色跳转到不同页面 - if (res.admin === 1) { + // 登录过期或退出登录后,优先回到离开前的页面。 + if (this.redirectToSavedPage()) { + // 已跳转到原页面 + } else if (res.admin === 1) { this.$router.push({ path: "/" }); } else if ( sessionStorage.getItem("org_type") == "2" ||