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