瀏覽代碼

fix:url以及跳转修改

廖彦舟 1 年之前
父節點
當前提交
ea4815f526
共有 3 個文件被更改,包括 16 次插入16 次删除
  1. 2 2
      src/apis/axios.config.ts
  2. 13 13
      src/router/index.ts
  3. 1 1
      src/views/HomeworkPage/component/HomeworkDetail.vue

+ 2 - 2
src/apis/axios.config.ts

@@ -1,9 +1,9 @@
 import axios from "axios";
 
 // const BASEURL = 'http://47.111.23.171:8081'
-const BASEURL = 'http://localhost:8082'
+// const BASEURL = 'http://localhost:8082'
 // const BASEURL = 'http://8.130.126.86:8080'
-// const BASEURL = 'https://air.seec.seecoder.cn/'
+const BASEURL = 'https://air.seec.seecoder.cn/'
 
 const axiosInstance = axios.create({
     baseURL: BASEURL,

+ 13 - 13
src/router/index.ts

@@ -16,14 +16,14 @@ const router = createRouter({
     },
 
     // 登录与注册
-    // {
-    //   path: "/",
-    //   redirect: () => {
-    //     window.location.href = "https://p-nju.seec.seecoder.cn/login?from=https://air.seec.seecoder.cn/";
-    //     // {本地门户首页地址}?from={本地eai首页地址}
-    //     return "/"; // 占位返回值,实际不会执行
-    // },
-    // },
+    {
+      path: "/",
+      redirect: () => {
+        window.location.href = "https://p-nju.seec.seecoder.cn/login?from=https://air.seec.seecoder.cn/";
+        // {本地门户首页地址}?from={本地eai首页地址}
+        return "/"; // 占位返回值,实际不会执行
+    },
+    },
     {
       path: "/",
       redirect: "/login"
@@ -35,7 +35,7 @@ const router = createRouter({
     },
     {
       path: '/register',
-      name: 'register', 
+      name: 'register',
       component: () => import('../views/LoginPage/RegisterPage.vue')
     },
     {
@@ -220,17 +220,17 @@ const router = createRouter({
         localStorage.removeItem('User');
     }
     }
-  
+
     if (publicPaths.includes(to.path)) return true;
-  
+
     if (!store.user?.role) {
       return '/login';
     }
-  
+
     if (to.meta?.roles && !to.meta.roles.includes(store.user.role)) {
       return '/login';
     }
-  
+
     return true;
   });
 

+ 1 - 1
src/views/HomeworkPage/component/HomeworkDetail.vue

@@ -87,7 +87,7 @@ function handleStart(){
   console.log(data.type)
   if(data.type == 'writing' || data.type == '写作'){
     router.push(`/home/assignment/${assignmentId}/edit`)
-  } else if(data.type == 'speaking' || data.type == 'AI对话'){
+  } else if(data.type == 'speaking' || data.type == 'AI口语'){
     router.push(`/home/assignment/${assignmentId}/aispeaking`)
   }
 }