Browse Source

feat: 评测选段逻辑修改

TIANYONG 9 tháng trước cách đây
mục cha
commit
b373a41e48

+ 5 - 4
src/pages/detail/runtime.ts

@@ -494,6 +494,7 @@ export const refreshPlayer = async (ctime?: number) => {
       return false
     }
     const isNext = nextTime()
+    // 选段播放结束
     if (isNext) {
       // console.log("isNext", detailState.section[1], detailState.section[1].endtime, currentTimeNum)
       state.audiosInstance.setMute(true)
@@ -503,9 +504,9 @@ export const refreshPlayer = async (ctime?: number) => {
       } else {
         await state.audiosInstance.pause()
       }
-      // 如果是单元测验 和课后训练直接结束
-      if (unitTestData.isSelectMeasureMode && state.evaluatingStatus){
-        console.log(1)
+      // 如果是单元测验 和课后训练,或者是选段评测,选段播放结束 直接结束
+      if ((unitTestData.isSelectMeasureMode || detailState.section.length === 2) && state.evaluatingStatus){
+        console.log('选段播放结束')
         event.emit('ended')
         return
       }
@@ -1050,7 +1051,7 @@ export const setAudioInit = () => {
     preAppAudioPlayTime = res?.content?.currentTime
     // console.log('app返回的mp3进度',time)
     if (diffTime < 0) {
-      console.log('进度返回异常','本次时间比上次慢',diffTime)
+      console.log('进度返回异常','本次时间比上次慢',diffTime,'当前播放时间:',res?.content?.currentTime)
     }
     requestAnimationFrame(async () => {
       if (state.playState === 'play') {

+ 1 - 0
src/subpages/colexiu/buttons/evaluating.tsx

@@ -664,6 +664,7 @@ const playerStop = () => {
 export const evaluatPlayerStop = playerStop
 
 const endevent = (evt: Event) => {
+  console.log('选段播放结束事件')
   // 如果是单元测验和课后训练 播放结束
   if (unitTestData.isSelectMeasureMode && playStatus.value === 'play') {
     playerStop()

+ 1 - 1
vite.config.js

@@ -5,7 +5,7 @@ import glsl from 'vite-plugin-glsl'
 const vueJsx = require('@vitejs/plugin-vue-jsx')
 const legacy = require('@vitejs/plugin-legacy')
 
-const proxyUrl = 'https://dev.lexiaoya.cn/' // test 环境
+const proxyUrl = 'https://test.lexiaoya.cn/' // test 环境
 // const proxyUrl = 'http://192.168.3.70:8989/' // test 环境
 // const proxyUrl = 'https://online.colexiu.com/' // online 环境