diff --git a/api/trade/order.js b/api/trade/order.js index 68899794..d516f1ee 100644 --- a/api/trade/order.js +++ b/api/trade/order.js @@ -1,7 +1,17 @@ import request from "@/utils/request.js"; export function settlementOrder(data) { - return request.get("app-api/trade/order/settlement", data); + const data2 = { + ...data, + } + // 解决 SpringMVC 接受 List 参数的问题 + delete data2.items + for (let i = 0; i < data.items.length; i++) { + data2['items[' + i + '].skuId'] = data.items[i].skuId; + data2['items[' + i + '].count'] = data.items[i].count; + data2['items[' + i + '].cartId'] = data.items[i].cartId; + } + return request.get("app-api/trade/order/settlement", data2); } export function createOrder(data) { diff --git a/components/orderGoods/index.vue b/components/orderGoods/index.vue index db27710b..356bd54f 100644 --- a/components/orderGoods/index.vue +++ b/components/orderGoods/index.vue @@ -1,35 +1,40 @@ - -