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