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
});
}
});
});

View File

@@ -30,7 +30,7 @@
<view class="edition1-list">
<view bindtap="selectItem" class="{{selectItemID==item.id?item.special?'edition1-item edition1-select active':'edition1-item active':item.special?'edition1-item edition1-select':'edition1-item'}}" data-id="{{item.id}}" wx:for="{{list}}" wx:key="index">
<view class="now">{{item.paymentamount}}元</view>
<view class="origin">赠送{{item.bonusamount*1}}</view>
<view class="origin">赠送{{item.bonusamount*1}}洗车金额</view>
</view>
<view></view>
<view></view>

View File

@@ -1,6 +1,5 @@
<view class="service-tel">
<!-- <view>=客服电话=</view>
<view bindtap="callUs">{{tel}}</view> -->
<button class="service-tel" open-type="contact" show-message-card="true">联系客服</button>
<!-- <button class="service-tel" open-type="contact" show-message-card="true">联系客服</button> -->
</view>