Example #1
0
 public function actionSale($goods_id, $status = 1)
 {
     if (!$this->is_access('goods/update')) {
         exit;
     }
     $model = new Goods();
     if ($model->setOnSale($goods_id, $status)) {
         echo '1';
     } else {
         echo '0';
     }
 }