...
|
...
|
@@ -118,6 +118,13 @@ class ShopCar extends Api |
|
|
{
|
|
|
$user_id = $this->is_token($this->request->header());
|
|
|
$param = $this->request->param();
|
|
|
$is_kong=Db::name("shopcar")->where(['user_id' => $user_id])->find();
|
|
|
if(empty($is_kong)){
|
|
|
$return['count_price'] = 0;
|
|
|
$return['count_num'] = 0;
|
|
|
$return['list'] = [];
|
|
|
$this->success('', $return);
|
|
|
}
|
|
|
$product_id = Db::name('shopcar')->where(['id' => $param['shop_id']])->value('product_id');
|
|
|
$stock = Db::name('product')->where(['id' => $product_id])->value('stock');
|
|
|
if (!empty($param['shop_id']) || $param['shop_id'] != null || $param['shop_id'] != '') {
|
...
|
...
|
@@ -154,7 +161,6 @@ class ShopCar extends Api |
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (购物车接口-购物车删除)
|
|
|
* @ApiSummary (购物车渲染)
|
...
|
...
|
|