This commit is contained in:
2023-11-15 09:47:23 +08:00
parent e5d514d12f
commit 1c8404ffd8
3 changed files with 51 additions and 32 deletions

View File

@ -0,0 +1,10 @@
import request from "../../request.js"
//支付成功调取
export function pushMeg(data) {
return request({
url: `/nurseApplet/nursingOrder/pushMeg`,
method: 'get',
data
})
}

View File

@ -82,7 +82,7 @@
去评价
<!-- </view> -->
</view>
<!-- <view class="logistics harvest" @tap='Receipt(item)'
<!-- <view class="logistics harvest" @tap='Receipt(item)'
v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'&&item.orderType !='HEALTH_CONSULTATION'">
确认收货</view> -->
<!-- <view class="logistics harvest" @tap='Receipt(item)'
@ -158,11 +158,14 @@
import {
insertGoodsEvaluate,
} from '@/api/pagesB/Serviceevaluation/Serviceevaluation.js'
import {
pushMeg
} from '@/api/pagesB/ExpertlookOrder/index.js'
export default {
data() {
return {
rateval: 0,
show:true,
show: true,
evaluatenurse: false,
tabslist: [{
name: '全部',
@ -271,8 +274,8 @@
tabschange(index) {
this.tabscurrent = index;
this.orderTypeList.orderStatus = this.tabslist[index].orderStatus
if(this.orderTypeList.orderStatus=="EVALUATED"){
this.show=false
if (this.orderTypeList.orderStatus == "EVALUATED") {
this.show = false
}
// console.log(this.orderTypeList.orderStatus, '999')
// console.log(this.orderTypeList.orderType, '99')
@ -283,7 +286,7 @@
rate(item) {
if (item.orderStatus == 'COMPLETED') {
this.rateval = 0
this.show=true
this.show = true
}
this.evaluatenurse = true;
},
@ -297,8 +300,8 @@
//
golookrate(item) {
console.log(item, '555')
if(item.orderStatus=="EVALUATED"){
this.show=false
if (item.orderStatus == "EVALUATED") {
this.show = false
}
var orderNo = item.goOrderNo
lookrate(orderNo).then(res => {
@ -327,12 +330,17 @@
signType: response.data.signType,
paySign: response.data.paySign,
success: function(res) {
uni.setStorageSync("Refresh", 'Refresh')
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
duration: 1500,
url: `/pagesB/paysuccess/paysuccess?delta=${1}`
pushMeg({
orderId: item.goodsOrderId,
patientId: item.patientId
}).then(respp => {
uni.setStorageSync("Refresh", 'Refresh')
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
duration: 1500,
url: `/pagesB/paysuccess/paysuccess?delta=${1}`
})
})
},
fail: function(err) {

View File

@ -201,7 +201,7 @@
address: null,
doctorId: null,
doctorName: null,
schedulePlanDetailId:null,
schedulePlanDetailId: null,
consultationType: 'VIDEO_CONSULTATION',
problemDescription: null,
situationDescription: null,
@ -230,7 +230,7 @@
// "healthConsultationContent": '',
},
id:'',
id: '',
};
},
onLoad(options) {
@ -262,7 +262,6 @@
},
//
taptime(item, index) {
console.log(item, '8')
this.formdata.appointmentStartTime = item.starttime
this.formdata.appointmentEndTime = item.endtime
this.formdata.schedulePlanDetailId = item.schedulePlanDetailId
@ -273,7 +272,6 @@
if (this.timecurrent != index) {
this.timecurrent = index
this.timeindex = 0
// console.log(this.formdata.appointmentStartTime, '889')
this.formdata.appointmentStartTime = this.appointmentTimeList[this.timecurrent].morningList[0]
.starttime
this.formdata.appointmentEndTime = this.appointmentTimeList[this.timecurrent].morningList[0]
@ -300,7 +298,7 @@
},
//
buy() {
var that =this
var that = this
that.updatalist.hospitalPersonId = that.formdata.doctorId
that.updatalist.hospitalPersonName = that.formdata.doctorName
that.updatalist.totalPrice = that.formdata.price
@ -311,7 +309,6 @@
that.updatalist.appointmentStartTime = that.formdata.appointmentStartTime
that.updatalist.appointmentEndTime = that.formdata.appointmentEndTime
addHealthConsultationOrder(that.updatalist).then(res => {
console.log(res, '6')
res.data.payType = "WECHAT_PAY"
res.data.paymentPrice = res.data.totalPrice
res.data.openid = uni.getStorageSync('openid');
@ -325,19 +322,24 @@
signType: response.data.signType,
paySign: response.data.paySign,
success: function(res) {
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
duration: 1500,
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.redirectTo({
url: '/pagesB/paysuccess/paysuccess'
pushMeg({
orderId: item.goodsOrderId,
patientId: item.patientId
}).then(respp => {
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
duration: 1500,
})
}, 1500)
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.redirectTo({
url: '/pagesB/paysuccess/paysuccess'
})
}, 1500)
})
},
fail: function(err) {
that.$refs.uToast.show({
@ -400,7 +402,6 @@
res.data[0]?.morningList[0]?.endtime ? this.formdata.appointmentEndTime = res.data[0]
.morningList[0].endtime : ''
this.appointmentTimeList = res.data
// console.log(this.appointmentTimeList, '666')
})
},
//