|
@@ -92,6 +92,7 @@ async function handleEnded() {
|
|
|
}
|
|
}
|
|
|
const status = ref('wait')
|
|
const status = ref('wait')
|
|
|
const visible = ref(false)
|
|
const visible = ref(false)
|
|
|
|
|
+const visible2 = ref(false)
|
|
|
onShow(async () => {
|
|
onShow(async () => {
|
|
|
isLoading.value = true
|
|
isLoading.value = true
|
|
|
var pages = getCurrentPages();
|
|
var pages = getCurrentPages();
|
|
@@ -101,33 +102,45 @@ onShow(async () => {
|
|
|
if (status.value === 'success') {
|
|
if (status.value === 'success') {
|
|
|
if (progress2.value === 6) {
|
|
if (progress2.value === 6) {
|
|
|
let nextCourseId = ''
|
|
let nextCourseId = ''
|
|
|
- if (progressStatus.value === 0) {
|
|
|
|
|
- nextCourseId = await updateSubjectProgress({
|
|
|
|
|
- courseId: course.value?.id,
|
|
|
|
|
- mainProgress: 1,
|
|
|
|
|
- assistantProgress: 6,
|
|
|
|
|
- status: 1
|
|
|
|
|
- })
|
|
|
|
|
- console.log(nextCourseId);
|
|
|
|
|
- user.setCourseId(nextCourseId)
|
|
|
|
|
- await fetchNextCatalog(nextCourseId)
|
|
|
|
|
- uni.createVideoContext('video1').pause()
|
|
|
|
|
- console.log(222);
|
|
|
|
|
- isLoading.value = false
|
|
|
|
|
- visible.value = true
|
|
|
|
|
- } else {
|
|
|
|
|
- nextCourseId = await queryNextSubjectCourse({
|
|
|
|
|
- id: course.value?.id,
|
|
|
|
|
|
|
+ // if (progressStatus.value === 0) {
|
|
|
|
|
+ nextCourseId = await updateSubjectProgress({
|
|
|
|
|
+ courseId: course.value?.id,
|
|
|
|
|
+ mainProgress: 1,
|
|
|
|
|
+ assistantProgress: 6,
|
|
|
|
|
+ status: 1
|
|
|
|
|
+ })
|
|
|
|
|
+ if (nextCourseId == '' || nextCourseId == null) {
|
|
|
|
|
+ router.back({
|
|
|
|
|
+ delta: 2
|
|
|
})
|
|
})
|
|
|
- console.log(nextCourseId);
|
|
|
|
|
- user.setCourseId(nextCourseId)
|
|
|
|
|
- await fetchNextCatalog(nextCourseId)
|
|
|
|
|
- uni.createVideoContext('video1').pause()
|
|
|
|
|
- console.log(222);
|
|
|
|
|
- isLoading.value = false
|
|
|
|
|
- visible.value = true
|
|
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ console.log(nextCourseId);
|
|
|
|
|
+ user.setCourseId(nextCourseId)
|
|
|
|
|
+ await fetchNextCatalog(nextCourseId)
|
|
|
|
|
+ uni.createVideoContext('video1').pause()
|
|
|
|
|
+ console.log(222);
|
|
|
|
|
+ isLoading.value = false
|
|
|
|
|
+ visible.value = true;
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // nextCourseId = await queryNextSubjectCourse({
|
|
|
|
|
+ // id: course.value?.id,
|
|
|
|
|
+ // })
|
|
|
|
|
+ // if (nextCourseId == '' || nextCourseId == null) {
|
|
|
|
|
+ // router.back({
|
|
|
|
|
+ // delta: 2
|
|
|
|
|
+ // })
|
|
|
|
|
+ // return
|
|
|
|
|
+ // }
|
|
|
|
|
+ // console.log(nextCourseId);
|
|
|
|
|
+ // user.setCourseId(nextCourseId)
|
|
|
|
|
+ // await fetchNextCatalog(nextCourseId)
|
|
|
|
|
+ // uni.createVideoContext('video1').pause()
|
|
|
|
|
+ // console.log(222);
|
|
|
|
|
+ // isLoading.value = false
|
|
|
|
|
+ // visible.value = true
|
|
|
|
|
+ // }
|
|
|
|
|
+ (prevPage as any).status = 'wait'
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
progress2.value++;
|
|
progress2.value++;
|
|
@@ -407,6 +420,14 @@ onUnmounted(() => {
|
|
|
</cl-row>
|
|
</cl-row>
|
|
|
</view>
|
|
</view>
|
|
|
</cl-popup>
|
|
</cl-popup>
|
|
|
|
|
+ <cl-popup v-model="visible2" showClose :size="400" :show-header="false" direction="center">
|
|
|
|
|
+ <view class="p-[40px] ">
|
|
|
|
|
+ <cl-text class="text-center" color="#000" :size="20">
|
|
|
|
|
+ 暂无下集
|
|
|
|
|
+ </cl-text>
|
|
|
|
|
+ <cl-button class="mt-4" size="large" type="warn" block @tap="visible2 = false"> 返回 </cl-button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </cl-popup>
|
|
|
</template>
|
|
</template>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.translate50 {
|
|
.translate50 {
|