正在显示
1 个修改的文件
包含
1 行增加
和
3 行删除
| @@ -147,11 +147,10 @@ class KeywordLogic extends BaseLogic | @@ -147,11 +147,10 @@ class KeywordLogic extends BaseLogic | ||
| 147 | */ | 147 | */ |
| 148 | public function first_word($title){ | 148 | public function first_word($title){ |
| 149 | $first_title = mb_substr(strtolower($title), 0, 1); | 149 | $first_title = mb_substr(strtolower($title), 0, 1); |
| 150 | - $keywordModel = new Keyword(); | ||
| 151 | if (is_numeric($first_title)){ | 150 | if (is_numeric($first_title)){ |
| 152 | return 0; | 151 | return 0; |
| 153 | } | 152 | } |
| 154 | - $string_key = array_search($first_title, $keywordModel->firstNumWord); | 153 | + $string_key = array_search($first_title, $this->model->firstNumWord); |
| 155 | return $string_key ?: 27; | 154 | return $string_key ?: 27; |
| 156 | } | 155 | } |
| 157 | 156 | ||
| @@ -168,7 +167,6 @@ class KeywordLogic extends BaseLogic | @@ -168,7 +167,6 @@ class KeywordLogic extends BaseLogic | ||
| 168 | if(empty($v)){ | 167 | if(empty($v)){ |
| 169 | continue; | 168 | continue; |
| 170 | } | 169 | } |
| 171 | - $this->model = new Keyword(); | ||
| 172 | $info = $this->model->read(['title'=>$v],['id']); | 170 | $info = $this->model->read(['title'=>$v],['id']); |
| 173 | if($info === false){ | 171 | if($info === false){ |
| 174 | $param['project_id'] = $this->user['project_id']; | 172 | $param['project_id'] = $this->user['project_id']; |
-
请 注册 或 登录 后发表评论