|
|
@ -128,7 +128,20 @@ class OrderOnlineController extends BaseController |
|
|
|
|
|
|
|
|
$res['store_list'] = $this->shopCartService->getGoodsByShopcartId($shopcartIds); |
|
|
$res['store_list'] = $this->shopCartService->getGoodsByShopcartId($shopcartIds); |
|
|
//获取用户优惠券
|
|
|
//获取用户优惠券
|
|
|
$res['coupon'] = $this->couponRecService->allForOnlineOrderAvailable($userId, $marketId); |
|
|
|
|
|
|
|
|
$coupons = $this->couponRecService->allForOnlineOrderAvailable($userId, $marketId); |
|
|
|
|
|
$res['coupon'] = []; |
|
|
|
|
|
foreach ($coupons as $key => &$item) { |
|
|
|
|
|
foreach ($item as $k => &$rec) { |
|
|
|
|
|
for ($i=0; $i<$rec->number_remain; $i++) { |
|
|
|
|
|
if ($key == 'available') { |
|
|
|
|
|
$res['coupon']['available'][] = $rec; |
|
|
|
|
|
} elseif ($key == 'not_available') { |
|
|
|
|
|
$res['coupon']['not_available'][] = $rec; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// $res['coupon'] = $coupons;
|
|
|
//增值服务接口
|
|
|
//增值服务接口
|
|
|
$res['value_added_service'] = [ |
|
|
$res['value_added_service'] = [ |
|
|
'text' => '增值服务包含洗菜、切菜、打包等所产生的人工成本费及包装费。', |
|
|
'text' => '增值服务包含洗菜、切菜、打包等所产生的人工成本费及包装费。', |
|
|
|