Bläddra i källkod

回退登录多域名校验

liyanbo 1 månad sedan
förälder
incheckning
76520cb204
1 ändrade filer med 4 tillägg och 14 borttagningar
  1. 4 14
      src/router/index.js

+ 4 - 14
src/router/index.js

@@ -5,17 +5,7 @@ import {refreshAllDictData} from "@/utils/dictUtils.js";
 
 
 const routes = [
-  {
-    path: '/',
-    redirect: () => {
-      // 判断域名,返回对应路由
-      if (window.location.hostname === 'blockly.learn-ai.com.cn') {
-        return '/blockly-login';
-      } else {
-        return '/login';
-      }
-    }
-  },
+  { path: '/', component: () => import('../views/Login.vue') },
   { path: '/login', component: () => import('../views/Login.vue') },
   // 免登录
   { path: '/quick-login', component: () => import('../views/QuickLogin.vue') },
@@ -89,13 +79,13 @@ const routes = [
     path: '/ai-video',
     component: () => import('../views/AIPage/AIImageToVideo.vue')
   },
-    // 大运河
+  // 大运河
   {
     path: '/ai-grandcanal',
     component: () => import('../views/AIPage/GrandCanal.vue')
   },
   // 植物专家
-    {
+  {
     path: '/ai-plantexperts',
     component: () => import('../views/AIPage/PlantExperts.vue')
   },
@@ -230,7 +220,7 @@ const loginToHomeMap = {
   '/promotion-login': homeRoutes.home,
   '/blockly-login': blocklyRoutes.home,
   '/ai-login': aiCourseRoutes.home,
-   '/register-login': homeRoutes.home
+  '/register-login': homeRoutes.home
 }
 
 const router = createRouter({