From e6fbc95d631925aa28a01dfd5f278da4c5e0aa32 Mon Sep 17 00:00:00 2001 From: v_hwweng Date: Tue, 13 Aug 2024 20:22:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=A8=E5=B1=80=E9=85=8D=E7=BD=AEtit?= =?UTF-8?q?le/footer/logo/favicon/=E4=BA=A7=E5=93=81=E5=90=8D=E7=A7=B0=20#?= =?UTF-8?q?10678=20#=20Reviewed,=20transaction=20id:=2015187?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/devops-nav/src/router/index.ts | 3 +-- src/frontend/devops-nav/src/utils/iframeUtil.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontend/devops-nav/src/router/index.ts b/src/frontend/devops-nav/src/router/index.ts index c35d3b5fda5..00ffa36ea75 100755 --- a/src/frontend/devops-nav/src/router/index.ts +++ b/src/frontend/devops-nav/src/router/index.ts @@ -4,7 +4,6 @@ import { getServiceAliasByPath, ifShowNotice, importScript, importStyle, updateR import cookie from 'js-cookie' import compilePath from '../utils/pathExp' -import store from '../store/index' // 首页 - index const Index = () => import('../views/Index.vue') @@ -19,7 +18,6 @@ const Maintaining = () => import('../views/503.vue') const UnDeploy = () => import('../views/UnDeploy.vue') -const { platformInfo } = (store.state as any).platFormConfig Vue.use(Router) let mod: Route[] = [] @@ -98,6 +96,7 @@ const createRouter = (store: any, dynamicLoadModule: any, i18n: any) => { router.beforeEach((to, from, next) => { const serviceAlias = getServiceAliasByPath(to.path) const currentPage = window.serviceObject.serviceMap[serviceAlias] + const { platformInfo } = (store.state as any).platFormConfig if (to.name !== from.name && platformInfo) { let platformTitle = `${platformInfo.i18n.name || platformInfo.name} | ${platformInfo.i18n.brandName || platformInfo.brandName}` if (currentPage) { diff --git a/src/frontend/devops-nav/src/utils/iframeUtil.ts b/src/frontend/devops-nav/src/utils/iframeUtil.ts index 6d1075d85cb..60d720a0b91 100755 --- a/src/frontend/devops-nav/src/utils/iframeUtil.ts +++ b/src/frontend/devops-nav/src/utils/iframeUtil.ts @@ -1,7 +1,6 @@ import { showLoginPopup } from '@/utils/util' import eventBus from './eventBus' import store from '@/store' -const { platformInfo } = (store.state as any).platFormConfig interface UrlParam { url: string refresh: boolean @@ -28,6 +27,7 @@ function iframeUtil (router: any) { }, '*') } utilMap.updateTabTitle = function (title: string): void { + const { platformInfo } = (store.state as any).platFormConfig if (title) { document.title = title } else if (!title && platformInfo) {