专家咨询返回和详情
This commit is contained in:
parent
cec8246940
commit
2e62e6fa6a
@ -2,7 +2,7 @@
|
|||||||
<view class="app">
|
<view class="app">
|
||||||
<u-navbar :is-back="false" :background="background" class="u-navbar">
|
<u-navbar :is-back="false" :background="background" class="u-navbar">
|
||||||
<image src="@/static/pagesB/fanhui.png" mode="" @tap="goprevious"></image>
|
<image src="@/static/pagesB/fanhui.png" mode="" @tap="goprevious"></image>
|
||||||
<view class="title" >
|
<view class="title">
|
||||||
专家咨询订单
|
专家咨询订单
|
||||||
</view>
|
</view>
|
||||||
<view class="inputs">
|
<view class="inputs">
|
||||||
@ -286,9 +286,12 @@
|
|||||||
},
|
},
|
||||||
//返回上一页
|
//返回上一页
|
||||||
goprevious() {
|
goprevious() {
|
||||||
uni.navigateBack({
|
uni.navigateTo({
|
||||||
delta: 1
|
url: '/pages/myinformation/myinformation'
|
||||||
})
|
})
|
||||||
|
// uni.navigateBack({
|
||||||
|
// delta: 1
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
//查看评价
|
//查看评价
|
||||||
golookrate(item) {
|
golookrate(item) {
|
||||||
|
|||||||
@ -149,7 +149,7 @@
|
|||||||
patientId: '',
|
patientId: '',
|
||||||
openid: null,
|
openid: null,
|
||||||
orderType: 'HEALTH_CONSULTATION',
|
orderType: 'HEALTH_CONSULTATION',
|
||||||
orderStatus: 'WAIT_PAY',
|
orderStatus: '',
|
||||||
// orderTypeList: [
|
// orderTypeList: [
|
||||||
// 'INTEGRAL_EXCHANGE',
|
// 'INTEGRAL_EXCHANGE',
|
||||||
// 'DIRECT_BUY',
|
// 'DIRECT_BUY',
|
||||||
@ -159,114 +159,116 @@
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
goodsName: '',
|
goodsName: '',
|
||||||
},
|
},
|
||||||
order:[],
|
order: [],
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// if(options.item){
|
// if(options.item){
|
||||||
this.list = JSON.parse(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
|
this.orderTypeList.goodsOrderId = this.list.goodsOrderId
|
||||||
|
// console.log(this.orderTypeList.orderStatus, '25256')
|
||||||
// else if(options.goodsOrderId){
|
// else if(options.goodsOrderId){
|
||||||
// this.orderTypeList.goodsOrderId = options.goodsOrderId
|
// this.orderTypeList.goodsOrderId = options.goodsOrderId
|
||||||
// let that = this
|
// let that = this
|
||||||
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
this.orderTypeList.patientId = uni.getStorageSync('patientId');
|
this.orderTypeList.patientId = uni.getStorageSync('patientId');
|
||||||
this.orderTypeList.openid = uni.getStorageSync('openid');
|
this.orderTypeList.openid = uni.getStorageSync('openid');
|
||||||
// if (value && value2) {
|
// if (value && value2) {
|
||||||
// that.orderTypeList.patientId = value
|
// that.orderTypeList.patientId = value
|
||||||
// that.orderTypeList.openid = value2
|
// that.orderTypeList.openid = value2
|
||||||
// }
|
// }
|
||||||
this.goodsOrderinfo()
|
this.goodsOrderinfo()
|
||||||
// console.log(this.list, '99')
|
// console.log(this.list, '99')
|
||||||
this.baseurl = baseurl
|
this.baseurl = baseurl
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goprevious() {
|
|
||||||
uni.navigateBack({
|
|
||||||
delta: 1
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//支付
|
methods: {
|
||||||
pay() {
|
goprevious() {
|
||||||
var that = this
|
uni.navigateBack({
|
||||||
let paydata = this.list
|
delta: 1
|
||||||
paydata.openid = this.orderTypeList.openid
|
})
|
||||||
paydata.payType = "WECHAT_PAY"
|
},
|
||||||
paydata.paymentPrice = this.list.totalPrice
|
//支付
|
||||||
paydata.orderChannel = 'WECHAT_APPLET'
|
pay() {
|
||||||
paydata.orderNo = this.list.goOrderNo
|
var that = this
|
||||||
appletGoodsOrderPay(paydata).then(response => {
|
let paydata = this.list
|
||||||
if (response.code == 200) {
|
paydata.openid = this.orderTypeList.openid
|
||||||
uni.requestPayment({
|
paydata.payType = "WECHAT_PAY"
|
||||||
timeStamp: response.data.timeStamp,
|
paydata.paymentPrice = this.list.totalPrice
|
||||||
nonceStr: response.data.nonceStr,
|
paydata.orderChannel = 'WECHAT_APPLET'
|
||||||
package: response.data.prepayId,
|
paydata.orderNo = this.list.goOrderNo
|
||||||
signType: response.data.signType,
|
appletGoodsOrderPay(paydata).then(response => {
|
||||||
paySign: response.data.paySign,
|
if (response.code == 200) {
|
||||||
success: function(res) {
|
uni.requestPayment({
|
||||||
uni.setStorageSync("Refresh", 'Refresh')
|
timeStamp: response.data.timeStamp,
|
||||||
that.goodsOrderinfo()
|
nonceStr: response.data.nonceStr,
|
||||||
that.$refs.uToast.show({
|
package: response.data.prepayId,
|
||||||
title: '支付成功',
|
signType: response.data.signType,
|
||||||
type: 'success',
|
paySign: response.data.paySign,
|
||||||
duration: 1500,
|
success: function(res) {
|
||||||
url: `/pagesB/paysuccess/paysuccess?delta=${2}`
|
uni.setStorageSync("Refresh", 'Refresh')
|
||||||
})
|
that.goodsOrderinfo()
|
||||||
},
|
that.$refs.uToast.show({
|
||||||
fail: function(err) {
|
title: '支付成功',
|
||||||
that.$refs.uToast.show({
|
type: 'success',
|
||||||
title: '取消支付',
|
duration: 1500,
|
||||||
type: 'error',
|
url: `/pagesB/paysuccess/paysuccess?delta=${2}`
|
||||||
duration: 1500
|
})
|
||||||
})
|
},
|
||||||
}
|
fail: function(err) {
|
||||||
});
|
that.$refs.uToast.show({
|
||||||
} else {
|
title: '取消支付',
|
||||||
that.$refs.uToast.show({
|
type: 'error',
|
||||||
title: response.msg,
|
duration: 1500
|
||||||
type: 'error',
|
})
|
||||||
duration: 1500
|
}
|
||||||
})
|
});
|
||||||
}
|
} else {
|
||||||
})
|
that.$refs.uToast.show({
|
||||||
},
|
title: response.msg,
|
||||||
goodsOrderinfo() {
|
type: 'error',
|
||||||
ssgoodsOrder(this.orderTypeList).then(
|
duration: 1500
|
||||||
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)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 取消订单
|
goodsOrderinfo() {
|
||||||
cancle() {
|
// console.log(this.list.orderStatus, '444')
|
||||||
var list = this.list
|
ssgoodsOrder(this.orderTypeList).then(
|
||||||
uni.navigateTo({
|
res => {
|
||||||
url: `/pagesB/refundType/refundType?list=${JSON.stringify(this.list)}`
|
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
|
||||||
evaluate() {
|
this.timestamp = time - times
|
||||||
this.evaluateshow = true;
|
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>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user