|
@@ -1,5 +1,14 @@
|
|
import { Icon, showConfirmDialog, Slider, Swipe, SwipeItem } from 'vant'
|
|
import { Icon, showConfirmDialog, Slider, Swipe, SwipeItem } from 'vant'
|
|
-import { defineComponent, onMounted, reactive, onUnmounted, ref, watch, Transition } from 'vue'
|
|
|
|
|
|
+import {
|
|
|
|
+ defineComponent,
|
|
|
|
+ onMounted,
|
|
|
|
+ reactive,
|
|
|
|
+ onUnmounted,
|
|
|
|
+ ref,
|
|
|
|
+ watch,
|
|
|
|
+ Transition,
|
|
|
|
+ nextTick
|
|
|
|
+} from 'vue'
|
|
import styles from './index.module.less'
|
|
import styles from './index.module.less'
|
|
import 'plyr/dist/plyr.css'
|
|
import 'plyr/dist/plyr.css'
|
|
import request from '@/helpers/request'
|
|
import request from '@/helpers/request'
|
|
@@ -72,8 +81,10 @@ export default defineComponent({
|
|
// watch(
|
|
// watch(
|
|
// () => route.query,
|
|
// () => route.query,
|
|
// () => {
|
|
// () => {
|
|
- // getDetail()
|
|
|
|
- // trainingRecord()
|
|
|
|
|
|
+ // console.log('变化了')
|
|
|
|
+ // history.go(0)
|
|
|
|
+ // // getDetail()
|
|
|
|
+ // // trainingRecord()
|
|
// }
|
|
// }
|
|
// )
|
|
// )
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -242,12 +253,23 @@ export default defineComponent({
|
|
if (!isLastIndex) {
|
|
if (!isLastIndex) {
|
|
const nextItem = data.details[itemIndex + 1]
|
|
const nextItem = data.details[itemIndex + 1]
|
|
if (nextItem?.type === materialType.视频) {
|
|
if (nextItem?.type === materialType.视频) {
|
|
- const searchUrl = qs.stringify({
|
|
|
|
- ...query,
|
|
|
|
- materialId: nextItem.materialId
|
|
|
|
|
|
+ router.push({
|
|
|
|
+ path: '/exerciseAfterClass',
|
|
|
|
+ query: {
|
|
|
|
+ ...query,
|
|
|
|
+ materialId: nextItem.materialId
|
|
|
|
+ }
|
|
})
|
|
})
|
|
- // console.log('下一题视频', data.details[itemIndex].materialId, nextItem.materialId)
|
|
|
|
- location.href = `${location.origin}${location.pathname}#/exerciseAfterClass?${searchUrl}`
|
|
|
|
|
|
+ // const searchUrl = qs.stringify({
|
|
|
|
+ // ...query,
|
|
|
|
+ // materialId: nextItem.materialId
|
|
|
|
+ // })
|
|
|
|
+ // location.href = `${location.origin}${location.pathname}#/exerciseAfterClass?${searchUrl}`
|
|
|
|
+ // console.log(
|
|
|
|
+ // '🚀 ~ nextItem.materialId',
|
|
|
|
+ // nextItem.materialId,
|
|
|
|
+ // `${location.origin}${location.pathname}#/exerciseAfterClass?${searchUrl}`
|
|
|
|
+ // )
|
|
history.go(0)
|
|
history.go(0)
|
|
}
|
|
}
|
|
if (nextItem?.type === materialType.曲目) {
|
|
if (nextItem?.type === materialType.曲目) {
|