فهرست منبع

新增返回按钮,改变返回逻辑

stupig-zcx 1 سال پیش
والد
کامیت
e3e2f6ac63
2فایلهای تغییر یافته به همراه15 افزوده شده و 5 حذف شده
  1. 11 1
      src/views/AiSpeakingPage/SpeakingRecord.vue
  2. 4 4
      src/views/Home/component/Remark/Remark.vue

+ 11 - 1
src/views/AiSpeakingPage/SpeakingRecord.vue

@@ -270,6 +270,13 @@
                 >
                 >
                   下一个
                   下一个
                 </el-button>
                 </el-button>
+
+                <el-button
+                  style="background-color:#597D3B;color:white;width:200px;margin-top:50px;"
+                  @click="goBack"
+                >
+                  返回
+                </el-button>
               </div>
               </div>
               
               
               <!-- 批改进度显示 -->
               <!-- 批改进度显示 -->
@@ -887,7 +894,10 @@ onBeforeUnmount(() => {
 });
 });
 
 
 const goBack = () => {
 const goBack = () => {
-  router.go(-1);
+  router.push({
+    name: 'myCorrectWithAssignmentId',
+    params: { assignmentId: props.assignmentId }
+  });
 };
 };
 
 
 const ROLE = store.user.role;
 const ROLE = store.user.role;

+ 4 - 4
src/views/Home/component/Remark/Remark.vue

@@ -219,10 +219,10 @@ export default defineComponent({
     };
     };
 
 
     const goBack = () => {
     const goBack = () => {
-      router.go(-1);
-      setTimeout(() => {
-        window.location.reload();
-      }, 100);
+      router.push({
+        name: 'myCorrectWithAssignmentId',
+        params: { assignmentId: props.assignmentId }
+      });
     };
     };
 
 
     return {
     return {