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/Sctl.js | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/H5/Js/Sctl.js b/H5/Js/Sctl.js index b757f6a..7ecfce0 100644 --- a/H5/Js/Sctl.js +++ b/H5/Js/Sctl.js @@ -50,12 +50,14 @@ } 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); }); }, @@ -83,9 +85,11 @@ if (json.status == 0) { that.ItemDetail = json.data.tbBillList; that.$refs.sectionCode.focus(); + that.$playSound('success'); } else { that.$toast.fail(json.message); + that.$playSound('error'); that.$refs.billNo.focus(); that.ItemDetail = null; that.billNo = null; @@ -95,6 +99,7 @@ .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); that.$refs.billNo.focus(); that.ItemDetail = null; that.billNo = null; @@ -115,10 +120,12 @@ var json = res; if (json.status == 0) { that.depot = json.data.tbBillList; + that.$playSound('success'); that.$refs.barcode.focus(); } else { that.$toast.fail(json.message); + that.$playSound('error'); that.$refs.sectionCode.focus(); that.depotSectionCode = null; } @@ -127,6 +134,7 @@ .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); that.$refs.sectionCode.focus(); that.depotSectionCode = null; console.log(error); @@ -141,6 +149,7 @@ if (!that.billNo) { this.$toast.fail("鐢宠鍗曞彿涓嶈兘涓虹┖"); + that.$playSound('error'); that.$refs.billNo.focus(); that.isLoading = false; return; @@ -148,6 +157,7 @@ if (!that.depotSectionCode) { this.$toast.fail("搴撲綅缂栧彿涓嶈兘涓虹┖"); + that.$playSound('error'); that.$refs.sectionCode.focus(); that.depotSectionCode = null; that.isLoading = false; @@ -156,6 +166,7 @@ if (!that.barcode) { this.$toast.fail("鏉$爜缂栧彿涓嶈兘涓虹┖"); + that.$playSound('error'); that.$refs.barcode.focus(); that.barcode = null; that.isLoading = false; @@ -164,6 +175,7 @@ if (!that.userInfo.loginAccount) { this.$toast.fail(json.message); + that.$playSound('error'); return; } @@ -179,16 +191,19 @@ that.itemNo = json.data.tbBillList.itemNo; that.sms = json.data.tbBillList.num; + that.$playSound('success'); that.$notify({ type: 'success', message: '鎵弿鎴愬姛' }); } 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); }); }, -- Gitblit v1.9.3