正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
| @@ -107,7 +107,8 @@ class KeywordLogic extends BaseLogic | @@ -107,7 +107,8 @@ class KeywordLogic extends BaseLogic | ||
| 107 | public function batchAdd(){ | 107 | public function batchAdd(){ |
| 108 | if(!empty($this->param['title']) && is_array($this->param['title'])){ | 108 | if(!empty($this->param['title']) && is_array($this->param['title'])){ |
| 109 | foreach ($this->param['title'] as $v){ | 109 | foreach ($this->param['title'] as $v){ |
| 110 | - $info = $this->model->read(['title'=>$v]); | 110 | + $newStr = str_replace(' ', '-', $v); |
| 111 | + $info = $this->model->read(['title'=>$newStr]); | ||
| 111 | if($info === false){ | 112 | if($info === false){ |
| 112 | $param['project_id'] = $this->user['project_id']; | 113 | $param['project_id'] = $this->user['project_id']; |
| 113 | $param['created_at'] = date('Y-m-d H:i:s'); | 114 | $param['created_at'] = date('Y-m-d H:i:s'); |
-
请 注册 或 登录 后发表评论