浏览代码

fix: 评卷页面返回跳转到评卷员主页

chenhao 2 年之前
父节点
当前提交
21d24e1574
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      src/modules/marking/mark/index.vue

+ 8 - 2
src/modules/marking/mark/index.vue

@@ -84,7 +84,7 @@ import type { SetImgBgOption } from '@/hooks/useSetImgBg'
 import type { ExtractApiResponse } from 'api-type'
 import type { MarkHeaderInstance } from 'global-type'
 
-const { push } = useRouter()
+const { push, replace } = useRouter()
 
 const { getSpentTime, resume } = useTime()
 
@@ -110,7 +110,6 @@ const {
   center,
   frontColor,
   backgroundColor,
-  onBack,
   onScaleChange,
   onCenter,
   onRotate,
@@ -210,6 +209,13 @@ const onConfirmProblem = async () => {
   }
 }
 
+/** 返回 */
+const onBack = () => {
+  replace({
+    name: 'MarkingNav',
+  })
+}
+
 /** 刷新 */
 const onRefresh = () => {
   console.log('onRefresh')