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/BarCf.js |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/H5/Js/BarCf.js b/H5/Js/BarCf.js
index 9f2065a..ad71d69 100644
--- a/H5/Js/BarCf.js
+++ b/H5/Js/BarCf.js
@@ -87,10 +87,13 @@
                         //that.barMessage = json.data.tbBillList.message;
                         //that.$refs.barcode.focus();
                         //that.formData.barcode = null;
+
+                        that.$playSound('success');
                         that.$refs.cfNum.focus();
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$playSound('error');
                         that.$refs.barcode.focus();
                         that.formData.barcode = null;
                     }
@@ -100,6 +103,7 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                     console.log(error);
                     that.$refs.barcode.focus();
                 });
@@ -113,10 +117,12 @@
 
             if (that.formData.cfNum * 1 <= 0) {
                 that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
+                that.$playSound('error');
                 return;
             }
             if (that.formData.barcode.length * 1 <= 0) {
                 that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+                that.$playSound('error');
                 return;
             }
             that.isLoading = true;
@@ -134,10 +140,12 @@
                         that.$refs.barcode.focus();
                         that.formData.barcode = null;
                         that.formData.cfNum = null;
+                        that.$playSound('success');
                         that.$notify({ type: 'success', message: json.message });
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$playSound('error');
                         that.$refs.cfNum.focus();
                     }
                     that.isLoading = false;
@@ -145,6 +153,7 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                     console.log(error);
                 });
         },

--
Gitblit v1.9.3