正在显示
5 个修改的文件
包含
3 行增加
和
5 行删除
| @@ -33,6 +33,7 @@ class BlogLogic extends BaseLogic | @@ -33,6 +33,7 @@ class BlogLogic extends BaseLogic | ||
| 33 | DB::beginTransaction(); | 33 | DB::beginTransaction(); |
| 34 | try { | 34 | try { |
| 35 | $this->param = $this->paramProcessing($this->param); | 35 | $this->param = $this->paramProcessing($this->param); |
| 36 | + $this->param['url'] = $this->param['url'].'-'.RouteMap::SOURCE_BLOG; | ||
| 36 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 37 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 37 | //是否更新路由 | 38 | //是否更新路由 |
| 38 | $id = $this->editNewsRoute($this->param['id'],$this->param['url']); | 39 | $id = $this->editNewsRoute($this->param['id'],$this->param['url']); |
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Http\Logic\Bside\News; | 3 | namespace App\Http\Logic\Bside\News; |
| 4 | 4 | ||
| 5 | +use App\Helper\Translate; | ||
| 5 | use App\Http\Logic\Bside\BaseLogic; | 6 | use App\Http\Logic\Bside\BaseLogic; |
| 6 | use App\Models\News\News as NewsModel; | 7 | use App\Models\News\News as NewsModel; |
| 7 | use App\Models\News\NewsCategory as NewsCategoryModel; | 8 | use App\Models\News\NewsCategory as NewsCategoryModel; |
| @@ -42,7 +43,6 @@ class NewsCategoryLogic extends BaseLogic | @@ -42,7 +43,6 @@ class NewsCategoryLogic extends BaseLogic | ||
| 42 | $this->verifyParamName($this->param['name']); | 43 | $this->verifyParamName($this->param['name']); |
| 43 | DB::beginTransaction(); | 44 | DB::beginTransaction(); |
| 44 | try { | 45 | try { |
| 45 | - $this->param['alias'] = (isset($this->param['alias']) ? $this->param['alias'] : $this->param['name']).''; | ||
| 46 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 46 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 47 | $this->param['operator_id'] = $this->user['id']; | 47 | $this->param['operator_id'] = $this->user['id']; |
| 48 | //查看路由是否更新 | 48 | //查看路由是否更新 |
| @@ -62,7 +62,6 @@ class NewsLogic extends BaseLogic | @@ -62,7 +62,6 @@ class NewsLogic extends BaseLogic | ||
| 62 | DB::beginTransaction(); | 62 | DB::beginTransaction(); |
| 63 | try { | 63 | try { |
| 64 | $this->param = $this->paramProcessing($this->param); | 64 | $this->param = $this->paramProcessing($this->param); |
| 65 | - //路由映射 | ||
| 66 | $this->param['url'] = $this->param['url'].'-'.RouteMap::SOURCE_NEWS; | 65 | $this->param['url'] = $this->param['url'].'-'.RouteMap::SOURCE_NEWS; |
| 67 | if (isset($this->param['id']) && !empty($this->param['id'])) { | 66 | if (isset($this->param['id']) && !empty($this->param['id'])) { |
| 68 | //是否更新路由 | 67 | //是否更新路由 |
| @@ -112,8 +112,6 @@ class CategoryLogic extends BaseLogic | @@ -112,8 +112,6 @@ class CategoryLogic extends BaseLogic | ||
| 112 | public function categorySave(){ | 112 | public function categorySave(){ |
| 113 | DB::beginTransaction(); | 113 | DB::beginTransaction(); |
| 114 | try { | 114 | try { |
| 115 | - //路由映射 | ||
| 116 | - $this->param['route'] = $this->param['route'].'-'.RouteMap::SOURCE_PRODUCT_CATE; | ||
| 117 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 115 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 118 | //是否编辑路由 | 116 | //是否编辑路由 |
| 119 | $id = $this->editCategoryRoute($this->param['id'],$this->param['route']); | 117 | $id = $this->editCategoryRoute($this->param['id'],$this->param['route']); |
| @@ -62,7 +62,7 @@ class KeywordLogic extends BaseLogic | @@ -62,7 +62,7 @@ class KeywordLogic extends BaseLogic | ||
| 62 | $this->param['updated_at'] = $this->param['created_at']; | 62 | $this->param['updated_at'] = $this->param['created_at']; |
| 63 | $id = $this->model->insertGetId($this->param); | 63 | $id = $this->model->insertGetId($this->param); |
| 64 | //路由映射 | 64 | //路由映射 |
| 65 | - $route = RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']); | 65 | + $route = RouteMap::setRoute($this->param['title'].'-tag', RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']); |
| 66 | $this->model->edit(['route'=>$route],['id'=>$id]); | 66 | $this->model->edit(['route'=>$route],['id'=>$id]); |
| 67 | } | 67 | } |
| 68 | //清除缓存 | 68 | //清除缓存 |
-
请 注册 或 登录 后发表评论