宝体数据调用接口
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.
 
 
 
 
 
 

29 lines
638 B

<?php
namespace app\api\controller;
use app\api\model\Comment as CommentModel;
/**
* 商品评价控制器
* Class Comment
* @package app\api\controller
*/
class Comment extends Controller
{
/**
* 商品评价列表
* @param $goods_id
* @param int $scoreType
* @return array
* @throws \think\exception\DbException
*/
public function lists($goods_id, $scoreType = -1)
{
$model = new CommentModel;
$list = $model->getGoodsCommentList($goods_id, $scoreType);
$total = $model->getTotal($goods_id);
return $this->renderSuccess(compact('list', 'total'));
}
}