|
...
|
...
|
@@ -49,8 +49,8 @@ class ProductController extends BaseController |
|
|
|
{
|
|
|
|
$filed = ['id', 'project_id', 'title', 'sort' ,'thumb' ,'product_type' , 'route' ,
|
|
|
|
'category_id', 'keyword_id', 'status', 'created_uid', 'is_upgrade' ,'created_at', 'updated_at','six_read'];
|
|
|
|
$this->order = 'sort';
|
|
|
|
$query = $product->orderBy($this->order ,'desc')->orderBy('id','desc');
|
|
|
|
$this->order = $this->order ?? 'sort';
|
|
|
|
$query = $product->orderBy($this->order ,$this->order_type)->orderBy('id','desc');
|
|
|
|
$query = $this->searchParam($query);
|
|
|
|
$lists = $query->select($filed)->paginate($this->row, ['*'], 'page', $this->page);
|
|
|
|
if(!empty($lists)){
|
|
...
|
...
|
@@ -71,6 +71,10 @@ class ProductController extends BaseController |
|
|
|
}
|
|
|
|
$this->response('success',Code::SUCCESS,$lists);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setOrderBy(){
|
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @remark :列表
|
|
|
|
* @name :index
|
...
|
...
|
|