feat: 订单加贡献值

This commit is contained in:
2026-09-11 19:13:31 +08:00
parent 75bbbf9089
commit 9b09d6469d
9 changed files with 808 additions and 364 deletions
+180 -1
View File
@@ -285,6 +285,55 @@
</view>
</up-popup>
<!-- 确认收货成功弹窗 -->
<up-popup :show="receiptSuccessShow" mode="center" :round="16" :closeOnClickOverlay="true"
@close="receiptSuccessShow = false">
<view class="receipt_success_popup">
<!-- 顶部对勾图标与标题 -->
<image class="receipt_icon_img" src="https://static.tbmall.xin/static/mine-purse/icon_arrow_black_3.png"
mode="aspectFit"></image>
<view class="receipt_title">收货成功</view>
<!-- 贡献值 -->
<view class="receipt_item_group">
<view class="receipt_row">
<text class="receipt_label">贡献值</text>
<text class="receipt_value">+{{ receiptOrderItem.expendNum || 0 }}</text>
</view>
<view class="receipt_row sub_row" @click="goToPurse">
<text class="receipt_sub_text">可在【我的-钱包】中查看</text>
<view class="receipt_action">
<text class="action_text">去查看</text>
<u-icon name="arrow-right" size="12" color="#808080"></u-icon>
</view>
</view>
</view>
<view class="receipt_divider"></view>
<!-- 抽奖次数 -->
<view class="receipt_item_group">
<view class="receipt_row">
<text class="receipt_label">抽奖次数</text>
<text class="receipt_value">+{{ receiptOrderItem.raffleNum || 0 }}次</text>
</view>
<view class="receipt_row sub_row" @click="goToLottery">
<text class="receipt_sub_text">可在【首页-抽奖】中参与</text>
<view class="receipt_action">
<text class="action_text">去查看</text>
<u-icon name="arrow-right" size="12" color="#808080"></u-icon>
</view>
</view>
</view>
<!-- 底部确定按钮 -->
<view class="receipt_confirm_btn" @click="receiptSuccessShow = false">
确定
</view>
</view>
</up-popup>
<!-- 腾讯电子签H5 → 集成到UniApp -->
<web-view v-if="signUrl" :src="signUrl" @message="handleMessage"></web-view>
@@ -427,7 +476,9 @@ export default {
deleteShow: false,
deleteInfo: {},
mpWarpStyle: {},
mpHeaderStyle: {}
mpHeaderStyle: {},
receiptSuccessShow: false, // 确认收货成功弹窗
receiptOrderItem: {}, // 确认收货的当前订单对象
};
},
onLoad(options) {
@@ -845,6 +896,7 @@ export default {
content: "是否确认收货?",
success: function (res) {
if (res.confirm) {
console.log("是否确认收货?", item)
then.confirmReceiptFun(item);
}
},
@@ -856,6 +908,8 @@ export default {
};
const resp = await confirmReceipt(params);
if (resp && resp.bizcode === 100) {
this.receiptOrderItem = item;
this.receiptSuccessShow = true;
this.orderList = [];
this.form.page = 1;
this.loadData();
@@ -866,6 +920,28 @@ export default {
}
}
},
goToPurse() {
this.receiptSuccessShow = false;
uni.navigateTo({
url: '/pages/mine_package/mine_purse/mine_purse',
fail: () => {
uni.navigateTo({
url: 'pages/mine_package/mine_purse/mine_purse',
});
}
});
},
goToLottery() {
this.receiptSuccessShow = false;
uni.navigateTo({
url: '/pages/other_package/nine-grid/nine-grid',
fail: () => {
uni.navigateTo({
url: 'pages/other_package/nine-grid/nine-grid',
});
}
});
},
// 判断是否已经签名
async checkSigned() {
@@ -1351,4 +1427,107 @@ export default {
text-align: center;
}
}
/* 确认收货成功弹窗高保真样式 */
.receipt_success_popup {
width: 580rpx;
background: #ffffff;
border-radius: 32rpx;
padding: 48rpx 36rpx 40rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
.receipt_icon_img {
width: 96rpx;
height: 96rpx;
}
.receipt_title {
font-size: 34rpx;
font-weight: bold;
color: #111111;
margin-top: 20rpx;
margin-bottom: 36rpx;
line-height: 1.4;
}
.receipt_item_group {
width: 100%;
display: flex;
flex-direction: column;
.receipt_row {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.receipt_label {
font-size: 30rpx;
font-weight: bold;
color: #111111;
line-height: 1.4;
}
.receipt_value {
font-size: 32rpx;
font-weight: bold;
color: #7934f6;
line-height: 1.4;
}
}
.sub_row {
margin-top: 10rpx;
.receipt_sub_text {
font-size: 24rpx;
color: #666666;
line-height: 1.4;
}
.receipt_action {
display: flex;
flex-direction: row;
align-items: center;
cursor: pointer;
.action_text {
font-size: 24rpx;
color: #666666;
margin-right: 4rpx;
}
}
}
}
.receipt_divider {
width: 100%;
height: 1rpx;
background: #f0f0f0;
margin: 24rpx 0;
}
.receipt_confirm_btn {
width: 100%;
height: 80rpx;
background: #7934f6;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: #ffffff;
font-weight: 500;
margin-top: 40rpx;
cursor: pointer;
transition: opacity 0.15s ease;
&:active {
opacity: 0.85;
}
}
}
</style>