|
|
@@ -72,20 +72,20 @@ class StoreOrder extends BaseController
|
|
72
|
72
|
{
|
|
73
|
73
|
$cartId = (array)$this->request->param('cart_id', []);
|
|
74
|
74
|
$addressId = (int)$this->request->param('address_id');
|
|
75
|
|
- $psType = $this->request->param('type',false);//是否需要地址 boolean
|
|
|
75
|
+ $psType = $this->request->param('type', true);//是否需要地址 boolean
|
|
76
|
76
|
$uid = $this->request->uid();
|
|
77
|
77
|
|
|
78
|
78
|
if (!($count = count($cartId)) || $count != count($cartRepository->validIntersection($cartId, $uid)))
|
|
79
|
79
|
return app('json')->fail('已失效或已下单');
|
|
80
|
|
- // if (!$addressId) {
|
|
81
|
|
- // return app('json')->fail('请选择收货地址');
|
|
82
|
|
- // }
|
|
83
|
|
- $orderInfo = $this->repository->cartIdByOrderInfo($uid, $cartId, $addressId,true,$psType);
|
|
84
|
|
- $orderInfo['product_type']=0;
|
|
85
|
|
- if($this->source=='yhc'){
|
|
86
|
|
- $product_type=Db::name('store_cart')->alias('c')->join('store_product p','c.product_id=p.product_id')->whereIn('cart_id',$cartId)->column('p.type');
|
|
87
|
|
- if(in_array(17,$product_type)){
|
|
88
|
|
- $orderInfo['product_type']=17;
|
|
|
80
|
+ if (!$addressId) {
|
|
|
81
|
+ $psType = false;
|
|
|
82
|
+ }
|
|
|
83
|
+ $orderInfo = $this->repository->cartIdByOrderInfo($uid, $cartId, $addressId, true, $psType);
|
|
|
84
|
+ $orderInfo['product_type'] = 0;
|
|
|
85
|
+ if ($this->source == 'yhc') {
|
|
|
86
|
+ $product_type = Db::name('store_cart')->alias('c')->join('store_product p', 'c.product_id=p.product_id')->whereIn('cart_id', $cartId)->column('p.type');
|
|
|
87
|
+ if (in_array(17, $product_type)) {
|
|
|
88
|
+ $orderInfo['product_type'] = 17;
|
|
89
|
89
|
}
|
|
90
|
90
|
}
|
|
91
|
91
|
return app('json')->success($orderInfo);
|