...
|
...
|
@@ -246,7 +246,7 @@ class Index extends Api |
|
|
$goods['size'] = $user_size->visible(['id','name']);
|
|
|
}
|
|
|
}
|
|
|
$goods['appraise'] = \app\common\model\GoodsAppraise::getList(['goods_id'=>$goods_id],1,1);
|
|
|
$goods['appraise'] = \app\common\model\GoodsAppraise::getList(['goods_id'=>$goods_id],['star'=>'desc'],1,1);
|
|
|
// 返回结果
|
|
|
$this->success(__('成功'),compact('goods'));
|
|
|
}
|
...
|
...
|
@@ -271,7 +271,7 @@ class Index extends Api |
|
|
$rows = $this->request->get('rows',null);
|
|
|
$page = $this->request->get('page',1);
|
|
|
$goods_id = $this->request->get('goods_id');
|
|
|
$list = \app\common\model\GoodsAppraise::getList(['goods_id'=>$goods_id],$page,$rows);
|
|
|
$list = \app\common\model\GoodsAppraise::getList(['goods_id'=>$goods_id],['createtime'=>'desc'],$page,$rows);
|
|
|
// 返回结果
|
|
|
$this->success(__('成功'),compact('list'));
|
|
|
}
|
...
|
...
|
|