作者 lyh

gx复制项目脚本

... ... @@ -90,7 +90,6 @@ class LyhImportTest extends Command
if($k < 2){
continue;
}
dd($val);
$saveData = [];
if($val[1] ?? ''){
$saveData['title'] = $val[1];
... ... @@ -136,6 +135,7 @@ class LyhImportTest extends Command
$faqId = $columnModel->addReturnId($detailFaq);
$faqsDetail = json_decode($val[4],true);
$faqContent = '';
if(!empty($faqsDetail) && is_array($faqContent)){
foreach ($faqsDetail as $faq_Val){
$faqContent = "question:".$faq_Val['question'] . "<br />" . "answer:".$faq_Val['answer']. "<br />";
}
... ... @@ -147,6 +147,7 @@ class LyhImportTest extends Command
];
$detailModel->addReturnId($detailFaqInfo);
}
}
return true;
}
... ...