修改取消支付的信息提示
This commit is contained in:
parent
d18b452e3e
commit
08e77df1a5
@ -146,9 +146,8 @@ export default {
|
||||
|
||||
},
|
||||
fail: (payErr) => {
|
||||
console.log("支付失败", payErr)
|
||||
uni.showToast({
|
||||
title: payErr.errMsg || '支付失败',
|
||||
title: payErr.errMsg == 'requestPayment:fail cancel' ? '用户取消支付' : '支付失败',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
|
||||
@ -401,14 +401,11 @@ export default {
|
||||
|
||||
},
|
||||
fail: (payErr) => {
|
||||
console.log("支付失败", payErr)
|
||||
uni.showToast({
|
||||
title: payErr.errMsg || '支付失败',
|
||||
title: payErr.errMsg == 'requestPayment:fail cancel' ? '用户取消支付' : '支付失败',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
complete: () => {
|
||||
// 支付完成后的回调,无论成功失败都会执行
|
||||
// 支付完成后的回调,无论成功失败都会执行
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
<view class="group-price">
|
||||
<view>¥{{ item.commodity_goods_info.sales_price }}/{{
|
||||
item.commodity_goods_info.goods_unit
|
||||
}}</view>
|
||||
}}</view>
|
||||
<!-- 运费 -->
|
||||
<view class="goods-desc" style="margin-top: 10rpx;">运费 ¥{{
|
||||
item.commodity_goods_info.freight }}</view>
|
||||
@ -128,7 +128,8 @@
|
||||
<text class="name">请选择自提点</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="address-arrow"><u-icon name="arrow-right" size="25"></u-icon></view>
|
||||
<view class="address-arrow"><u-icon name="arrow-right" size="25"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="address-info" v-else>
|
||||
@ -501,14 +502,14 @@ export default {
|
||||
},
|
||||
submitPayment() {
|
||||
// 检查所有供应商是否都选择了自提点
|
||||
const supplierIds = [...new Set(this.orderList2.map(item =>
|
||||
const supplierIds = [...new Set(this.orderList2.map(item =>
|
||||
item.commodity_goods_info.group_buy_activity_info?.supplier_id || 'default'
|
||||
))];
|
||||
|
||||
|
||||
const allHaveZTAddress = supplierIds.every(supplierId => {
|
||||
const ztAddress = this.defZTAddress.find(adItem => adItem.id == supplierId);
|
||||
return !!ztAddress;
|
||||
});
|
||||
const ztAddress = this.defZTAddress.find(adItem => adItem.id == supplierId);
|
||||
return !!ztAddress;
|
||||
});
|
||||
|
||||
if (!allHaveZTAddress) {
|
||||
uni.showToast({
|
||||
@ -524,16 +525,16 @@ export default {
|
||||
goods_list: Object.keys(this.supplierGroups).map(supplierId => {
|
||||
const group = this.supplierGroups[supplierId];
|
||||
const firstItem = group[0];
|
||||
|
||||
|
||||
// 团购活动id
|
||||
this.group_buy_activity_id = firstItem.commodity_goods_info.group_buy_activity_id;
|
||||
|
||||
|
||||
// 根据供应商id获取自提点信息
|
||||
const ztAddress = this.defZTAddress.find(adItem => adItem.id == supplierId) || {};
|
||||
|
||||
|
||||
// 团购活动时间判断
|
||||
const currentTime = new Date().getTime();
|
||||
|
||||
|
||||
return {
|
||||
supplier_id: firstItem.commodity_goods_info.group_buy_activity_info.supplier_id,
|
||||
supplier_name: firstItem.supplier_name || '',
|
||||
@ -605,9 +606,8 @@ export default {
|
||||
|
||||
},
|
||||
fail: (payErr) => {
|
||||
console.log("支付失败", payErr)
|
||||
uni.showToast({
|
||||
title: payErr.errMsg || '支付失败',
|
||||
title: payErr.errMsg == 'requestPayment:fail cancel' ? '用户取消支付' : '支付失败',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user