|
...
|
...
|
@@ -381,6 +381,9 @@ class ProductLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function importProduct($project_id, $user_id, $data)
|
|
|
|
{
|
|
|
|
$product = $this->model->read(['title' => $data[0]]);
|
|
|
|
if (!$product) {
|
|
|
|
|
|
|
|
$category_id = '';
|
|
|
|
if ($data[2]) {
|
|
|
|
//处理分类
|
|
...
|
...
|
@@ -445,7 +448,6 @@ class ProductLogic extends BaseLogic |
|
|
|
$content = $data[6];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//处理seo
|
|
|
|
$seo_mate = [
|
|
|
|
'title' => $data[8]??'',
|
|
...
|
...
|
@@ -453,8 +455,6 @@ class ProductLogic extends BaseLogic |
|
|
|
'description' => $data[10]??''
|
|
|
|
];
|
|
|
|
|
|
|
|
$product = $this->model->read(['title' => $data[0]]);
|
|
|
|
if (!$product) {
|
|
|
|
$id = $this->model->addReturnId(
|
|
|
|
[
|
|
|
|
'project_id' => $project_id,
|
...
|
...
|
|