专家咨询返回和详情

This commit is contained in:
闫晓茹 2023-11-02 16:54:17 +08:00
parent cec8246940
commit 2e62e6fa6a
2 changed files with 103 additions and 98 deletions

View File

@ -2,7 +2,7 @@
<view class="app">
<u-navbar :is-back="false" :background="background" class="u-navbar">
<image src="@/static/pagesB/fanhui.png" mode="" @tap="goprevious"></image>
<view class="title" >
<view class="title">
专家咨询订单
</view>
<view class="inputs">
@ -286,9 +286,12 @@
},
//
goprevious() {
uni.navigateBack({
delta: 1
uni.navigateTo({
url: '/pages/myinformation/myinformation'
})
// uni.navigateBack({
// delta: 1
// })
},
//
golookrate(item) {

View File

@ -149,7 +149,7 @@
patientId: '',
openid: null,
orderType: 'HEALTH_CONSULTATION',
orderStatus: 'WAIT_PAY',
orderStatus: '',
// orderTypeList: [
// 'INTEGRAL_EXCHANGE',
// 'DIRECT_BUY',
@ -159,114 +159,116 @@
pageNum: 1,
goodsName: '',
},
order:[],
order: [],
}
},
onLoad(options) {
// if(options.item){
this.list = JSON.parse(options.item)
console.log(this.list, '555')
// console.log(this.list, '555')
this.orderTypeList.orderStatus = this.list.orderStatus
this.orderTypeList.goodsOrderId = this.list.goodsOrderId
// else if(options.goodsOrderId){
// this.orderTypeList.goodsOrderId = options.goodsOrderId
// let that = this
// console.log(this.orderTypeList.orderStatus, '25256')
// else if(options.goodsOrderId){
// this.orderTypeList.goodsOrderId = options.goodsOrderId
// let that = this
// }
this.orderTypeList.patientId = uni.getStorageSync('patientId');
this.orderTypeList.openid = uni.getStorageSync('openid');
// if (value && value2) {
// that.orderTypeList.patientId = value
// that.orderTypeList.openid = value2
// }
this.goodsOrderinfo()
// console.log(this.list, '99')
this.baseurl = baseurl
// }
this.orderTypeList.patientId = uni.getStorageSync('patientId');
this.orderTypeList.openid = uni.getStorageSync('openid');
// if (value && value2) {
// that.orderTypeList.patientId = value
// that.orderTypeList.openid = value2
// }
this.goodsOrderinfo()
// console.log(this.list, '99')
this.baseurl = baseurl
},
methods: {
goprevious() {
uni.navigateBack({
delta: 1
})
},
//
pay() {
var that = this
let paydata = this.list
paydata.openid = this.orderTypeList.openid
paydata.payType = "WECHAT_PAY"
paydata.paymentPrice = this.list.totalPrice
paydata.orderChannel = 'WECHAT_APPLET'
paydata.orderNo = this.list.goOrderNo
appletGoodsOrderPay(paydata).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) {
uni.setStorageSync("Refresh", 'Refresh')
that.goodsOrderinfo()
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
duration: 1500,
url: `/pagesB/paysuccess/paysuccess?delta=${2}`
})
},
fail: function(err) {
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
duration: 1500
})
}
});
} else {
that.$refs.uToast.show({
title: response.msg,
type: 'error',
duration: 1500
})
}
})
},
goodsOrderinfo() {
ssgoodsOrder(this.orderTypeList).then(
res => {
this.order = res.rows[0]
var ordertimes = this.order.orderTime.replaceAll(/\-/gi, "/")
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2)
var times = new Date().getTime() / 1000
this.timestamp = time - times
console.log(this.timestamp, '8585')
if (this.timestamp >= 0) {
this.timecount = this.timestamp
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
methods: {
goprevious() {
uni.navigateBack({
delta: 1
})
},
//
pay() {
var that = this
let paydata = this.list
paydata.openid = this.orderTypeList.openid
paydata.payType = "WECHAT_PAY"
paydata.paymentPrice = this.list.totalPrice
paydata.orderChannel = 'WECHAT_APPLET'
paydata.orderNo = this.list.goOrderNo
appletGoodsOrderPay(paydata).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) {
uni.setStorageSync("Refresh", 'Refresh')
that.goodsOrderinfo()
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
duration: 1500,
url: `/pagesB/paysuccess/paysuccess?delta=${2}`
})
},
fail: function(err) {
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
duration: 1500
})
}
});
} else {
that.$refs.uToast.show({
title: response.msg,
type: 'error',
duration: 1500
})
}
})
},
//
cancle() {
var list = this.list
uni.navigateTo({
url: `/pagesB/refundType/refundType?list=${JSON.stringify(this.list)}`
})
},
//
evaluate() {
this.evaluateshow = true;
},
goodsOrderinfo() {
// console.log(this.list.orderStatus, '444')
ssgoodsOrder(this.orderTypeList).then(
res => {
this.order = res.rows[0]
var ordertimes = this.order.orderTime.replaceAll(/\-/gi, "/")
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2)
var times = new Date().getTime() / 1000
this.timestamp = time - times
console.log(this.timestamp, '8585')
if (this.timestamp >= 0) {
this.timecount = this.timestamp
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
}
})
},
//
cancle() {
var list = this.list
uni.navigateTo({
url: `/pagesB/refundType/refundType?list=${JSON.stringify(this.list)}`
})
},
//
evaluate() {
this.evaluateshow = true;
},
},
}
}
}
</script>
<style lang="scss">