Explorar o código

bug: 预约页面取消选中后重新计算预约费用

zhanghui hai 1 ano
pai
achega
1d5388fa0c
Modificáronse 2 ficheiros con 8 adicións e 1 borrados
  1. 1 1
      App.vue
  2. 7 0
      orderPages/bookService/index.vue

+ 1 - 1
App.vue

@@ -84,7 +84,7 @@
                                     uni.removeStorageSync('expandParam');
                                 }
 
-                            }else {
+                             }else {
                                 uni.showModal({
                                     title: '温馨提示',
                                     content: ' 当前二维码已过期,请重新扫码',

+ 7 - 0
orderPages/bookService/index.vue

@@ -531,6 +531,13 @@
 					this.orderParam.childService = this.orderParam.childService.filter(selectServiceObject =>
 						selectServiceObject.serviceObjectId !== item.id)
 					item.select = !item.select
+
+					this.price = 0
+					for (let childService of this.orderParam.childService) {
+						this.price =  this.price * 1 + childService.fee * 1
+						this.price = this.price.toFixed(2)
+					}
+
 				} else {
 					this.$api.getServicePersonTime({
 						personId: this.serviceTeacherList[0].personId,