修改易购订单立即支付传值逻辑
This commit is contained in:
parent
fabfcd5300
commit
cdb74c3aa6
@ -371,21 +371,28 @@ export default {
|
|||||||
user_id: uni.getStorageSync('userId'),
|
user_id: uni.getStorageSync('userId'),
|
||||||
// 先判断shopCarList数据中是否包含isAdver且为true
|
// 先判断shopCarList数据中是否包含isAdver且为true
|
||||||
order_cate: this.carList.some(item => item.isAdver === true) ? 3 : 1,
|
order_cate: this.carList.some(item => item.isAdver === true) ? 3 : 1,
|
||||||
goods_list: [{
|
goods_list: Object.values(this.orderList.reduce((acc, item) => {
|
||||||
supplier_id: this.orderList[0].supplier_id,
|
const supplierId = item.supplier_id;
|
||||||
supplier_name: this.orderList[0].supplier_name || '',
|
if (!acc[supplierId]) {
|
||||||
is_same_day: this.orderList[0].commodity_goods_info.is_same_day,
|
acc[supplierId] = {
|
||||||
receiving_name: this.defAddress.name,
|
supplier_id: supplierId,
|
||||||
receiving_phone: this.defAddress.phone,
|
supplier_name: item.supplier_name || '',
|
||||||
receiving_address: this.defAddress.address + this.defAddress.house_number,
|
is_same_day: item.commodity_goods_info.is_same_day,
|
||||||
merchant_id: this.defAddress.address_id,
|
receiving_name: this.defAddress.name,
|
||||||
goods_and_count: this.orderList.map(item => ({
|
receiving_phone: this.defAddress.phone,
|
||||||
|
receiving_address: this.defAddress.address + this.defAddress.house_number,
|
||||||
|
merchant_id: this.defAddress.address_id,
|
||||||
|
goods_and_count: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
acc[supplierId].goods_and_count.push({
|
||||||
goods_id: item.goods_id,
|
goods_id: item.goods_id,
|
||||||
count: item.count,
|
count: item.count,
|
||||||
price: item.commodity_goods_info.sales_price,
|
price: item.commodity_goods_info.sales_price,
|
||||||
freight: item.commodity_goods_info.freight,
|
freight: item.commodity_goods_info.freight,
|
||||||
}))
|
});
|
||||||
}]
|
return acc;
|
||||||
|
}, {}))
|
||||||
}
|
}
|
||||||
|
|
||||||
request(apiArr.createOrder, "POST", params).then(resVal => {
|
request(apiArr.createOrder, "POST", params).then(resVal => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user