diff --git a/txw-mhzc-web/src/core/request.js b/txw-mhzc-web/src/core/request.js
index a1a7c76..8f06c7f 100644
--- a/txw-mhzc-web/src/core/request.js
+++ b/txw-mhzc-web/src/core/request.js
@@ -133,6 +133,11 @@ request.interceptors.response.use(
if (err.reqConfig?.loading || err.config?.loading || SingleLoading.load !== null) {
SingleLoading.endLoading(true);
}
+ // HTTP 状态码 401 未认证,跳转登录页
+ if (err.response?.status === 401) {
+ window.location.href = `/view/mhzc/login`;
+ return Promise.reject(err);
+ }
let { message } = err;
if (message === 'Network Error') {
message = '后端接口连接异常';
diff --git a/txw-mhzc-web/src/pages/index/api/login.js b/txw-mhzc-web/src/pages/index/api/login.js
index 4b84c57..0c4779c 100644
--- a/txw-mhzc-web/src/pages/index/api/login.js
+++ b/txw-mhzc-web/src/pages/index/api/login.js
@@ -210,5 +210,5 @@ export function authorize(responseType, clientId, redirectUri, state, autoApprov
}
export function hasLogin() {
- return window.sessionStorage.getItem('yhxx');
+ return window.sessionStorage.getItem('sfdl');
}
diff --git a/txw-mhzc-web/src/pages/index/components/nav/index2.vue b/txw-mhzc-web/src/pages/index/components/nav/index2.vue
index 37f6106..1edc034 100644
--- a/txw-mhzc-web/src/pages/index/components/nav/index2.vue
+++ b/txw-mhzc-web/src/pages/index/components/nav/index2.vue
@@ -122,7 +122,7 @@ export default {
{
name: 'home',
title: '首页',
- icon: require('@/pages/index/assets/nav-home.png'),
+ // icon: require('@/pages/index/assets/nav-home.png'),
},
{
name: 'tzzx',
diff --git a/txw-mhzc-web/src/pages/index/views/glxtSy/glxtSy.vue b/txw-mhzc-web/src/pages/index/views/glxtSy/glxtSy.vue
index 1a8f193..aaa514e 100644
--- a/txw-mhzc-web/src/pages/index/views/glxtSy/glxtSy.vue
+++ b/txw-mhzc-web/src/pages/index/views/glxtSy/glxtSy.vue
@@ -52,6 +52,7 @@ import Nav from '@/pages/index/components/nav/index.vue';
import Footer from '@/pages/index/components/footer/index.vue';
import { menuList } from './config';
import api from '../../api/yhzx/index';
+import gxzxApi from '@/pages/index/api/gxzx/index.js';
import qyrz from '../qyrz/index.vue';
import qyrz1 from '../qy-rz/index.vue';
import tfwgj from '../gxfb/tfwgj.vue';
@@ -153,7 +154,9 @@ export default {
title: '质证结果管理',
icon: 'user',
name: 'zljggl',
- iframeUrl: "https://ctn-web-pre.lingshu.net/proof-result-mgt?type=carbon-certify",
+ iframeUrl: "https://ctn-web-pre.lingshu.net/proof-result-mgt",
+ path: '/proof-result-mgt',
+ query: 'type=carbon-certify',
},
{
id: 'cunzhengjilu',
@@ -161,18 +164,21 @@ export default {
icon: 'user',
name: 'cunzhengjilu',
iframeUrl: "https://ctn-web-pre.lingshu.net/cert-record-mgt",
+ path: '/cert-record-mgt',
}, {
id: 'tgjlgl',
title: '托管记录管理',
icon: 'user',
name: 'tgjlgl',
iframeUrl: "https://ctn-web-pre.lingshu.net/hosting-record-mgt",
+ path: '/hosting-record-mgt',
}, {
id: 'chazhengjilu',
title: '查证记录管理',
icon: 'user',
name: 'chazhengjilu',
iframeUrl: "https://ctn-web-pre.lingshu.net/query-record-mgt",
+ path: '/query-record-mgt',
},
]
},
@@ -193,16 +199,15 @@ export default {
],
ejcdList: [],
iFrameSrc: '',
- zljgglurl: 'https://ctn-web-pre.lingshu.net/proof-result-mgt?type=carbon-certify',
iframeUrl: "",
activeMenuId: "gzt",
+ kxurl: '',
};
},
created() {
-
-
+ this.gettfwzxurl();
},
activated() {
console.log("glxtSy.vue,activated==>", this.$route)
@@ -214,6 +219,29 @@ export default {
}
},
methods: {
+ updateIframeUrl(menus) {
+ if (!menus || !this.kxurl) return;
+ menus.forEach(menu => {
+ if (menu.path) {
+ menu.iframeUrl = `${this.kxurl}${menu.path}`;
+ if (menu.query) {
+ menu.iframeUrl += `?${menu.query}`;
+ }
+ }
+ if (menu.children && menu.children.length > 0) {
+ this.updateIframeUrl(menu.children);
+ }
+ });
+ },
+ async gettfwzxurl() {
+ try {
+ const { data } = await gxzxApi.tfwzxurl();
+ this.kxurl = data.kxtfwzx;
+ this.updateIframeUrl(this.cdList);
+ } catch (error) {
+ console.error('获取碳服务中枢URL失败', error);
+ }
+ },
syncMenuWithRoute() {
const path = this.$route.path;
const match = path.match(/\/yhzx\/(\w+)/);
@@ -303,7 +331,6 @@ export default {
const params = 'ZZJGGL_URL';
const { data } = await api.dm2mc(params);
console.log('initView', data);
- this.zljgglurl = data;
} catch (err) {
} finally {
@@ -340,13 +367,8 @@ export default {
console.log('change', active);
// sessionStorage.removeItem('lclsearchList');
// sessionStorage.removeItem('jblsearchList');
- if (active == 'zljggl') {
- this.iskxt = false;
- this.iFrameSrc = this.zljgglurl;
- } else {
- this.iskxt = true;
- this.activeCompo = active;
- }
+ this.iskxt = true;
+ this.activeCompo = active;
},
xgmm() {
this.activeCompo = 'xgmm';
diff --git a/txw-mhzc-web/src/pages/index/views/home2/index.vue b/txw-mhzc-web/src/pages/index/views/home2/index.vue
index cff6220..df4a224 100644
--- a/txw-mhzc-web/src/pages/index/views/home2/index.vue
+++ b/txw-mhzc-web/src/pages/index/views/home2/index.vue
@@ -16,7 +16,8 @@
+
+ 让中国的每一份碳都拥有独一无二的可信数字身份