You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

54 lines
1.6 KiB

  1. <?php
  2. /**
  3. * 产品通用数据获取
  4. * ============================================================================
  5. * * 版权所有 蜘蛛出行 * *
  6. * 网站地址: http://www.zhizhuchuxing.com
  7. * ----------------------------------------------------------------------------
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
  9. * 使用;不允许对程序代码以任何形式任何目的的再发布。
  10. * ============================================================================
  11. * Author By: 倪宗锋
  12. * PhpStorm ProdController.php
  13. * Create By 2017/6/28 10:14 $
  14. */
  15. namespace zzcx\controllers\home;
  16. use common\util\Util;
  17. use yii\web\Controller;
  18. use zzcx\service\home\Prod;
  19. class ProdController extends Controller
  20. {
  21. public $service = null;
  22. public function service()
  23. {
  24. if ($this->service == null) {
  25. $this->service = new Prod();
  26. }
  27. return $this->service;
  28. }
  29. /**
  30. * Des:获取产品的评论
  31. * Name: actionGetProdComment
  32. * @return string
  33. * @author 倪宗锋
  34. */
  35. public function actionGetProdComment()
  36. {
  37. $param = [
  38. 'page' => $this->_post('current_page', 1),
  39. 'page_size' => $this->_post('page_size', 10),
  40. 'pro_cate_id' => $this->_post('pro_cate_id', '')
  41. ];
  42. $getList = $this->service()->getProdComment($param);
  43. if ($getList['flag'] == false) {
  44. return Util::returnJsEr($getList['msg']);
  45. }
  46. return Util::returnJsSu('', $getList['data']);
  47. }
  48. }