瀏覽代碼

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

skyblued 2 年之前
父節點
當前提交
1dd9271f91
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4 6
      src/views/exercise-after-class/index.tsx

+ 4 - 6
src/views/exercise-after-class/index.tsx

@@ -233,14 +233,12 @@ export default defineComponent({
             if (!isLastIndex) {
               const nextItem = data.details[itemIndex + 1]
               if (nextItem?.type === materialType.视频) {
-                // console.log('下一题视频', data.details[itemIndex].materialId, nextItem.materialId)
-                router.replace({
-                  path: '/exerciseAfterClass',
-                  query: {
-                    ...query,
+                const searchUrl = qs.stringify({
+                  ...query,
                     materialId: nextItem.materialId
-                  }
                 })
+                // console.log('下一题视频', data.details[itemIndex].materialId, nextItem.materialId)
+                location.href = `${location.origin}${location.pathname}#/exerciseAfterClass?${searchUrl}`
               }
               if (nextItem?.type === materialType.曲目) {
                 handleInit(1)