正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
| @@ -8,6 +8,7 @@ use App\Http\Controllers\Bside\BaseController; | @@ -8,6 +8,7 @@ use App\Http\Controllers\Bside\BaseController; | ||
| 8 | use App\Http\Logic\Bside\Product\CategoryLogic; | 8 | use App\Http\Logic\Bside\Product\CategoryLogic; |
| 9 | use App\Http\Requests\Bside\Product\CategoryRequest; | 9 | use App\Http\Requests\Bside\Product\CategoryRequest; |
| 10 | use App\Models\Product\Category; | 10 | use App\Models\Product\Category; |
| 11 | +use App\Models\RouteMap; | ||
| 11 | use App\Rules\Ids; | 12 | use App\Rules\Ids; |
| 12 | use Illuminate\Http\Request; | 13 | use Illuminate\Http\Request; |
| 13 | 14 | ||
| @@ -33,7 +34,7 @@ class CategoryController extends BaseController | @@ -33,7 +34,7 @@ class CategoryController extends BaseController | ||
| 33 | $this->map['title'] = ['like','%'.$this->map['title'].'%']; | 34 | $this->map['title'] = ['like','%'.$this->map['title'].'%']; |
| 34 | } | 35 | } |
| 35 | $this->map['project_id'] = $this->user['project_id']; | 36 | $this->map['project_id'] = $this->user['project_id']; |
| 36 | - $filed = ['id', 'project_id', 'pid', 'title', 'image', 'keywords', 'describe', 'status','created_at']; | 37 | + $filed = ['id', 'project_id', 'pid', 'title', 'image', 'route','keywords', 'describe', 'status','created_at']; |
| 37 | $list = $category->list($this->map,'id',$filed); | 38 | $list = $category->list($this->map,'id',$filed); |
| 38 | if(!empty($list)){ | 39 | if(!empty($list)){ |
| 39 | foreach ($list as $k =>$v){ | 40 | foreach ($list as $k =>$v){ |
| @@ -53,7 +54,7 @@ class CategoryController extends BaseController | @@ -53,7 +54,7 @@ class CategoryController extends BaseController | ||
| 53 | * @time :2023/8/17 11:10 | 54 | * @time :2023/8/17 11:10 |
| 54 | */ | 55 | */ |
| 55 | public function handleParam(&$category,$v){ | 56 | public function handleParam(&$category,$v){ |
| 56 | - $v['url'] = $this->user['domain'] . $v['route'] ; | 57 | + $v['url'] = $this->user['domain'] . $v['route']; |
| 57 | $cate_ids = $category->getChildIdsArr($v['id']); | 58 | $cate_ids = $category->getChildIdsArr($v['id']); |
| 58 | $v['product_num'] = CategoryRelated::whereIn('cate_id', $cate_ids)->distinct()->count('product_id'); | 59 | $v['product_num'] = CategoryRelated::whereIn('cate_id', $cate_ids)->distinct()->count('product_id'); |
| 59 | $v['image_link'] = getImageUrl($v['image']); | 60 | $v['image_link'] = getImageUrl($v['image']); |
-
请 注册 或 登录 后发表评论