|
@@ -3,7 +3,7 @@ import Back from '@/components/back.uvue'
|
|
|
import Loading from '@/components/loading.uvue'
|
|
import Loading from '@/components/loading.uvue'
|
|
|
import { ref, onMounted, watch, nextTick, onUnmounted } from 'vue'
|
|
import { ref, onMounted, watch, nextTick, onUnmounted } from 'vue'
|
|
|
import { type SubjectCourseResult, fetchSubjectCourseApp, updateSubjectProgress } from '@/services/subject/course'
|
|
import { type SubjectCourseResult, fetchSubjectCourseApp, updateSubjectProgress } from '@/services/subject/course'
|
|
|
-import { router } from '@/.cool'
|
|
|
|
|
|
|
+import { router, user } from '@/.cool'
|
|
|
const isLoading = ref(true)
|
|
const isLoading = ref(true)
|
|
|
const showControls = ref(true)
|
|
const showControls = ref(true)
|
|
|
const showVideo = ref(true)
|
|
const showVideo = ref(true)
|
|
@@ -93,12 +93,13 @@ onShow(async () => {
|
|
|
if (status.value === 'success') {
|
|
if (status.value === 'success') {
|
|
|
if (progress2.value === 6) {
|
|
if (progress2.value === 6) {
|
|
|
if (progressStatus.value === 0) {
|
|
if (progressStatus.value === 0) {
|
|
|
- await updateSubjectProgress({
|
|
|
|
|
|
|
+ const res = await updateSubjectProgress({
|
|
|
courseId: course.value?.id,
|
|
courseId: course.value?.id,
|
|
|
mainProgress: 1,
|
|
mainProgress: 1,
|
|
|
assistantProgress: 6,
|
|
assistantProgress: 6,
|
|
|
status: 1
|
|
status: 1
|
|
|
})
|
|
})
|
|
|
|
|
+ user.setCourseId(res as string)
|
|
|
}
|
|
}
|
|
|
router.back()
|
|
router.back()
|
|
|
return
|
|
return
|