fix(voucher): 修改赠送金额显示为洗车金额并添加支付确认提示

在voucher页面中,将赠送金额的显示从"元"改为"洗车金额"以更准确描述赠送内容
在支付流程中添加确认提示框,提醒用户购买后不可退款
This commit is contained in:
2025-12-14 11:13:49 +08:00
parent 5ddd0b177b
commit 2affab534c
3 changed files with 44 additions and 38 deletions

View File

@@ -121,44 +121,51 @@ Page({
title: "请选择购买洗车金额~",
icon: "none"
}), !1;
this.isSubmit = !0, wx.showLoading({
title: ""
});
var i = this;
e.request('/miniprogram/recharge/create', {
id: i.data.selectItemID
}, !0).then(function (t) {
if (wx.hideLoading(), i.isSubmit = !1, 200 != t.code) return wx.showModal({
title: "提示",
content: t.message
}), !1;
var r = t.data.result;
wx.requestPayment({
timeStamp: r.timeStamp,
nonceStr: r.nonceStr,
package: r.package,
signType: r.signType,
paySign: r.paySign,
success: function (o) {
wx.showModal({
title: "提示",
content: "购买洗车金额后不可退,请谨慎购买",
success: function (res) {
if (!res.confirm) return !1;
i.isSubmit = !0, wx.showLoading({
title: ""
});
e.request('/miniprogram/recharge/create', {
id: i.data.selectItemID
}, !0).then(function (t) {
if (wx.hideLoading(), i.isSubmit = !1, 200 != t.code) return wx.showModal({
title: "提示",
content: t.message
}), !1;
var r = t.data.result;
wx.requestPayment({
timeStamp: r.timeStamp,
nonceStr: r.nonceStr,
package: r.package,
signType: r.signType,
paySign: r.paySign,
success: function (o) {
if (t.data.notify_url) {
// 加载回调接口
e.request(t.data.notify_url, {
orderid: t.data.orderid
}, !0).then(function (t) {
console.log('pay_success', t);
}).catch(function (t) {
console.log('pay_success', t);
});
}
if (t.data.notify_url) {
// 加载回调接口
e.request(t.data.notify_url, {
orderid: t.data.orderid
}, !0).then(function (t) {
console.log('pay_success', t);
}).catch(function (t) {
console.log('pay_success', t);
});
}
getCurrentPages().length > 1 ? wx.navigateBack({}) : wx.redirectTo({
url: "/pages/index/index"
getCurrentPages().length > 1 ? wx.navigateBack({}) : wx.redirectTo({
url: "/pages/index/index"
});
}
});
}
});
}).catch(function (t) {
wx.hideLoading(), i.isSubmit = !1;
}).catch(function (t) {
wx.hideLoading(), i.isSubmit = !1;
});
}
});
},
showprovision: function () {
@@ -172,4 +179,4 @@ Page({
approve: 1 == e
});
}
});
});