修改
This commit is contained in:
parent
6661204c68
commit
62e3022dc3
12
pages.json
12
pages.json
@ -322,9 +322,17 @@
|
||||
"path": "pages/Healthitem/Healthitem",
|
||||
"style": {
|
||||
"navigationBarTitleText": "健康常识",
|
||||
"enablePullDownRefresh": false
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/customerservice/customerservice",
|
||||
"style": {
|
||||
"navigationBarTitleText": "在线客服",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
@ -22,13 +22,13 @@
|
||||
<view class="timeyear">
|
||||
<view class="toptext">
|
||||
<view :class="Soonerorlater=='morning'?'Soonerorlaterclass':'Soonerorlater'"
|
||||
@tap="Soonerorlater='morning'">
|
||||
@tap="tapSoonerorlater('morning')">
|
||||
上午
|
||||
</view>
|
||||
<view class="">
|
||||
</view>
|
||||
<view :class="Soonerorlater=='after'?'Soonerorlaterclass':'Soonerorlater'"
|
||||
@tap="Soonerorlater='after'">
|
||||
@tap="tapSoonerorlater('after')">
|
||||
下午
|
||||
</view>
|
||||
</view>
|
||||
@ -187,6 +187,16 @@
|
||||
this.userinfo();
|
||||
},
|
||||
methods: {
|
||||
//切换上下午
|
||||
tapSoonerorlater(item) {
|
||||
this.Soonerorlater = item
|
||||
this.timeindex = 0
|
||||
if (item == 'morning') {
|
||||
this.orderlist.serviceStartTime = this.orderlist.appointmentTimeList[0].morningList[0]
|
||||
} else if (item == 'after') {
|
||||
this.orderlist.serviceStartTime = this.orderlist.appointmentTimeList[0].afternoonList[0]
|
||||
}
|
||||
},
|
||||
//选择时间
|
||||
taptime(item, index) {
|
||||
this.orderlist.serviceStartTime = item
|
||||
@ -236,81 +246,82 @@
|
||||
//确认预约
|
||||
updata() {
|
||||
var that = this
|
||||
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) {
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
</view>
|
||||
<view class="Welfarecustomerservice">
|
||||
<image src="../../static/fuli.png" mode=""></image>
|
||||
<image src="../../static/kefu.png" mode=""></image>
|
||||
<image src="../../static/kefu.png" mode="" @tap='gocustomerservice'></image>
|
||||
</view>
|
||||
<view class="Healthknowledge">
|
||||
<view class="title">
|
||||
@ -121,6 +121,12 @@
|
||||
url: '/pages/medicine/medicine'
|
||||
})
|
||||
},
|
||||
//跳转客服
|
||||
gocustomerservice() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/customerservice/customerservice'
|
||||
})
|
||||
},
|
||||
//跳转护理站页面
|
||||
gosite() {
|
||||
uni.navigateTo({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user