|
|
@@ -20,14 +20,14 @@ const data = ref({
|
|
|
// ]
|
|
|
const menu2Items = [
|
|
|
{ id: '1', name: '观察', icon: 'https://oss.xiaoxiongcode.com/static/home/观察.png' },
|
|
|
- { id: '2', name: '思考', icon: 'https://oss.xiaoxiongcode.com/static/home/假设.png' },
|
|
|
- { id: '3', name: '假设', icon: 'https://oss.xiaoxiongcode.com/static/home/卡通扁平化功能图标设计.png' },
|
|
|
- { id: '4', name: '交互', icon: 'https://oss.xiaoxiongcode.com/static/home/总结.png' },
|
|
|
+ { id: '2', name: '交互', icon: 'https://oss.xiaoxiongcode.com/static/home/总结.png' },
|
|
|
+ { id: '3', name: '思考', icon: 'https://oss.xiaoxiongcode.com/static/home/假设.png' },
|
|
|
+ { id: '4', name: '假设', icon: 'https://oss.xiaoxiongcode.com/static/home/卡通扁平化功能图标设计.png' },
|
|
|
{ id: '5', name: '总结', icon: 'https://oss.xiaoxiongcode.com/static/home/拓展.png' },
|
|
|
{ id: '6', name: '实验', icon: 'https://oss.xiaoxiongcode.com/static/home/shiyan.png' },
|
|
|
]
|
|
|
//当前进度
|
|
|
-const progress = ref(0)
|
|
|
+const progress = ref(1)
|
|
|
const progress2 = ref(0)
|
|
|
const progressStatus = ref(0)
|
|
|
const recorderManager = ref<any>()
|
|
|
@@ -62,10 +62,12 @@ async function fetchCatalog() {
|
|
|
})
|
|
|
progress.value = 1
|
|
|
progress2.value = 1
|
|
|
- } else {
|
|
|
+ } else if (course.value?.courseUserProgress.status == 0) {
|
|
|
progressStatus.value = course.value?.courseUserProgress.status
|
|
|
- progress.value = course.value?.courseUserProgress.mainProgress
|
|
|
progress2.value = course.value?.courseUserProgress.assistantProgress
|
|
|
+ } else {
|
|
|
+ progressStatus.value = course.value?.courseUserProgress.status
|
|
|
+ progress2.value = 1
|
|
|
}
|
|
|
}
|
|
|
onMounted(async () => {
|
|
|
@@ -85,6 +87,7 @@ onShow(async () => {
|
|
|
var pages = getCurrentPages();
|
|
|
const prevPage = pages[pages.length - 1];
|
|
|
status.value = (prevPage as any)?.status || 'wait'
|
|
|
+ console.log(status.value);
|
|
|
if (status.value === 'success') {
|
|
|
if (progress2.value === 6) {
|
|
|
if (progressStatus.value === 0) {
|
|
|
@@ -110,10 +113,10 @@ function handleControlsToggle(e) {
|
|
|
|
|
|
watch(() => progress2.value, (newVal, oldVal) => {
|
|
|
isLoading.value = true
|
|
|
- if (course.value?.id) {
|
|
|
+ if (course.value?.id && progressStatus.value == 0) {
|
|
|
updateSubjectProgress({
|
|
|
courseId: course.value?.id,
|
|
|
- mainProgress: progress.value,
|
|
|
+ mainProgress: 1,
|
|
|
assistantProgress: progress2.value,
|
|
|
status: progressStatus.value
|
|
|
})
|
|
|
@@ -127,27 +130,27 @@ watch(() => progress2.value, (newVal, oldVal) => {
|
|
|
}, 2000)
|
|
|
break
|
|
|
case 2:
|
|
|
+ data.value.webviewSrc = course.value?.detailItem?.summaryVideoPath
|
|
|
+ router.push({
|
|
|
+ path: "/pages/catalog/web-view",
|
|
|
+ query: {
|
|
|
+ src: data.value.webviewSrc,
|
|
|
+ progress: progress2.value,
|
|
|
+ }
|
|
|
+ });
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
setTimeout(() => {
|
|
|
isLoading.value = false
|
|
|
data.value.videoSrc = course.value?.detailItem?.questionVideoPath
|
|
|
}, 2000)
|
|
|
break
|
|
|
- case 3:
|
|
|
+ case 4:
|
|
|
setTimeout(() => {
|
|
|
isLoading.value = false
|
|
|
playVoice(course.value?.detailItem?.assumeAnimationPath)
|
|
|
}, 2000)
|
|
|
break
|
|
|
- case 4:
|
|
|
- data.value.webviewSrc = course.value?.detailItem?.summaryVideoPath
|
|
|
- router.push({
|
|
|
- path: "/pages/catalog/web-view",
|
|
|
- query: {
|
|
|
- src: data.value.webviewSrc,
|
|
|
- progress: progress2.value,
|
|
|
- }
|
|
|
- });
|
|
|
- break
|
|
|
case 5:
|
|
|
setTimeout(() => {
|
|
|
isLoading.value = false
|
|
|
@@ -171,7 +174,7 @@ const timers = ref(100)
|
|
|
const timer = ref<any>()
|
|
|
|
|
|
function handleTop() {
|
|
|
- progress2.value = 4
|
|
|
+ progress2.value = 5
|
|
|
}
|
|
|
function startRecord() {
|
|
|
console.log('开始录音');
|
|
|
@@ -204,7 +207,7 @@ onUnmounted(() => {
|
|
|
<cl-page v-show="!isLoading">
|
|
|
<Back />
|
|
|
<view class="video-container">
|
|
|
- <video v-if="progress2 !== 3" id="video1" class="w-full h-full " :src="data.videoSrc"
|
|
|
+ <video v-if="progress2 !== 4" id="video1" class="w-full h-full " :src="data.videoSrc"
|
|
|
:show-center-play-btn="false" :show-background-playback-button="false" :show-fullscreen-btn="false"
|
|
|
:show-casting-button="false" autoplay @controlstoggle="handleControlsToggle" @ended="handleEnded">
|
|
|
</video>
|