瀏覽代碼

fix: 延迟检测bug修复

TIANYONG 1 年之前
父節點
當前提交
c47096a6c7

+ 2 - 2
src/pages/detail/CheckDelayPopup/index.tsx

@@ -44,7 +44,7 @@ interface IDelayData {
 /** 延迟检测组件 */
 export default defineComponent({
 	name: "CheckDelayPopup",
-	emits: ["close", "startCheckDelay", "load"],
+	emits: ["close", "startCheckDelay", "load", "back"],
 	props: {
 		delayData: {
 			type: Object as PropType<IDelayData>,
@@ -58,7 +58,7 @@ export default defineComponent({
 				<Vue3Lottie class={styles.leftAdorn} animationData={left_adorn}></Vue3Lottie>
 				<Vue3Lottie class={styles.rightAdorn} animationData={right_adorn}></Vue3Lottie>
 				{/*返回按钮*/}
-				<img class={styles.delayBackBtn} src={iconBack} onClick={() => emit("close")} />
+				<img class={styles.delayBackBtn} src={iconBack} onClick={() => emit("back")} />
 				<Vue3Lottie class={styles.delayAdorn} animationData={step1} style={{ display: props.delayData.step <= 2 ? '' : 'none' }}></Vue3Lottie>
 				<Vue3Lottie class={styles.delayAdorn} animationData={step2} style={{ display: props.delayData.step === 3 ? '' : 'none' }}></Vue3Lottie>
 				<Vue3Lottie class={styles.delayAdorn} animationData={step3} style={{ display: props.delayData.step === 4 ? '' : 'none' }}></Vue3Lottie>

+ 1 - 1
src/pages/detail/helpers.ts

@@ -158,7 +158,7 @@ const tranTime = (str: string = '') => {
   return `1970-01-01 00:${result}0`
 }
 export const getAllNodes = (osmd: any) => {
-  console.log(9999, osmd)
+  //console.log(9999, osmd)
   const detailId = getLinkId()
   let fixtime = browserInfo.huawei ? 0.08 : 0 //getFixTime()
   const allNotes: any[] = []

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

@@ -28,7 +28,7 @@ import iconEvaluatingStart from './icons/icon-evaluatingStart.png'
 import qs from 'query-string'
 import CheckDelayPopup from "/src/pages/detail/CheckDelayPopup";
 import Headphone, { HeadphoneData } from "/src/pages/detail/Headphone";
-
+import { modelType } from './index'
 
 /** 初始化评测音频 */
 export const evaluatCreateMusicPlayer = () => {
@@ -237,6 +237,13 @@ const delayData =  reactive({
 			handleToggleTune('stop')
 			// this.close();
 		} 
+    const handleDelayBack = () => {
+      modelType.value = 'init'
+      delayData.open = false
+			delayData.checkStatus = 'init'
+      delayData.step = 1
+			handleToggleTune('stop')
+    }
 		/** 开始检测设备延迟 */
 		const handleStartCheckDelay = async () => {
 			if (delayData.checkStatus === 'ing') return;
@@ -524,6 +531,7 @@ const setPlayer = async () => {
     //startPlay()
     setTimeout(() => {
       console.log('关闭弹窗')
+      startButtonShow.value = false
       Toast.clear()
       hint.close()
     }, 100)
@@ -964,6 +972,7 @@ export default defineComponent({
 						delayData={delayData}
 						onStartCheckDelay={() => handleStartCheckDelay()}
 						onClose={() => handleStopCheckDelay()} 
+            onBack={() => handleDelayBack()}
 					/>
 				</Popup>
         </Teleport>