|
|
|
|
@ -6,7 +6,8 @@
|
|
|
|
|
*/
|
|
|
|
|
import {
|
|
|
|
|
ref,
|
|
|
|
|
onMounted
|
|
|
|
|
onMounted,
|
|
|
|
|
inject
|
|
|
|
|
} from 'vue'
|
|
|
|
|
import {
|
|
|
|
|
$api,
|
|
|
|
|
@ -15,7 +16,7 @@
|
|
|
|
|
import {
|
|
|
|
|
onShow
|
|
|
|
|
} from '@dcloudio/uni-app'
|
|
|
|
|
import wx from 'weixin-js-sdk'
|
|
|
|
|
import wx from 'weixin-js-sdk'
|
|
|
|
|
const $props = defineProps({
|
|
|
|
|
info: {
|
|
|
|
|
type: Object,
|
|
|
|
|
@ -52,24 +53,45 @@ import wx from 'weixin-js-sdk'
|
|
|
|
|
order_info.value.status = 3
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const StartPay=async(id)=>{//继续支付
|
|
|
|
|
const StartPay = async (id) => { //继续支付
|
|
|
|
|
uni.showLoading()
|
|
|
|
|
const response = await $api('StartPay' ,{
|
|
|
|
|
const response = await $api('StartPay', {
|
|
|
|
|
openid: localStorage.getItem('OPENID'),
|
|
|
|
|
id: id,
|
|
|
|
|
})
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
$response(response, () => {
|
|
|
|
|
if(response.status){
|
|
|
|
|
let info=response.data.info
|
|
|
|
|
let p='&appid='+info.appid+'&sub_org_code='+info.sub_org_code+'&ghzid='+info.ghzid+'&orderid='+info.orderid+'&order_desc='+info.order_desc+'&amount='+info.amount+'¬ify_url='+info.notify_url+'×tamp='+info.timestamp+'&nonce='+info.nonce+'&signature='+info.signature;
|
|
|
|
|
if (response.status) {
|
|
|
|
|
let info = response.data.info
|
|
|
|
|
let p = '&appid=' + info.appid + '&sub_org_code=' + info.sub_org_code + '&ghzid=' + info
|
|
|
|
|
.ghzid + '&orderid=' + info.orderid + '&order_desc=' + info.order_desc + '&amount=' +
|
|
|
|
|
info.amount + '¬ify_url=' + info.notify_url + '×tamp=' + info.timestamp +
|
|
|
|
|
'&nonce=' + info.nonce + '&signature=' + info.signature;
|
|
|
|
|
console.log(p);
|
|
|
|
|
wx.miniProgram.navigateTo({
|
|
|
|
|
url: '/pages/other/entry/index?path=/pages/physical-examination/payment/index'+p
|
|
|
|
|
url: '/pages/other/entry/index?path=/pages/physical-examination/payment/index' +
|
|
|
|
|
p
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const ReLoadOrderList = inject('ReLoadOrderList');
|
|
|
|
|
const Refound = async (id) => {
|
|
|
|
|
uni.showLoading()
|
|
|
|
|
const response = await $api('Refund', {
|
|
|
|
|
openid: localStorage.getItem('OPENID'),
|
|
|
|
|
id: id,
|
|
|
|
|
})
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
$response(response, () => {
|
|
|
|
|
if (response.status) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '退款完成'
|
|
|
|
|
});
|
|
|
|
|
ReLoadOrderList("orderUpdate");
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
deepInfo()
|
|
|
|
|
@ -136,9 +158,12 @@ import wx from 'weixin-js-sdk'
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="order_pay_button_wrapper">
|
|
|
|
|
<view v-if="[1].includes(order_info.status)" @click="StartPay(order_info.id)" class="button_item_wrapper pay_button_wrapper">继续付款</view>
|
|
|
|
|
<view v-if="[2].includes(order_info.status)" class="button_item_wrapper change_button_wrapper">改约</view>
|
|
|
|
|
<view v-if="[2].includes(order_info.status)" class="button_item_wrapper refund_button_wrapper">退款</view>
|
|
|
|
|
<view v-if="[1].includes(order_info.status)" @click="StartPay(order_info.id)"
|
|
|
|
|
class="button_item_wrapper pay_button_wrapper">继续付款</view>
|
|
|
|
|
<view v-if="[2].includes(order_info.status)" class="button_item_wrapper change_button_wrapper">
|
|
|
|
|
改约</view>
|
|
|
|
|
<view v-if="[2].includes(order_info.status)" @click="Refound(order_info.id)"
|
|
|
|
|
class="button_item_wrapper refund_button_wrapper">退款</view>
|
|
|
|
|
<view v-if="[4].includes(order_info.status) && order_info.report"
|
|
|
|
|
class="button_item_wrapper report_button_wrapper">
|
|
|
|
|
查看报告
|
|
|
|
|
@ -232,7 +257,7 @@ import wx from 'weixin-js-sdk'
|
|
|
|
|
line-height: 1;
|
|
|
|
|
margin-top: 28rpx;
|
|
|
|
|
text-align: right;
|
|
|
|
|
margin-right: 30rpx;
|
|
|
|
|
margin-right: 30rpx;
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|