|
@@ -28,7 +28,8 @@ class Teac extends Api
|
|
|
$type_id = $this->request->post('type_id/d', 0);
|
|
$type_id = $this->request->post('type_id/d', 0);
|
|
|
if(!in_array($type_id, [ProductTeac::Buying, ProductTeac::Sell])) $this->error('类型错误');
|
|
if(!in_array($type_id, [ProductTeac::Buying, ProductTeac::Sell])) $this->error('类型错误');
|
|
|
|
|
|
|
|
- $list = $productTeac->where('status', ProductTeac::Normal)->where('type_id', $type_id)
|
|
|
|
|
|
|
+ $list = $productTeac->with('users')
|
|
|
|
|
+ ->where('status', ProductTeac::Normal)->where('type_id', $type_id)
|
|
|
->order('create_time desc')
|
|
->order('create_time desc')
|
|
|
->paginate($this->pageSize);
|
|
->paginate($this->pageSize);
|
|
|
|
|
|