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

refactor: 优化页面样式和交互逻辑

fix: 修复洗车券列表和详情页的数据展示问题

style: 调整用户页面按钮样式和布局

chore: 移除无用页面和代码,更新项目配置

docs: 更新单次启动页面的使用说明和注意事项

perf: 优化网络请求和数据处理逻辑

build: 更新依赖和配置文件

test: 更新测试用例以适应新功能

ci: 调整CI配置以适应新项目结构
This commit is contained in:
2026-01-03 11:26:51 +08:00
parent b80b33c81f
commit 95eed74b96
68 changed files with 1197 additions and 2036 deletions

View File

@@ -118,54 +118,47 @@ 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;
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) {
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 () {
@@ -179,4 +172,4 @@ Page({
approve: 1 == e
});
}
});
});

View File

@@ -15,7 +15,8 @@
</view>
</view>
<view bindtap="tobuy" class="buy-btn" data-id="{{item.id}}">
<text decode="true">优惠购买</text>
<text decode="true">优惠
购买</text>
</view>
</view>
</view>
@@ -24,13 +25,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="now">{{item.paymentamount}}元</view>
<view class="origin">赠送{{item.bonusamount*1}}洗车金额</view>
<view class="origin">{{item.paymentamount}}元购买</view>
<view class="now">{{(item.bonusamount*1+item.paymentamount*1)}}<em>洗车金</em></view>
</view>
<view></view>
<view></view>
@@ -40,10 +41,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,6 +59,11 @@
margin-right: 50rpx;
}
.edition1-item .now em {
font-size: 24rpx;
padding-left: 4rpx;
}
.info .origin {
color: #999;
text-decoration: line-through;