Explorar el Código

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

stupig-zcx hace 1 año
padre
commit
e3e2f6ac63

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

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

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

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