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 17871f1..494b07a 100644 --- a/f/web-kboss/src/views/homePage/components/topBox/index.vue +++ b/f/web-kboss/src/views/homePage/components/topBox/index.vue @@ -264,7 +264,23 @@ export default Vue.extend({ } } }, + mounted() { + this.$nextTick(() => { + this.isNcmatchDomain; // 触发一次计算 + }); +}, methods: { + + // 首页跳转方法 - 根据域名判断跳转到不同的首页 + goHome() { + + + if (this.isNcmatchDomain) { + this.$router.push('/ncmatchHome/index'); + } else { + this.$router.push('/homePage/index'); + } + }, // 处理AI助手点击 handleAIClick() { this.$message.info({ @@ -665,16 +681,6 @@ export default Vue.extend({ } }, - // 首页跳转方法 - 根据域名判断跳转到不同的首页 - goHome() { - console.log('当前域名:', window.location.href); - - if (this.isNcmatchDomain) { - this.$router.push('/ncmatchHome/index'); - } else { - this.$router.push('/homePage/index'); - } - } }, })