whj 4 일 전
부모
커밋
ae803ab85e
2개의 변경된 파일11개의 추가작업 그리고 8개의 파일을 삭제
  1. 5 5
      pages/catalog/detail.uvue
  2. 6 3
      pages/catalog/web-view.uvue

+ 5 - 5
pages/catalog/detail.uvue

@@ -59,6 +59,7 @@ onMounted(async () => {
   isLoading.value = false
   setTimeout(() => {
     showProgress.value = false
+    isLoading.value = false
   }, 2000)
 })
 async function handleEnded() {
@@ -79,7 +80,6 @@ async function handleEnded() {
           progress: progress2.value,
         }
       });
-      progress2.value++
       break
     case 2:
       router.push({
@@ -89,7 +89,6 @@ async function handleEnded() {
           progress: progress2.value,
         }
       });
-      progress2.value++
       break
     case 4:
     case 5:
@@ -100,13 +99,16 @@ async function handleEnded() {
 }
 const status = ref('wait')
 onShow(() => {
+  isLoading.value = true
   var pages = getCurrentPages();
   const prevPage = pages[pages.length - 1];
   console.log('prevPage', prevPage)
   status.value = prevPage?.status || 'wait'
   if (status.value === 'success') {
-    // progress2.value++
+    progress2.value++
   }
+  isLoading.value = false
+
 })
 
 function handleControlsToggle(e) {
@@ -133,7 +135,6 @@ watchEffect(() => {
             progress: progress2.value,
           }
         });
-        progress2.value++
         break
       case 4:
         // data.value.videoSrc = course.value?.detailItem?.testVideoPath || data.value.videoSrc
@@ -145,7 +146,6 @@ watchEffect(() => {
             progress: progress2.value,
           }
         });
-        progress2.value++
         break
       case 5:
         data.value.videoSrc = course.value?.detailItem?.summaryVideoPath || data.value.videoSrc

+ 6 - 3
pages/catalog/web-view.uvue

@@ -1,5 +1,6 @@
 <script setup lang='ts'>
 import { ref, onMounted, watchEffect } from 'vue'
+import Loading from '@/components/loading.uvue'
 import { router } from '@/.cool'
 const menu2Items = [
   { id: '1', name: '观察', icon: 'https://oss.xiaoxiongcode.com/static/home/kanke.png' },
@@ -11,6 +12,7 @@ const menu2Items = [
 ]
 const progress = ref(1)
 const webviewSrc = ref('')
+const isLoading = ref(true)
 onMounted(() => {
   webviewSrc.value = router.query().src
   progress.value = router.query().progress
@@ -22,8 +24,9 @@ function handleMessage(e) {
 }
 </script>
 <template>
-  <view class="w-full h-full absolute top-0 left-0 z-[11]">
-    <view class="video-fullscreen_title">
+  <Loading v-show="isLoading" />
+  <view class="w-full h-full absolute top-0 left-0 z-[11]" v-show="!isLoading">
+    <!-- <view class="video-fullscreen_title">
       <Back />
       <view class="control-progress">
         <view class="before"></view>
@@ -35,7 +38,7 @@ function handleMessage(e) {
           }}</text>
         </view>
       </view>
-    </view>
+    </view> -->
     <web-view :src="webviewSrc + '?' + Math.random()" class="w-full h-full" @message="handleMessage"></web-view>
   </view>
 </template>