Parcourir la source

Update:更新环境隔离配置

XieXing il y a 3 mois
Parent
commit
abe06aa146
1 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 5 3
      shudao-vue-frontend/src/views/NotFound.vue

+ 5 - 3
shudao-vue-frontend/src/views/NotFound.vue

@@ -13,15 +13,17 @@
 </template>
 
 <script>
+import { isLocal, isTest, isProd } from '@/utils/apiConfig'
+
 export default {
   name: 'NotFound',
   mounted() {
     const reason = this.$route.query.reason
     console.log('🚫 进入404页面,原因:', reason || '未知')
 
-    // 开发模式下不跳转
-    if (import.meta.env.DEV) {
-      console.log('🔧 开发模式:不跳转到登录门户')
+    // 本地和测试环境不跳转到统一认证门户
+    if (isLocal || isTest) {
+      console.log('🔧 本地/测试环境:不跳转到登录门户')
       return
     }