소스 검색

fix:bug修复

廖彦舟 1 년 전
부모
커밋
9022994803
2개의 변경된 파일과 5개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 3
      src/router/index.ts
  2. 2 2
      src/views/CourseSquare/component/CourseDetails/component/CourseHomeworkTable.vue

+ 3 - 3
src/router/index.ts

@@ -208,9 +208,9 @@ const router = createRouter({
         }
 
         // 如果当前路径是公开路径,允许继续;否则跳转到首页
-        if (!publicPaths.includes(to.path)) {
-            return '/home';
-        }
+        // if (!publicPaths.includes(to.path)) {
+        //     return '/home';
+        // }
     } catch (error) {
         console.error('Token验证失败:', error);
         // 验证失败,清除无效的 token

+ 2 - 2
src/views/CourseSquare/component/CourseDetails/component/CourseHomeworkTable.vue

@@ -263,9 +263,9 @@ const openEditor = (url: string, title: string) => {
       handleWriting(assignmentId)
     } else if(props.role == 'teachers'){
       changeDialog('edit', assignmentId, type)
-      if(type === '写作'){
+      if(type === '写作' || type == 'writing'){
         writingVisible.value = true;
-      } else if(type === 'AI口语'){
+      } else if(type === 'AI口语' || type == 'speaking'){
         AISpeakingVisible.value =true;
       }
     }