专家咨询返回和详情
This commit is contained in:
parent
cec8246940
commit
2e62e6fa6a
@ -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) {
|
||||
|
||||
@ -99,7 +99,7 @@
|
||||
<span>更多</span>
|
||||
<span @tap="cancle"
|
||||
v-if="list.orderStatus!='WAIT_PAY'&&list.orderStatus!='EVALUATED'&&list.orderStatus!='WAIT_REFUND'&&list.orderStatus!='COMPLETED'&&list.orderStatus!='RECEIVED_GOODS'&&list.orderStatus!='REFUNDED'">取消订单</span>
|
||||
|
||||
|
||||
<!-- <span@tap="evaluate" v-if="list.orderStatus=='COMPLETED'">服务评价</span> -->
|
||||
</view>
|
||||
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'" @tap='pay'>
|
||||
@ -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">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user