From 802971e1c3f378354dbd5014a0c552f9081d4a00 Mon Sep 17 00:00:00 2001
From: cnf <3200815559@qq.com>
Date: 星期二, 26 八月 2025 13:14:05 +0800
Subject: [PATCH] 部分模块加上声音提示

---
 H5/Js/Scbg.js |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/H5/Js/Scbg.js b/H5/Js/Scbg.js
index 119968d..78864ea 100644
--- a/H5/Js/Scbg.js
+++ b/H5/Js/Scbg.js
@@ -68,15 +68,18 @@
                         that.$refs.barcode.focus();
                     } else {
                         that.$toast("鏈壘鍒板尮閰嶇殑 鐢ㄦ埛鍚嶇О");
+                        that.$playSound('error');
                     }
                 }
                 else {
                     that.$toast.fail(json.message);
+                    that.$playSound('error');
                 }
                 that.isLoading = false;
             })
             .catch(function (error) {
                 that.isLoading = false;
+                that.$playSound('error');
                 that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
                 console.log(error);
             });
@@ -104,17 +107,20 @@
                         that.actions = json.data.tbBillList.map(item => {
                             return { name: item.staffName }
                         });
+                        that.$playSound('success');
 
                         that.stafList = json.data.tbBillList;
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$playSound('error');
                     }
                     that.isLoading = false;
                 })
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                     console.log(error);
                 });
         },
@@ -218,6 +224,7 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                     console.log(error);
                 });
             // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
@@ -248,16 +255,19 @@
 
             if (!that.userInfo.loginAccount) {
                 this.$toast.fail("璇烽噸鏂版鏌ョ櫥褰曠姸鎬�");
+                that.$playSound('error');
                 return;
             }
 
             if (!that.barcode) {
                 this.$toast.fail("鏉$爜涓嶈兘涓虹┖");
+                that.$playSound('error');
                 return;
             }
 
             if (!that.stafId) {
                 that.$toast.fail("鍛樺伐涓嶅厑璁镐负绌�");
+                that.$playSound('error');
                 return;
             }
 
@@ -301,6 +311,7 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                     console.log(error);
                 });
         },
@@ -313,6 +324,7 @@
 
             if (!that.userInfo.loginAccount) {
                 this.$toast.fail("璇烽噸鏂版鏌ョ櫥褰曠姸鎬�");
+                that.$playSound('error');
                 that.load = false;
                 return;
             }
@@ -337,6 +349,7 @@
 
             if (!that.sjBillNo) {
                 this.$toast.fail("閫佹鍗曞彿涓嶈兘涓虹┖");
+                that.$playSound('error');
                 that.load = false;
                 return;
             }
@@ -365,6 +378,7 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                     console.log(error);
                 });
         },
@@ -400,6 +414,7 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                     console.log(error);
                 });
             // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�

--
Gitblit v1.9.3