正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
| @@ -90,7 +90,6 @@ class LyhImportTest extends Command | @@ -90,7 +90,6 @@ class LyhImportTest extends Command | ||
| 90 | if($k < 2){ | 90 | if($k < 2){ |
| 91 | continue; | 91 | continue; |
| 92 | } | 92 | } |
| 93 | - dd($val); | ||
| 94 | $saveData = []; | 93 | $saveData = []; |
| 95 | if($val[1] ?? ''){ | 94 | if($val[1] ?? ''){ |
| 96 | $saveData['title'] = $val[1]; | 95 | $saveData['title'] = $val[1]; |
| @@ -136,6 +135,7 @@ class LyhImportTest extends Command | @@ -136,6 +135,7 @@ class LyhImportTest extends Command | ||
| 136 | $faqId = $columnModel->addReturnId($detailFaq); | 135 | $faqId = $columnModel->addReturnId($detailFaq); |
| 137 | $faqsDetail = json_decode($val[4],true); | 136 | $faqsDetail = json_decode($val[4],true); |
| 138 | $faqContent = ''; | 137 | $faqContent = ''; |
| 138 | + if(!empty($faqsDetail) && is_array($faqContent)){ | ||
| 139 | foreach ($faqsDetail as $faq_Val){ | 139 | foreach ($faqsDetail as $faq_Val){ |
| 140 | $faqContent = "question:".$faq_Val['question'] . "<br />" . "answer:".$faq_Val['answer']. "<br />"; | 140 | $faqContent = "question:".$faq_Val['question'] . "<br />" . "answer:".$faq_Val['answer']. "<br />"; |
| 141 | } | 141 | } |
| @@ -147,6 +147,7 @@ class LyhImportTest extends Command | @@ -147,6 +147,7 @@ class LyhImportTest extends Command | ||
| 147 | ]; | 147 | ]; |
| 148 | $detailModel->addReturnId($detailFaqInfo); | 148 | $detailModel->addReturnId($detailFaqInfo); |
| 149 | } | 149 | } |
| 150 | + } | ||
| 150 | return true; | 151 | return true; |
| 151 | } | 152 | } |
| 152 | 153 |
-
请 注册 或 登录 后发表评论