Initial commit

This commit is contained in:
sjk
2025-11-17 13:32:54 +08:00
commit e788eab6eb
1659 changed files with 171560 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
Page({
data: {
totalPaid: 0,
orderNo: '',
groupId: '',
groupon: null,
spu: null,
adUrl: '',
},
onLoad(options) {
const { totalPaid = 0, orderNo = '', groupId = '' } = options;
this.setData({
totalPaid,
orderNo,
groupId,
});
},
onTapReturn(e) {
const target = e.currentTarget.dataset.type;
const { orderNo } = this.data;
if (target === 'home') {
wx.switchTab({ url: '/pages/home/home' });
} else if (target === 'orderList') {
wx.navigateTo({
url: `/pages/order/order-list/index?orderNo=${orderNo}`,
});
} else if (target === 'order') {
console.log('🔄 [支付结果] 跳转到订单详情,订单号:', orderNo);
// 跳转到订单详情页面,并设置刷新标志
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
wx.navigateTo({
url: `/pages/order/order-detail/index?orderNo=${orderNo}&refresh=1`,
success: () => {
console.log('✅ [支付结果] 成功跳转到订单详情页面');
},
fail: (err) => {
console.error('❌ [支付结果] 跳转到订单详情页面失败:', err);
}
});
}
},
navBackHandle() {
wx.navigateBack();
},
});

View File

@@ -0,0 +1,9 @@
{
"navigationBarTitleText": "支付结果",
"navigationStyle": "custom",
"usingComponents": {
"t-navbar": "tdesign-miniprogram/navbar/navbar",
"t-icon": "tdesign-miniprogram/icon/icon",
"price": "/components/price/index"
}
}

View File

@@ -0,0 +1,22 @@
<t-navbar background="#ffffff" left-icon="slot" />
<view class="pay-result">
<view class="pay-status">
<t-icon name="check-circle-filled" size="60rpx" color="#47D368" />
<text>支付成功</text>
</view>
<view class="pay-money">
微信支付:
<price
wx:if="{{totalPaid}}"
price="{{totalPaid}}"
wr-class="pay-money__price"
decimalSmaller
fill
/>
</view>
<view class="btn-wrapper">
<view class="status-btn" data-type="orderList" bindtap="onTapReturn">查看订单</view>
<view class="status-btn" data-type="home" bindtap="onTapReturn">返回首页</view>
</view>
</view>

View File

@@ -0,0 +1,54 @@
.pay-result {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
.pay-result .pay-status {
margin-top: 100rpx;
font-size: 48rpx;
line-height: 72rpx;
font-weight: bold;
color: #333333;
display: flex;
align-items: center;
}
.pay-result .pay-status text {
padding-left: 12rpx;
}
.pay-result .pay-money {
color: #666666;
font-size: 28rpx;
line-height: 48rpx;
margin-top: 28rpx;
display: flex;
align-items: baseline;
}
.pay-result .pay-money .pay-money__price {
font-size: 36rpx;
line-height: 48rpx;
color: #fa4126;
}
.pay-result .btn-wrapper {
margin-top: 48rpx;
padding: 12rpx 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
box-sizing: border-box;
}
.pay-result .btn-wrapper .status-btn {
height: 88rpx;
width: 334rpx;
border-radius: 44rpx;
border: 2rpx solid #fa4126;
color: #fa4126;
font-size: 28rpx;
font-weight: bold;
line-height: 88rpx;
text-align: center;
}