From 62e3022dc3fad6ea40882535ee35b0592120fab1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com>
Date: Wed, 22 Feb 2023 09:37:37 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 12 +-
pages/appointmenttime/appointmenttime.vue | 161 ++++++++++++----------
pages/homepage/homepage.vue | 8 +-
3 files changed, 103 insertions(+), 78 deletions(-)
diff --git a/pages.json b/pages.json
index 3722c11..e74c9a9 100644
--- a/pages.json
+++ b/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": {
diff --git a/pages/appointmenttime/appointmenttime.vue b/pages/appointmenttime/appointmenttime.vue
index bd0cf31..f993056 100644
--- a/pages/appointmenttime/appointmenttime.vue
+++ b/pages/appointmenttime/appointmenttime.vue
@@ -22,13 +22,13 @@
+ @tap="tapSoonerorlater('morning')">
上午
+ @tap="tapSoonerorlater('after')">
下午
@@ -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) {
diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue
index 5b509d4..eed4394 100644
--- a/pages/homepage/homepage.vue
+++ b/pages/homepage/homepage.vue
@@ -23,7 +23,7 @@
-
+
@@ -121,6 +121,12 @@
url: '/pages/medicine/medicine'
})
},
+ //跳转客服
+ gocustomerservice() {
+ uni.navigateTo({
+ url: '/pages/customerservice/customerservice'
+ })
+ },
//跳转护理站页面
gosite() {
uni.navigateTo({