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