소스 검색

学生端课后训练:提示不对

skyblued 2 년 전
부모
커밋
fc805fc58d
1개의 변경된 파일10개의 추가작업 그리고 7개의 파일을 삭제
  1. 10 7
      src/views/exercise-after-class/index.tsx

+ 10 - 7
src/views/exercise-after-class/index.tsx

@@ -69,13 +69,13 @@ export default defineComponent({
     })
 
     const route = useRoute()
-    watch(
-      () => route.query,
-      () => {
-        getDetail()
-        trainingRecord()
-      }
-    )
+    // watch(
+    //   () => route.query,
+    //   () => {
+    //     getDetail()
+    //     trainingRecord()
+    //   }
+    // )
     const router = useRouter()
     const query = route.query
     const browserInfo = browser()
@@ -248,6 +248,7 @@ export default defineComponent({
                 })
                 // console.log('下一题视频', data.details[itemIndex].materialId, nextItem.materialId)
                 location.href = `${location.origin}${location.pathname}#/exerciseAfterClass?${searchUrl}`
+                history.go(0)
               }
               if (nextItem?.type === materialType.曲目) {
                 handleInit(1)
@@ -271,6 +272,8 @@ export default defineComponent({
                   }
                 })
               }
+            } else {
+              postMessage({ api: 'goBack' })
             }
           })
           .catch(() => {