|
...
|
...
|
@@ -397,7 +397,8 @@ class ProductLogic extends BaseLogic |
|
|
|
//查詢所有分類
|
|
|
|
$cateModel = new Category();
|
|
|
|
$cateList = $cateModel->list(['status'=>1],'id',['id','pid']);
|
|
|
|
if(!empty($cateList) && !isset($this->param['featured_status'])){
|
|
|
|
$this->param['featured_status'] = $this->param['featured_status'] ?? 0;
|
|
|
|
if(!empty($cateList) && ($this->param['featured_status'] != $cateModel::STATUS_ACTIVE)){
|
|
|
|
$featured_ids = $cateModel->where('title', 'like', '%Featured%')->pluck('id')->toArray();
|
|
|
|
//获取当前的子集
|
|
|
|
$featured_arr = [];
|
|
...
|
...
|
@@ -862,7 +863,8 @@ class ProductLogic extends BaseLogic |
|
|
|
{
|
|
|
|
$categoryModel = new Category();
|
|
|
|
$this->param['deleted_at'] = null;
|
|
|
|
if(!isset($this->param['featured_status'])) {
|
|
|
|
$this->param['featured_status'] = $this->param['featured_status'] ?? 0;
|
|
|
|
if(($this->param['featured_status'] != Category::STATUS_ACTIVE)) {
|
|
|
|
$this->param['title'] = ['not like','%Featured%'];
|
|
|
|
}
|
|
|
|
$list = $categoryModel->list($this->param, ['sort', 'id'], ['id', 'pid', 'title']);
|
...
|
...
|
|