正在显示
1 个修改的文件
包含
9 行增加
和
2 行删除
| @@ -100,8 +100,15 @@ class KeywordPageAiContent extends Command | @@ -100,8 +100,15 @@ class KeywordPageAiContent extends Command | ||
| 100 | //前后缀 | 100 | //前后缀 |
| 101 | $default_affix = AggregateKeywordAffix::where('project_id', 0)->first(); | 101 | $default_affix = AggregateKeywordAffix::where('project_id', 0)->first(); |
| 102 | $affix = AggregateKeywordAffix::where('project_id', $task->project_id)->first(); | 102 | $affix = AggregateKeywordAffix::where('project_id', $task->project_id)->first(); |
| 103 | - $prefix = empty($affix['prefix']) ? explode("\r\n", $default_affix['prefix']) : explode("\r\n", $affix['prefix']); | ||
| 104 | - $suffix = empty($affix['suffix']) ? explode("\r\n", $default_affix['suffix']) : explode("\r\n", $affix['suffix']); | 103 | + |
| 104 | + $default_affix['prefix'] = str_replace("\r\n", "\n", $default_affix['prefix']); | ||
| 105 | + $default_affix['suffix'] = str_replace("\r\n", "\n", $default_affix['suffix']); | ||
| 106 | + $affix['prefix'] = str_replace("\r\n", "\n", $affix['prefix']); | ||
| 107 | + $affix['prefix'] = str_replace("\r\n", "\n", $affix['prefix']); | ||
| 108 | + | ||
| 109 | + $prefix = empty($affix['prefix']) ? explode("\n", $default_affix['prefix']) : explode("\n", $affix['prefix']); | ||
| 110 | + $suffix = empty($affix['suffix']) ? explode("\n", $default_affix['suffix']) : explode("\n", $affix['suffix']); | ||
| 111 | + | ||
| 105 | if (!$prefix || !$suffix) { | 112 | if (!$prefix || !$suffix) { |
| 106 | throw new ValidateException('扩展标题前后缀不存在'); | 113 | throw new ValidateException('扩展标题前后缀不存在'); |
| 107 | } | 114 | } |
-
请 注册 或 登录 后发表评论