✨ 拼团:订单下单的接入
parent
a063553488
commit
c3bb0a2ddc
|
@ -73,7 +73,8 @@
|
||||||
// 初始化
|
// 初始化
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// 查询参团记录
|
// 查询参团记录
|
||||||
const { data } = await CombinationApi.getHeadCombinationRecordList(props.modelValue.id, 1 , 10);
|
// status = 0 表示未成团
|
||||||
|
const { data } = await CombinationApi.getHeadCombinationRecordList(props.modelValue.id, 0 , 10);
|
||||||
state.list = data;
|
state.list = data;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!-- 拼团商品详情 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout :onShareAppMessage="shareInfo" navbar="goods">
|
<s-layout :onShareAppMessage="shareInfo" navbar="goods">
|
||||||
<!-- 标题栏 -->
|
<!-- 标题栏 -->
|
||||||
|
@ -152,7 +153,6 @@
|
||||||
import CombinationApi from "@/sheep/api/promotion/combination";
|
import CombinationApi from "@/sheep/api/promotion/combination";
|
||||||
import SpuApi from "@/sheep/api/product/spu";
|
import SpuApi from "@/sheep/api/product/spu";
|
||||||
|
|
||||||
|
|
||||||
const headerBg = sheep.$url.css('/static/img/shop/goods/groupon-bg.png');
|
const headerBg = sheep.$url.css('/static/img/shop/goods/groupon-bg.png');
|
||||||
const btnBg = sheep.$url.css('/static/img/shop/goods/groupon-btn.png');
|
const btnBg = sheep.$url.css('/static/img/shop/goods/groupon-btn.png');
|
||||||
const disabledBtnBg = sheep.$url.css(
|
const disabledBtnBg = sheep.$url.css(
|
||||||
|
@ -226,6 +226,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分享信息
|
// 分享信息
|
||||||
|
// TODO @芋艿:分享的接入
|
||||||
const shareInfo = computed(() => {
|
const shareInfo = computed(() => {
|
||||||
if (isEmpty(state.activity)) return {};
|
if (isEmpty(state.activity)) return {};
|
||||||
return sheep.$platform.share.getShareInfo(
|
return sheep.$platform.share.getShareInfo(
|
||||||
|
|
|
@ -208,6 +208,8 @@
|
||||||
addressId: state.addressInfo.id,
|
addressId: state.addressInfo.id,
|
||||||
deliveryType: 1, // TODO 芋艿:需要支持【门店自提】
|
deliveryType: 1, // TODO 芋艿:需要支持【门店自提】
|
||||||
pointStatus: false, // TODO 芋艿:需要支持【积分选择】
|
pointStatus: false, // TODO 芋艿:需要支持【积分选择】
|
||||||
|
combinationActivityId: state.orderPayload.combinationActivityId,
|
||||||
|
combinationHeadId: state.orderPayload.combinationHeadId
|
||||||
});
|
});
|
||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -231,6 +233,8 @@
|
||||||
addressId: state.addressInfo.id,
|
addressId: state.addressInfo.id,
|
||||||
deliveryType: 1, // TODO 芋艿:需要支持【门店自提】
|
deliveryType: 1, // TODO 芋艿:需要支持【门店自提】
|
||||||
pointStatus: false, // TODO 芋艿:需要支持【积分选择】
|
pointStatus: false, // TODO 芋艿:需要支持【积分选择】
|
||||||
|
combinationActivityId: state.orderPayload.combinationActivityId,
|
||||||
|
combinationHeadId: state.orderPayload.combinationHeadId
|
||||||
});
|
});
|
||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -13,6 +13,12 @@ const OrderApi = {
|
||||||
if (!(data.addressId > 0)) {
|
if (!(data.addressId > 0)) {
|
||||||
delete data2.addressId;
|
delete data2.addressId;
|
||||||
}
|
}
|
||||||
|
if (!(data.combinationActivityId) > 0) {
|
||||||
|
delete data2.combinationActivityId;
|
||||||
|
}
|
||||||
|
if (!(data.combinationHeadId > 0)) {
|
||||||
|
delete data2.combinationHeadId;
|
||||||
|
}
|
||||||
// 解决 SpringMVC 接受 List<Item> 参数的问题
|
// 解决 SpringMVC 接受 List<Item> 参数的问题
|
||||||
delete data2.items;
|
delete data2.items;
|
||||||
for (let i = 0; i < data.items.length; i++) {
|
for (let i = 0; i < data.items.length; i++) {
|
||||||
|
@ -28,6 +34,10 @@ const OrderApi = {
|
||||||
return request({
|
return request({
|
||||||
url: `/app-api/trade/order/settlement?${queryString}`,
|
url: `/app-api/trade/order/settlement?${queryString}`,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
custom: {
|
||||||
|
showError: true,
|
||||||
|
showLoading: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 创建订单
|
// 创建订单
|
||||||
|
|
Loading…
Reference in New Issue