Browse Source

feat: 添加耳机状态图

TIANYONG 1 năm trước cách đây
mục cha
commit
9fabf1b0bb

BIN
src/pages/detail/CheckDelayPopup/image/step_tips_icon5_1.png


BIN
src/pages/detail/CheckDelayPopup/image/step_tips_icon5_2.png


+ 6 - 1
src/pages/detail/CheckDelayPopup/index.tsx

@@ -14,6 +14,8 @@ import step_tips_2 from "./image/step_tips_icon2.png"
 import step_tips_3 from "./image/step_tips_icon3.png"
 import step_tips_4 from "./image/step_tips_icon4.png"
 import step_tips_5 from "./image/step_tips_icon5.png"
+import step_tips_5_1 from "./image/step_tips_icon5_1.png"
+import step_tips_5_2 from "./image/step_tips_icon5_2.png"
 import step_top_icon from "./image/step_top_icon.png"
 import step_btn_1 from "./image/delay_btn_icon1.png"
 import step_btn_2 from "./image/delay_btn_icon2.png"
@@ -30,6 +32,7 @@ interface IDelayData {
 	erji: boolean;
 	checkStatus: "init" | "ing" | "error";
 	step: number;
+	earPhoneType: string;
 }
 
 /** 延迟检测组件 */
@@ -102,7 +105,9 @@ export default defineComponent({
 						<img class={styles.dbContext} src={step_tips_2} style={{ display: props.delayData.step === 3 ? '' : 'none' }} />
 						<img class={styles.dbContext} src={step_tips_3} style={{ display: props.delayData.step === 4 ? '' : 'none' }} />
 						<img class={styles.dbContext} src={step_tips_4} style={{ display: props.delayData.step === 5 ? '' : 'none' }} />
-						<img class={styles.dbContext} src={step_tips_5} style={{ display: props.delayData.step >= 6 ? '' : 'none' }} />
+						<img class={styles.dbContext} src={step_tips_5} style={{ display: props.delayData.step >= 6 && !props.delayData.erji ? '' : 'none' }} />
+						<img class={styles.dbContext} src={step_tips_5_1} style={{ display: props.delayData.step >= 6 && props.delayData.erji && props.delayData.earPhoneType !== "有线耳机" ? '' : 'none' }} />
+						<img class={styles.dbContext} src={step_tips_5_2} style={{ display: props.delayData.step >= 6 && props.delayData.erji && props.delayData.earPhoneType === "有线耳机" ? '' : 'none' }} />
 						<img class={styles.dbBtn} src={step_btn_1} style={{ display: props.delayData.step <= 2 ? '' : 'none' }} onClick={() => emit("startCheckDelay")} />
 						<img class={styles.dbBtn} src={step_btn_2} style={{ display: props.delayData.step >= 6 ? '' : 'none' }} onClick={() => {emit("close")}} />
 					</div>

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

@@ -91,6 +91,7 @@ const delayData =  reactive({
   /** 检测状态 */
   checkStatus: 'init' as 'init' | 'ing' | 'error',
   step: 1,
+  earPhoneType: "" as "" | "有线耳机" | "蓝牙耳机",
 })
   /** 获取耳机状态 */
   const getWiredStatus = (): Promise<boolean> => {
@@ -101,6 +102,7 @@ const delayData =  reactive({
       postMessage({
         api: "isWiredHeadsetOn",
       }, (res) => {
+        delayData.earPhoneType = res?.content?.type || "";
         const checkIsWired = res?.content?.checkIsWired ? true : false;
         if (checkIsWired) {
           if (delayData.step <= 5) {