Revert "feat: 新增商品详情搭配优惠组件和客服弹窗"

This reverts commit 95eed74b96.
This commit is contained in:
2026-01-03 16:39:19 +08:00
parent 95eed74b96
commit ad4e2228a6
68 changed files with 2037 additions and 1198 deletions

View File

@@ -118,47 +118,54 @@ Page({
icon: "none"
}), !1;
if (!this.data.selectItemID || this.isSubmit) return wx.showToast({
title: "请选择充值金额~",
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

@@ -15,8 +15,7 @@
</view>
</view>
<view bindtap="tobuy" class="buy-btn" data-id="{{item.id}}">
<text decode="true">优惠
购买</text>
<text decode="true">优惠购买</text>
</view>
</view>
</view>
@@ -25,13 +24,13 @@
</block>
<block wx:if="{{edition==1}}">
<view class="edition1-money">
<view class="l">选择充值金额</view>
<view class="l">选择购买洗车金额</view>
<view class="r">余额:{{user.money}}</view>
</view>
<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="origin">{{item.paymentamount}}元购买</view>
<view class="now">{{(item.bonusamount*1+item.paymentamount*1)}}<em>洗车金</em></view>
<view class="now">{{item.paymentamount}}元</view>
<view class="origin">赠送{{item.bonusamount*1}}洗车金额</view>
</view>
<view></view>
<view></view>
@@ -41,10 +40,10 @@
<image src="/img/nocontent.png"></image>
<view>暂无相关数据</view>
</view>
<view bindtap="tobuyNow" class="tobuy-btn {{approve?'':'disabled'}}" wx:if="{{list.length>0}}">立即充值</view>
<view bindtap="tobuyNow" class="tobuy-btn {{approve?'':'disabled'}}" wx:if="{{list.length>0}}">立即购买</view>
<checkbox-group bindchange="change">
<label class="provision">
<checkbox checked value="{{approve}}"></checkbox> 充值即表示同意 <navigator class="text" url="/pages/webview/webview?url={{protocol.url}}">《{{protocol.name}}》</navigator>
<checkbox checked value="{{approve}}"></checkbox> 购买即表示同意 <navigator class="text" url="/pages/webview/webview?url={{protocol.url}}">《{{protocol.name}}》</navigator>
</label>
</checkbox-group>
<view catchtap="showprovision" class="provision-box" wx:if="{{showTips}}">

View File

@@ -59,11 +59,6 @@
margin-right: 50rpx;
}
.edition1-item .now em {
font-size: 24rpx;
padding-left: 4rpx;
}
.info .origin {
color: #999;
text-decoration: line-through;