public function delCart() { $goods_id = $_GET['goods_id'] + 0; $goods_attr_id = I('get.goods_attr_id'); $cart_model = new \Model\CartModel(); $cart_model->delCart($goods_id, $goods_attr_id); $this->success('删除购物车商品成功', U('cartlist'), 1); }
public function delCart() { $goods_id = I('get.goods_id'); $cart = new \Model\CartModel(); $a = $cart->delCart($goods_id); if ($a) { $this->redirect('cartlist'); } }