作者 赵彬吉
@@ -337,6 +337,8 @@ class ProjectUpdate extends Command @@ -337,6 +337,8 @@ class ProjectUpdate extends Command
337 } 337 }
338 //名称去掉特殊符号 338 //名称去掉特殊符号
339 $item['ttile'] = $this->special2str($item['ttile'] ?? ''); 339 $item['ttile'] = $this->special2str($item['ttile'] ?? '');
  340 + //短描述处理换行
  341 + $intro = str_replace("\r\n", "<br>", $item['short_description'] ?? '');
340 //详情 342 //详情
341 $content = $item['content'] ?? ''; 343 $content = $item['content'] ?? '';
342 try { 344 try {
@@ -345,7 +347,7 @@ class ProjectUpdate extends Command @@ -345,7 +347,7 @@ class ProjectUpdate extends Command
345 $id = $model->insertGetId([ 347 $id = $model->insertGetId([
346 'project_id' => $project_id, 348 'project_id' => $project_id,
347 'title' => $item['ttile'], 349 'title' => $item['ttile'],
348 - 'intro' => $item['short_description'] ?? '', 350 + 'intro' => $intro,
349 'content' => $content, 351 'content' => $content,
350 'category_id' => $category_id, 352 'category_id' => $category_id,
351 'keyword_id' => $keyword_id, 353 'keyword_id' => $keyword_id,
@@ -391,7 +393,7 @@ class ProjectUpdate extends Command @@ -391,7 +393,7 @@ class ProjectUpdate extends Command
391 //按5.0展示才需要更新数据 393 //按5.0展示才需要更新数据
392 $model->edit([ 394 $model->edit([
393 'title' => $item['ttile'], 395 'title' => $item['ttile'],
394 - 'intro' => $item['short_description'] ?? '', 396 + 'intro' => $intro,
395 'content' => $content, 397 'content' => $content,
396 'category_id' => $category_id, 398 'category_id' => $category_id,
397 'keyword_id' => $keyword_id, 399 'keyword_id' => $keyword_id,