作者 lyh
... ... @@ -38,7 +38,7 @@ class Temp extends Command
if ($project) {
$list = Product::get();
foreach ($list as $item) {
$seo = json_decode($item->seo_mate, true);
$seo = $item->seo_mate;
if ($seo) {
$seo['title'] = substr(strip_tags($seo['title']), 0, 70);
$seo['keyword'] = substr(strip_tags($seo['keyword']), 0, 255);
... ...
... ... @@ -608,7 +608,6 @@ class ProductLogic extends BaseLogic
$categoryLogic = new CategoryLogic();
$category_id = $categoryLogic->importProductCategory($project_id, $data[2]);
}
echo 'category'.PHP_EOL;
$keyword_id = '';
if($data[3]??''){
... ... @@ -616,7 +615,6 @@ class ProductLogic extends BaseLogic
$keywordLogic = new KeywordLogic();
$keyword_id = $keywordLogic->importProductKeyword($project_id, $data[3]);
}
echo 'keyword'.PHP_EOL;
$gallery = [];
$thumb = '';
... ... @@ -641,7 +639,6 @@ class ProductLogic extends BaseLogic
}
}
}
echo 'thumb'.PHP_EOL;
$intro = '';
if($data[5]??''){
... ... @@ -665,7 +662,6 @@ class ProductLogic extends BaseLogic
$intro = $data[5];
}
echo 'intro'.PHP_EOL;
$content = '';
if($data[6]??''){
... ... @@ -689,7 +685,6 @@ class ProductLogic extends BaseLogic
$content = $data[6];
}
echo 'content'.PHP_EOL;
//处理seo
$seo_title = '';
... ... @@ -706,7 +701,6 @@ class ProductLogic extends BaseLogic
if($data[10]??''){
$seo_description = substr(strip_tags($data[10]),0,200);
}
echo 'seo'.PHP_EOL;
$seo_mate = [
'title' => $seo_title,
... ... @@ -731,7 +725,6 @@ class ProductLogic extends BaseLogic
}
}
}
echo 'attr'.PHP_EOL;
//处理描述切换栏
$describe = [];
... ... @@ -762,7 +755,6 @@ class ProductLogic extends BaseLogic
break;
}
}
echo 'describe'.PHP_EOL;
$id = $this->model->addReturnId(
[
... ... @@ -781,7 +773,6 @@ class ProductLogic extends BaseLogic
'status' => Product::STATUS_ON
]
);
echo 'product'.PHP_EOL;
//更新路由
if($route){
... ...