feat: 订单加贡献值
This commit is contained in:
@@ -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>
|
||||
@@ -178,6 +178,16 @@
|
||||
<view class="item_title">下单时间</view>
|
||||
<view class="item_value">{{ formatDate(orderInfo.ctdate) }}</view>
|
||||
</view>
|
||||
|
||||
<view class="data_item">
|
||||
<view class="item_title">预估获得贡献值</view>
|
||||
<view class="item_value">
|
||||
<image class="coin_icon" src="https://static.tbmall.xin/static/mine-purse/vcoin_1.png"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
<text class="value_num">{{ orderInfo.expendNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="code_content" v-if="orderInfo.antChainHash">
|
||||
@@ -261,6 +271,55 @@
|
||||
<view class="popup_but" @click="wayShow = false"> 确认 </view>
|
||||
</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">+{{ orderInfo.expendNum }}</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">+{{ orderInfo.raffleNum }}次</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>
|
||||
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
<QrcodePreview ref="qrcodePreviewRef" :qrcodeVal="qrcodeVal" />
|
||||
<qiaobao-assistant page-key="pages/mine_package/mine_order_info/mine_order_info" title="订单详情" />
|
||||
@@ -320,7 +379,10 @@ export default {
|
||||
isShowBalance: false,
|
||||
qrcodeVal: '',
|
||||
returnType: 1,
|
||||
isExpandExpress: false
|
||||
isExpandExpress: false,
|
||||
receiptSuccessShow: false, // 确认收货成功弹窗
|
||||
expendNum: 0, // 贡献值
|
||||
raffleNum: 0, // 抽奖次数
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -413,49 +475,49 @@ export default {
|
||||
if (this._paySubmitting) return;
|
||||
this._paySubmitting = true;
|
||||
try {
|
||||
const payway = this.wayForm.payway;
|
||||
if (!payway || payway === 0) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "请先选择支付方式",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
id: this.orderInfo.id,
|
||||
payway,
|
||||
};
|
||||
if (!await prepareDouyinPay(payway)) return;
|
||||
const resp = await payment(params);
|
||||
// 提交订单成功,就唤起支付
|
||||
if (resp && resp.bizcode === 100) {
|
||||
const item = resp.data;
|
||||
if (item.status === 1) {
|
||||
jumpWayOk();
|
||||
return;
|
||||
}
|
||||
if (item.douyin) {
|
||||
await appDypayFun(item);
|
||||
} else if (item.wechat && Object.keys(item.wechat).length !== 0) {
|
||||
this.appWxpay(item.wechat, item.orderId, item.orderNum);
|
||||
} else if (
|
||||
item.alipay &&
|
||||
Object.keys(item.alipay).length !== 0 &&
|
||||
item.alipay
|
||||
) {
|
||||
this.zfbPay(item.alipay, item.orderId, item.orderNum);
|
||||
} else {
|
||||
const payway = this.wayForm.payway;
|
||||
if (!payway || payway === 0) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "订单支付失败",
|
||||
message: "请先选择支付方式",
|
||||
});
|
||||
setTimeout(() => {
|
||||
jumpWayError();
|
||||
}, 2000);
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
id: this.orderInfo.id,
|
||||
payway,
|
||||
};
|
||||
if (!await prepareDouyinPay(payway)) return;
|
||||
const resp = await payment(params);
|
||||
// 提交订单成功,就唤起支付
|
||||
if (resp && resp.bizcode === 100) {
|
||||
const item = resp.data;
|
||||
if (item.status === 1) {
|
||||
jumpWayOk();
|
||||
return;
|
||||
}
|
||||
if (item.douyin) {
|
||||
await appDypayFun(item);
|
||||
} else if (item.wechat && Object.keys(item.wechat).length !== 0) {
|
||||
this.appWxpay(item.wechat, item.orderId, item.orderNum);
|
||||
} else if (
|
||||
item.alipay &&
|
||||
Object.keys(item.alipay).length !== 0 &&
|
||||
item.alipay
|
||||
) {
|
||||
this.zfbPay(item.alipay, item.orderId, item.orderNum);
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "订单支付失败",
|
||||
});
|
||||
setTimeout(() => {
|
||||
jumpWayError();
|
||||
}, 2000);
|
||||
}
|
||||
} else {
|
||||
this.getOrderInfo();
|
||||
}
|
||||
} else {
|
||||
this.getOrderInfo();
|
||||
}
|
||||
} catch (error) {
|
||||
uni.showToast({ title: error.message || error.msg || '支付请求失败,请查看订单后重试', icon: 'none' });
|
||||
} finally { this._paySubmitting = false; }
|
||||
@@ -509,11 +571,38 @@ export default {
|
||||
};
|
||||
const resp = await confirmReceipt(params);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
this.orderList = [];
|
||||
this.form.page = 1;
|
||||
this.loadData();
|
||||
if (resp.data) {
|
||||
if (resp.data.expendNum !== undefined) this.expendNum = resp.data.expendNum;
|
||||
if (resp.data.raffleNum !== undefined) this.raffleNum = resp.data.raffleNum;
|
||||
if (resp.data.contribution !== undefined) this.expendNum = resp.data.contribution;
|
||||
if (resp.data.drawCount !== undefined) this.raffleNum = resp.data.drawCount;
|
||||
}
|
||||
this.receiptSuccessShow = true;
|
||||
this.getOrderInfo();
|
||||
}
|
||||
},
|
||||
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',
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 去充值
|
||||
*/
|
||||
@@ -775,6 +864,15 @@ export default {
|
||||
line-height: 60rpx;
|
||||
font-weight: bold;
|
||||
font-size: 24rpx;
|
||||
|
||||
}
|
||||
|
||||
.coin_icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
|
||||
}
|
||||
|
||||
.item_title {
|
||||
@@ -784,6 +882,7 @@ export default {
|
||||
.item_value {
|
||||
color: #1a1a1a;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.order_way_warp {
|
||||
@@ -882,4 +981,107 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 确认收货成功弹窗高保真样式 */
|
||||
.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>
|
||||
|
||||
@@ -163,7 +163,7 @@ export default {
|
||||
vcoin: {
|
||||
subTitle: "数字积分:",
|
||||
detail:
|
||||
"根据贡献值按照比例进行转换获得1. 商城贡献值10W内的贡献值1:1转换成数字积分2. 商城贡献值10W外的根据数字积分数量和总贡献值及贡献值占比进行获得。",
|
||||
"根据贡献值按照比例进行转换获得\n1. 商城贡献值10W内的贡献值1:1转换成数字积分\n2. 商城贡献值10W外的根据数字积分数量和总贡献值及贡献值占比进行获得。",
|
||||
},
|
||||
rights: {
|
||||
subTitle: "消费者权益:",
|
||||
|
||||
Reference in New Issue
Block a user