1.提交缺失的东西
This commit is contained in:
@ -38,10 +38,10 @@ class CartController extends BaseApiController
|
|||||||
public function add()
|
public function add()
|
||||||
{
|
{
|
||||||
$post = $this->request->post();
|
$post = $this->request->post();
|
||||||
$check = $this->validate($post, 'app\api\validate\CartValidate.add');
|
// $check = $this->validate($post, 'app\api\validate\CartValidate.add');
|
||||||
if (true !== $check) {
|
// if (true !== $check) {
|
||||||
return $this->fail($check);
|
// return $this->fail($check);
|
||||||
}
|
// }
|
||||||
$res = CartLogic::add($post['item_id'], $post['goods_num'], $this->userId);
|
$res = CartLogic::add($post['item_id'], $post['goods_num'], $this->userId);
|
||||||
if ($res === true) {
|
if ($res === true) {
|
||||||
return $this->success('加入成功');
|
return $this->success('加入成功');
|
||||||
|
|||||||
Reference in New Issue
Block a user