作者 何书鹏
1 个管道 的构建 通过 耗费 8 秒

购物车商品总数返回值修改

... ... @@ -54,7 +54,8 @@ class Cart extends Api
})
*/
public function getCartNum(){
$this->success(__('成功'),$this->model->where(['user_id'=>$this->auth->id,'isbuynow'=>'0'])->sum('goods_num'));
$total_num = $this->model->where(['user_id'=>$this->auth->id,'isbuynow'=>'0'])->sum('goods_num');
$this->success(__('成功'),compact('total_num'));
}
/**
... ...