修改易购订单立即支付传值逻辑

This commit is contained in:
赵毅 2025-12-10 09:34:18 +08:00
parent fabfcd5300
commit cdb74c3aa6

View File

@ -371,21 +371,28 @@ export default {
user_id: uni.getStorageSync('userId'),
// shopCarListisAdvertrue
order_cate: this.carList.some(item => item.isAdver === true) ? 3 : 1,
goods_list: [{
supplier_id: this.orderList[0].supplier_id,
supplier_name: this.orderList[0].supplier_name || '',
is_same_day: this.orderList[0].commodity_goods_info.is_same_day,
receiving_name: this.defAddress.name,
receiving_phone: this.defAddress.phone,
receiving_address: this.defAddress.address + this.defAddress.house_number,
merchant_id: this.defAddress.address_id,
goods_and_count: this.orderList.map(item => ({
goods_list: Object.values(this.orderList.reduce((acc, item) => {
const supplierId = item.supplier_id;
if (!acc[supplierId]) {
acc[supplierId] = {
supplier_id: supplierId,
supplier_name: item.supplier_name || '',
is_same_day: item.commodity_goods_info.is_same_day,
receiving_name: this.defAddress.name,
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,
count: item.count,
price: item.commodity_goods_info.sales_price,
freight: item.commodity_goods_info.freight,
}))
}]
});
return acc;
}, {}))
}
request(apiArr.createOrder, "POST", params).then(resVal => {