|
...
|
...
|
@@ -8,6 +8,7 @@ use App\Http\Controllers\Bside\BaseController; |
|
|
|
use App\Http\Logic\Bside\Product\CategoryLogic;
|
|
|
|
use App\Http\Requests\Bside\Product\CategoryRequest;
|
|
|
|
use App\Models\Product\Category;
|
|
|
|
use App\Models\RouteMap;
|
|
|
|
use App\Rules\Ids;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
...
|
...
|
@@ -33,7 +34,7 @@ class CategoryController extends BaseController |
|
|
|
$this->map['title'] = ['like','%'.$this->map['title'].'%'];
|
|
|
|
}
|
|
|
|
$this->map['project_id'] = $this->user['project_id'];
|
|
|
|
$filed = ['id', 'project_id', 'pid', 'title', 'image', 'keywords', 'describe', 'status','created_at'];
|
|
|
|
$filed = ['id', 'project_id', 'pid', 'title', 'image', 'route','keywords', 'describe', 'status','created_at'];
|
|
|
|
$list = $category->list($this->map,'id',$filed);
|
|
|
|
if(!empty($list)){
|
|
|
|
foreach ($list as $k =>$v){
|
|
...
|
...
|
@@ -53,7 +54,7 @@ class CategoryController extends BaseController |
|
|
|
* @time :2023/8/17 11:10
|
|
|
|
*/
|
|
|
|
public function handleParam(&$category,$v){
|
|
|
|
$v['url'] = $this->user['domain'] . $v['route'] ;
|
|
|
|
$v['url'] = $this->user['domain'] . $v['route'];
|
|
|
|
$cate_ids = $category->getChildIdsArr($v['id']);
|
|
|
|
$v['product_num'] = CategoryRelated::whereIn('cate_id', $cate_ids)->distinct()->count('product_id');
|
|
|
|
$v['image_link'] = getImageUrl($v['image']);
|
...
|
...
|
|