瀏覽代碼

添加提示音

ZhangJunQuan 4 月之前
父節點
當前提交
ef533dc4cf
共有 3 個文件被更改,包括 14 次插入0 次删除
  1. 9 0
      src/Fingerprint/FingerprintEnroll.vue
  2. 3 0
      src/login/FingerprintLogin.vue
  3. 2 0
      src/login/UserLogin.vue

+ 9 - 0
src/Fingerprint/FingerprintEnroll.vue

@@ -183,6 +183,15 @@ const handleFingerprintResponse = data => {
     const code = data.code;
     const msg = data.message || '';
 
+    
+    if(msg === '请抬起手指'){
+      //播放提示音
+      plugin.soundPlay.playLift();
+    }else if(msg === '请按压手指'){
+      //播放提示音
+      plugin.soundPlay.playPress();
+    }
+
     if (code === 0) {
         statusText.value = msg || '指纹录入成功!';
         

+ 3 - 0
src/login/FingerprintLogin.vue

@@ -197,6 +197,9 @@ const handleFingerprintResponse = data => {
                     router.push('/home');
                 }
                 checkPasswordReminder();
+
+                //登录成功播放提示音
+                plugin.soundPlay.playLogin();
             }, 1000);
         }
     } else {

+ 2 - 0
src/login/UserLogin.vue

@@ -271,6 +271,8 @@ const handleLogin = async () => {
             }
             // checkPasswordReminder();
             checkAwayAbnormalCar();
+            //登录成功播放提示音
+            plugin.soundPlay.playLogin();
         } else {
             showNotify({ type: 'danger', message: res.errorMessage });
         }