正在显示
1 个修改的文件
包含
10 行增加
和
1 行删除
| @@ -17,6 +17,7 @@ use App\Models\News\News; | @@ -17,6 +17,7 @@ use App\Models\News\News; | ||
| 17 | use App\Models\News\NewsCategory; | 17 | use App\Models\News\NewsCategory; |
| 18 | use App\Models\Product\Category; | 18 | use App\Models\Product\Category; |
| 19 | use App\Models\Product\CategoryRelated; | 19 | use App\Models\Product\CategoryRelated; |
| 20 | +use App\Models\Product\Keyword; | ||
| 20 | use App\Models\Product\KeywordRelated; | 21 | use App\Models\Product\KeywordRelated; |
| 21 | use App\Models\Product\Product; | 22 | use App\Models\Product\Product; |
| 22 | use App\Models\RouteMap\RouteMap; | 23 | use App\Models\RouteMap\RouteMap; |
| @@ -92,6 +93,7 @@ class TicketUploadDataLogic extends BaseLogic | @@ -92,6 +93,7 @@ class TicketUploadDataLogic extends BaseLogic | ||
| 92 | $filed = 'name'; | 93 | $filed = 'name'; |
| 93 | if($type == 1){ | 94 | if($type == 1){ |
| 94 | $cateModel = new Category(); | 95 | $cateModel = new Category(); |
| 96 | + $keywodModel = new KeyWord(); | ||
| 95 | $filed = 'title'; | 97 | $filed = 'title'; |
| 96 | }elseif ($type == 2){ | 98 | }elseif ($type == 2){ |
| 97 | $cateModel = new BlogCategory(); | 99 | $cateModel = new BlogCategory(); |
| @@ -99,9 +101,16 @@ class TicketUploadDataLogic extends BaseLogic | @@ -99,9 +101,16 @@ class TicketUploadDataLogic extends BaseLogic | ||
| 99 | $cateModel = new NewsCategory(); | 101 | $cateModel = new NewsCategory(); |
| 100 | } | 102 | } |
| 101 | if($is_array){ | 103 | if($is_array){ |
| 102 | - return $cateModel->whereIn('id', (array)$category_id) | 104 | + $cate_arr = $cateModel->whereIn('id', (array)$category_id) |
| 103 | ->pluck($filed, 'id') | 105 | ->pluck($filed, 'id') |
| 104 | ->toArray(); | 106 | ->toArray(); |
| 107 | + if($type == 1){ | ||
| 108 | + $keywod_arr = $keywodModel->whereIn('id', (array)$category_id) | ||
| 109 | + ->pluck($filed, 'id') | ||
| 110 | + ->toArray(); | ||
| 111 | + return ['keywod_arr' => $keywod_arr, 'cate_arr' => $cate_arr]; | ||
| 112 | + } | ||
| 113 | + return ['cate_arr' => $cate_arr]; | ||
| 105 | }else{ | 114 | }else{ |
| 106 | $cateArr = $cateModel->selectField(['id'=>['in',$category_id]],$filed); | 115 | $cateArr = $cateModel->selectField(['id'=>['in',$category_id]],$filed); |
| 107 | return implode(',',$cateArr); | 116 | return implode(',',$cateArr); |
-
请 注册 或 登录 后发表评论