正在显示
1 个修改的文件
包含
2 行增加
和
4 行删除
| @@ -80,17 +80,15 @@ class KeywordLogic extends BaseLogic | @@ -80,17 +80,15 @@ class KeywordLogic extends BaseLogic | ||
| 80 | */ | 80 | */ |
| 81 | public function batchAdd(){ | 81 | public function batchAdd(){ |
| 82 | $ids = []; | 82 | $ids = []; |
| 83 | - var_dump($this->param['title']); | ||
| 84 | - die(); | ||
| 85 | if(!empty($this->param['title']) && is_array($this->param['title'])){ | 83 | if(!empty($this->param['title']) && is_array($this->param['title'])){ |
| 86 | - foreach ($this->param['title'] as $k => $v){ | 84 | + foreach ($this->param['title'] as $v){ |
| 87 | $param['project_id'] = $this->user['project_id']; | 85 | $param['project_id'] = $this->user['project_id']; |
| 88 | $param['created_at'] = date('Y-m-d H:i:s'); | 86 | $param['created_at'] = date('Y-m-d H:i:s'); |
| 89 | $param['updated_at'] = $param['created_at']; | 87 | $param['updated_at'] = $param['created_at']; |
| 90 | $param['title'] = $v; | 88 | $param['title'] = $v; |
| 91 | $id = $this->model->insertGetId($param); | 89 | $id = $this->model->insertGetId($param); |
| 92 | $ids[] = $id; | 90 | $ids[] = $id; |
| 93 | - RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']); | 91 | + RouteMap::setRoute($v, RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']); |
| 94 | } | 92 | } |
| 95 | } | 93 | } |
| 96 | return $this->success($ids); | 94 | return $this->success($ids); |
-
请 注册 或 登录 后发表评论