liyaozhi
2025-10-28 1320688354fd168c51cf2e05f29a2253f4ed9c00
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
 
namespace app\api\controller\product;
 
use app\api\controller\Controller;
use app\api\model\product\Comment as CommentModel;
 
/**
 * 商品评价控制器
 */
class Comment extends Controller
{
    /**
     * 商品评价列表
     */
    public function lists($product_id, $scoreType = -1)
    {
        $model = new CommentModel;
        $list = $model->getProductCommentList($product_id, $scoreType, $this->postData());
        $total = $model->getTotal($product_id);
        return $this->renderSuccess('', compact('list', 'total'));
    }
 
}