diff --git a/app/admin/controller/Payment.php b/app/admin/controller/Payment.php index 8509e03a1..00134140a 100755 --- a/app/admin/controller/Payment.php +++ b/app/admin/controller/Payment.php @@ -67,8 +67,6 @@ class Payment extends Common // 插件更新信息 $upgrade = PaymentService::PaymentUpgradeInfo($ret['data']); MyViewAssign('upgrade_info', $upgrade['data']); - // print_r($upgrade); - // print_r($ret['data']); return MyView(); } diff --git a/app/api/controller/Goods.php b/app/api/controller/Goods.php index 26f40166a..a5c3bdb2a 100755 --- a/app/api/controller/Goods.php +++ b/app/api/controller/Goods.php @@ -187,6 +187,26 @@ class Goods extends Common return ApiService::ApiDataReturn($ret); } + /** + * 商品数量选择 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-12-14 + * @desc description + */ + public function Stock() + { + // 开始处理 + $params = $this->data_post; + $ret = GoodsService::GoodsStock($params); + if($ret['code'] == 0) + { + $ret['data'] = $ret['data']['spec_base']; + } + return ApiService::ApiDataReturn($ret); + } + /** * 商品分类 * @author Devil diff --git a/app/index/controller/Goods.php b/app/index/controller/Goods.php index f2db61aca..aeef4728b 100755 --- a/app/index/controller/Goods.php +++ b/app/index/controller/Goods.php @@ -179,7 +179,7 @@ class Goods extends Common $this->IsLogin(); // 开始处理 - $params = input('post.'); + $params = $this->data_post; $params['user'] = $this->user; return GoodsFavorService::GoodsFavorCancel($params); } @@ -201,7 +201,7 @@ class Goods extends Common } // 开始处理 - $params = input('post.'); + $params = $this->data_post; return GoodsService::GoodsSpecType($params); } @@ -222,10 +222,31 @@ class Goods extends Common } // 开始处理 - $params = input('post.'); + $params = $this->data_post; return GoodsService::GoodsSpecDetail($params); } + /** + * 商品数量选择 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-12-14 + * @desc description + */ + public function Stock() + { + // 是否ajax请求 + if(!IS_AJAX) + { + return $this->error('非法访问'); + } + + // 开始处理 + $params = $this->data_post; + return GoodsService::GoodsStock($params); + } + /** * 商品评论 * @author Devil diff --git a/app/index/view/default/cart/index.html b/app/index/view/default/cart/index.html index a478bcf19..9eafd8d82 100755 --- a/app/index/view/default/cart/index.html +++ b/app/index/view/default/cart/index.html @@ -17,7 +17,7 @@ {{include file="public/goods_category" /}} -