diff --git a/pages/appointmenttime/appointmenttime.vue b/pages/appointmenttime/appointmenttime.vue index 223e41c..d339b59 100644 --- a/pages/appointmenttime/appointmenttime.vue +++ b/pages/appointmenttime/appointmenttime.vue @@ -248,79 +248,79 @@ console.log(this.orderlist) this.orderlist.consumableTotalPrice = null this.orderlist.orderChannel = 'WECHAT_APPLET' - // if (this.radio == 1) { - // this.$refs.uToast.show({ - // title: '请阅读用户协议并同意', - // type: 'error', - // }) - // } else { - // this.orderlist.orderCount = 1; - // this.orderlist.orderConsumableList = [] - // if (this.orderlist.itemConsumableList) { - // this.orderlist.itemConsumableList.forEach(e => { - // if (e.radio) { - // this.orderlist.orderConsumableList.push(e) - // } - // }) - // } - // this.orderlist.afternoonOpenEndTime = this.orderlist.afternoonOpenEndTime.slice(0, 5) - // this.orderlist.afternoonOpenStartTime = this.orderlist.afternoonOpenStartTime.slice(0, 5) - // this.orderlist.morningOpenEndTime = this.orderlist.morningOpenEndTime.slice(0, 5) - // this.orderlist.morningOpenStartTime = this.orderlist.morningOpenStartTime.slice(0, 5) - // this.orderlist.patientId = this.patientId - // this.orderlist.serviceAddress = this.personInfo.areaName + this.personInfo.address - // submitAppointment(this.orderlist).then(res => { - // if (res.code == 500) { - // that.$refs.uToast.show({ - // title: res.msg, - // type: 'error', - // }) - // } else if (res.code == 200) { - // let obj = { - // patientId: res.data.patientId, - // openid: that.openid, - // orderNo: res.data.orderNo, - // orderChannel: res.data.orderChannel, - // paymentPrice: res.data.totalPrice, - // payType: "WECHAT_PAY", - // buySource: "NURSE_STATION", - // } - // appletAppointmentOrderPay(obj).then(response => { - // if (response.code == 200) { - // uni.requestPayment({ - // timeStamp: response.data.timeStamp, - // nonceStr: response.data.nonceStr, - // package: response.data.prepayId, - // signType: response.data.signType, - // paySign: response.data.paySign, - // success: function(res) { - // that.$refs.uToast.show({ - // title: '预约成功', - // type: 'success', - // duration: 1500, - // url: `/pages/paysuccess/paysuccess` - // }) - // }, - // fail: function(err) { - // that.$refs.uToast.show({ - // title: '取消预约', - // type: 'error', - // duration: 1500, - // url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}` - // }) - // } - // }); - // } else { - // that.$refs.uToast.show({ - // title: response.msg, - // type: 'error', - // duration: 2000 - // }) - // } - // }) - // } - // }) - // } + if (this.radio == 1) { + this.$refs.uToast.show({ + title: '请阅读用户协议并同意', + type: 'error', + }) + } else { + this.orderlist.orderCount = 1; + this.orderlist.orderConsumableList = [] + if (this.orderlist.itemConsumableList) { + this.orderlist.itemConsumableList.forEach(e => { + if (e.radio) { + this.orderlist.orderConsumableList.push(e) + } + }) + } + this.orderlist.afternoonOpenEndTime = this.orderlist.afternoonOpenEndTime.slice(0, 5) + this.orderlist.afternoonOpenStartTime = this.orderlist.afternoonOpenStartTime.slice(0, 5) + this.orderlist.morningOpenEndTime = this.orderlist.morningOpenEndTime.slice(0, 5) + this.orderlist.morningOpenStartTime = this.orderlist.morningOpenStartTime.slice(0, 5) + this.orderlist.patientId = this.patientId + this.orderlist.serviceAddress = this.personInfo.areaName + this.personInfo.address + submitAppointment(this.orderlist).then(res => { + if (res.code == 500) { + that.$refs.uToast.show({ + title: res.msg, + type: 'error', + }) + } else if (res.code == 200) { + let obj = { + patientId: res.data.patientId, + openid: that.openid, + orderNo: res.data.orderNo, + orderChannel: res.data.orderChannel, + paymentPrice: res.data.totalPrice, + payType: "WECHAT_PAY", + buySource: "NURSE_STATION", + } + appletAppointmentOrderPay(obj).then(response => { + if (response.code == 200) { + uni.requestPayment({ + timeStamp: response.data.timeStamp, + nonceStr: response.data.nonceStr, + package: response.data.prepayId, + signType: response.data.signType, + paySign: response.data.paySign, + success: function(res) { + that.$refs.uToast.show({ + title: '预约成功', + type: 'success', + duration: 1500, + url: `/pages/paysuccess/paysuccess` + }) + }, + fail: function(err) { + that.$refs.uToast.show({ + title: '取消预约', + type: 'error', + duration: 1500, + url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}` + }) + } + }); + } else { + that.$refs.uToast.show({ + title: response.msg, + type: 'error', + duration: 2000 + }) + } + }) + } + }) + } }, changeRadio() { if (this.radio == 1) { diff --git a/pages/customerservice/customerservice.vue b/pages/customerservice/customerservice.vue index d7a85a0..9b48a32 100644 --- a/pages/customerservice/customerservice.vue +++ b/pages/customerservice/customerservice.vue @@ -17,11 +17,11 @@ diff --git a/static/kefuzx.jpg b/static/kefuzx.jpg index a58914c..f749fc5 100644 Binary files a/static/kefuzx.jpg and b/static/kefuzx.jpg differ