liushengqiang hace 2 años
padre
commit
7cc84e4d5f

+ 27 - 0
src/page-instrument/evaluat-model/delay-check/index.module.less

@@ -0,0 +1,27 @@
+.popup{
+    width: 100%;
+    height: 100%;
+}
+.delayBox{
+    position: fixed;
+    left: 0;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    background: linear-gradient(to bottom, rgba(62,122,246,1), rgba(120,206,115,1));
+}
+.item{
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    width: 100%;
+    height: 100%;
+}
+.btn{
+    position: absolute;
+    bottom: 20%;
+    right: 20%;
+    z-index: 100;
+}

+ 31 - 12
src/page-instrument/evaluat-model/delay-check/index.tsx

@@ -1,6 +1,11 @@
 import { Button, Popup } from "vant";
+import styles from "./index.module.less";
 import { defineComponent, onMounted, onUnmounted, reactive } from "vue";
 import { api_toggleTune, removeResult, sendResult } from "/src/helpers/communication";
+import { Vue3Lottie } from "vue3-lottie";
+import bg from "./json/bg.json";
+import f1 from "./json/f1.json";
+import f2 from "./json/f2.json";
 
 export default defineComponent({
 	name: "delay-check",
@@ -31,25 +36,39 @@ export default defineComponent({
 		});
 
 		const toggleTune = async (state: "start" | "stop" | "finishTune") => {
-			await api_toggleTune(state, data.count);
+            if(state === 'start') {
+                await api_toggleTune('start', data.count);
+                setTimeout(() => {
+                    api_toggleTune('stop');
+                }, 1500)
+            } else if (state === 'finishTune') {
+                await api_toggleTune('finishTune');
+
+            }
 		};
 		return () => (
 			<Popup
 				teleport="body"
-				closeOnClickOverlay={false}
-				class={["popup-custom"]}
+				overlay={false}
+				class={["popup-custom", styles.popup]}
 				transition="van-fade"
 				v-model:show={data.show}
 			>
-				<Button
-					disabled={data.checkStatus !== "init"}
-					onClick={() => {
-						data.checkStatus = "ing";
-						toggleTune("start");
-					}}
-				>
-					开始检测
-				</Button>
+				<div class={styles.delayBox}>
+					<Vue3Lottie width={"100%"} height={"100%"} animationData={bg}></Vue3Lottie>
+					{/* <Vue3Lottie class={styles.item} animationData={f1} loop={false}></Vue3Lottie> */}
+					<Vue3Lottie class={styles.item} animationData={f2}></Vue3Lottie>
+					<Button
+                        class={styles.btn}
+						disabled={data.checkStatus !== "init"}
+						onClick={() => {
+							data.checkStatus = "ing";
+							toggleTune("start");
+						}}
+					>
+						开始检测
+					</Button>
+				</div>
 			</Popup>
 		);
 	},

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
src/page-instrument/evaluat-model/delay-check/json/6 飞机飞走背景.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
src/page-instrument/evaluat-model/delay-check/json/bg.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
src/page-instrument/evaluat-model/delay-check/json/f1.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
src/page-instrument/evaluat-model/delay-check/json/f2.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
src/page-instrument/evaluat-model/delay-check/json/第三步 调整设备音量75%.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
src/page-instrument/evaluat-model/delay-check/json/第二步 断开耳机.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
src/page-instrument/evaluat-model/delay-check/json/第五步 开始评测.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
src/page-instrument/evaluat-model/delay-check/json/第六步 飞机飞走.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
src/page-instrument/evaluat-model/delay-check/json/第四步 正在进行检测.json


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio