This commit is contained in:
dzl 2025-05-15 18:10:35 +08:00
commit a6db7a14b4
3 changed files with 14 additions and 12 deletions

View File

@ -72,11 +72,13 @@
}
const handlePaymentClick = () => {
console.log('支付按钮被点击');
const params = {
"orderId": props.orderId
}
api.callPaymentApi("wxPayment/prepay", params).then(res => {
// const params = {
// "orderId": props.orderId
// }
api.callPaymentApi("wxPayment/prepay?orderId="+props.orderId, {},"get").then(res => {
if (res.code == 200) {
debugger;
wx.requestPayment({
"timeStamp": res.data.timeStamp,
"nonceStr": res.data.nonceStr,
@ -88,14 +90,14 @@
checkPaymentStatus();
},
"fail": function(res) {
showModelMessage("支付失败")
console.log("fail", res)
},
"complete": function(res) {
showModelMessage("支付失败")
console.log("complete",res)
}
})
}else{
showModelMessage("支付失败")
showModelMessage("支付失败")
}
})
}

View File

@ -31,9 +31,9 @@
<view class="button-with-border" @click="gotoRefundRequest">
申请退款
</view>
<view class="button-with-border">
<!-- <view class="button-with-border">
已关锁仍计费
</view>
</view> -->
</view>
</view>

View File

@ -52,7 +52,7 @@
"orderId": orderId.value,
"reason": reason.value
}
api.callPaymentApi("wxPayment/refund", params).then(res => {
api.callPaymentApi("wxPayment/refundApply", params).then(res => {
if (res.code == 200) {
// 退
uni.showToast({