From 4039d4242819c22ec0092a95e005f6e19b128555 Mon Sep 17 00:00:00 2001 From: ping <1017253325@qq.com> Date: Mon, 30 Mar 2026 14:18:03 +0800 Subject: [PATCH] update --- .../homePage/components/topBox/index.vue | 15 ++---- f/web-kboss/vue.config.js | 50 +++++++++---------- 2 files changed, 28 insertions(+), 37 deletions(-) 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 ae2b498..7598bd2 100644 --- a/f/web-kboss/src/views/homePage/components/topBox/index.vue +++ b/f/web-kboss/src/views/homePage/components/topBox/index.vue @@ -668,19 +668,10 @@ export default Vue.extend({ } }, - // 首页跳转方法 - 根据域名判断跳转到不同的首页 + // 首页跳转方法 - 使用 getHomePath 的结果进行跳转(更可靠) goHome() { - console.log('=== goHome 方法开始 ==='); - console.log('当前完整URL:', window.location.href); - console.log('当前hostname:', window.location.hostname); - console.log('isNcmatchDomain判断结果:', this.isNcmatchDomain); - console.log('准备跳转的路径:', this.isNcmatchDomain ? '/ncmatchHome/index' : '/homePage/index'); - - if (this.isNcmatchDomain) { - this.$router.push('/ncmatchHome/index'); - } else { - this.$router.push('/homePage/index'); - } + const path = this.homePath || getHomePath(); + this.$router.push(path); } }, }) diff --git a/f/web-kboss/vue.config.js b/f/web-kboss/vue.config.js index 51caab2..4dd53bd 100644 --- a/f/web-kboss/vue.config.js +++ b/f/web-kboss/vue.config.js @@ -76,31 +76,31 @@ module.exports = { } }, // 生产环境去除console和debugger - optimization: { - minimizer: [ - { - apply: (compiler) => { - // 只在生产环境生效 - if (process.env.NODE_ENV === 'production') { - const TerserPlugin = require('terser-webpack-plugin') - new TerserPlugin({ - terserOptions: { - compress: { - drop_console: true, // 移除console - drop_debugger: true, // 移除debugger - pure_funcs: ['console.log', 'console.info', 'console.warn', 'console.error'] // 移除特定的console方法 - }, - mangle: true, // 代码混淆 - output: { - comments: false // 移除注释 - } - } - }).apply(compiler) - } - } - } - ] - } + // optimization: { + // minimizer: [ + // { + // apply: (compiler) => { + // // 只在生产环境生效 + // if (process.env.NODE_ENV === 'production') { + // const TerserPlugin = require('terser-webpack-plugin') + // new TerserPlugin({ + // terserOptions: { + // compress: { + // drop_console: true, // 移除console + // drop_debugger: true, // 移除debugger + // pure_funcs: ['console.log', 'console.info', 'console.warn', 'console.error'] // 移除特定的console方法 + // }, + // mangle: true, // 代码混淆 + // output: { + // comments: false // 移除注释 + // } + // } + // }).apply(compiler) + // } + // } + // } + // ] + // } }, chainWebpack(config) { // it can improve the speed of the first screen, it is recommended to turn on preload