Пример #1
0
 public function modifyAmount()
 {
     $cartId = (int) $this->getParam('cartId', 0);
     if ($cartId <= 0) {
         $this->ajaxReturn(ERR_PARAMS_ERROR, '参数错误');
         return;
     }
     $amount = (int) $this->getParam('amount', 0);
     if ($amount <= 0) {
         $this->ajaxReturn(ERR_PARAMS_ERROR, '参数错误');
         return;
     }
     UserCartModel::modifyAmount($this->userId(), $cartId, $amount);
     $this->ajaxReturn(0, '', '', array('amount' => $amount));
 }