Browse Source

增加声音

shish 6 months ago
parent
commit
398e0ec4ef

+ 12 - 10
ghsPad/src/pages/home/components/settlePop.vue

@@ -501,9 +501,11 @@ export default {
     },
     methods: {
         viewDiscount(){
+            this.$util.hitVoice()
             this.showDiscount = true
         },
         setDiscount(num){
+            this.$util.hitVoice()
             this.discountValue = Number(num)
             let price = Number(this.totalPrice)*Number(num)
             price = parseFloat(price.toFixed(2))
@@ -511,22 +513,27 @@ export default {
             this.showDiscount = false
         },
         confirmDiff(){
+            this.$util.hitVoice()
             this.form.dealPrice = 1
             this.$refs.diffRef.close()
             this.enter()
         },
         cancelDiff(){
+            this.$util.hitVoice()
             this.$refs.diffRef.close()
         },
         diffConfirm(data){
+            this.$util.hitVoice()
             this.diffData = data
             this.$refs.diffRef.open('center')
         },
         changeShopAdminId(item){
+            this.$util.hitVoice()
             this.form.shopAdminId = item.id
             this.form.shopAdminName = item.name
         },
         changeGetStaff(item){
+            this.$util.hitVoice()
             this.form.getStaffId = item.id
             this.form.getStaffName = item.name
         },
@@ -544,6 +551,7 @@ export default {
             }
         },
         changeSendType(val){
+            this.$util.hitVoice()
             this.form.sendType = val
             if (val !== 2) {
                 this.form.sendCost = 0
@@ -788,27 +796,21 @@ export default {
                     this.form.sendType = 1; // 切换回自取
                     this.deliveryQuotes = [];
                 }
-            }).catch((err) => {
-                console.log('获取跑腿平台报价失败:', err);
-                if(err.code == 0){
-                    uni.showToast({ title: err.msg || '获取跑腿平台报价失败', icon: 'none', duration: 2500});
-                } else {
-                    uni.showToast({ title: '获取跑腿平台报价失败', icon: 'none' });
-                }
-                //this.form.sendType = 1; // 切换回自取
-                this.deliveryQuotes = [];
-            });
+            })
         },
         selectDelivery(item, index) {
+            this.$util.hitVoice()
             this.selectedDeliveryIndex = index;
             this.selectedDeliveryData = item;
             this.form.sendCost = item.priceNumber;
             this.showDistance = item.distance || 0;
         },
         openTimePicker() {
+            this.$util.hitVoice()
             this.$refs.timePicker.open();
         },
         handleTimeConfirm(time) {
+            this.$util.hitVoice()
             this.pickupTime = time;
             if (this.form.sendType == 2) {
                 this.getDeliveryQuotes();

+ 11 - 1
hdPad/src/pages/home/components/settlePop.vue

@@ -523,22 +523,27 @@ export default {
     },
     methods: {
         confirmDiff(){
+            this.$util.hitVoice()
             this.form.dealPrice = 1
             this.$refs.diffRef.close()
             this.enter()
         },
         cancelDiff(){
+            this.$util.hitVoice()
             this.form.dealPrice = 0
             this.$refs.diffRef.close()
         },
         diffConfirm(data){
+            this.$util.hitVoice()
             this.diffData = data
             this.$refs.diffRef.open('center')
         },
         viewDiscount(){
+            this.$util.hitVoice()
             this.showDiscount = true
         },
         setDiscount(num){
+            this.$util.hitVoice()
             this.discountValue = Number(num)
             let price = Number(this.totalPrice)*Number(num)
             price = parseFloat(price.toFixed(2))
@@ -546,10 +551,12 @@ export default {
             this.showDiscount = false
         },
         changeShopAdminId(item){
+            this.$util.hitVoice()
             this.form.shopAdminId = item.id
             this.form.shopAdminName = item.name
         },
         changeGetStaff(item){
+            this.$util.hitVoice()
             this.form.getStaffId = item.id
             this.form.getStaffName = item.name
         },
@@ -558,9 +565,9 @@ export default {
             this.form.getGoods = val
         },
         changeSendType(val){
+            this.$util.hitVoice()
             this.form.sendType = val
             if (val !== 2) {
-                this.$util.hitVoice()
                 this.clearDeliveryList();
             } else {
                 if (this.openIntraCity == 1) {
@@ -717,15 +724,18 @@ export default {
             })
         },
         selectDelivery(item, index) {
+            this.$util.hitVoice()
             this.selectedDeliveryIndex = index;
             this.selectedDeliveryData = item;
             this.form.sendCost = item.priceNumber;
             this.showDistance = item.distance || 0;
         },
         openTimePicker() {
+            this.$util.hitVoice()
             this.$refs.timePicker.open();
         },
         handleTimeConfirm(time) {
+            this.$util.hitVoice()
             this.pickupTime = time;
             if (this.form.sendType == 2) {
                 this.getDeliveryQuotes();