作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

... ... @@ -308,9 +308,9 @@ class ProjectUpdate extends Command
}
foreach ($items as $item) {
if ($item['ttile'] ?? '') {
$news = $model->read(['name' => $item['ttile']], 'id');
$route = $this->get_url_route($item['url']);
if ($route) {
$news = $model->read(['url' => $route], 'id');
if (!$news) {
try {
$item['ttile'] = $this->special2str($item['ttile']);
... ... @@ -320,8 +320,8 @@ class ProjectUpdate extends Command
} else {
$image = $item['images'] ?? '';
}
if(strpos($image,'//') === 0){
$image = 'https:'.$image;
if (strpos($image, '//') === 0) {
$image = 'https:' . $image;
}
$id = $model->addReturnId([
'project_id' => $project_id,
... ... @@ -332,9 +332,9 @@ class ProjectUpdate extends Command
'text' => $item['content'] ?? '',
'image' => $image,
'status' => $api_type == 'news' ? News::STATUS_ONE : Blog::STATUS_ONE,
'url' => $this->get_url_route($item['url'])
'url' => $route
]);
$this->set_map($this->get_url_route($item['url']), $api_type == 'news' ? RouteMap::SOURCE_NEWS : RouteMap::SOURCE_BLOG, $id, $project_id);
$this->set_map($route, $api_type == 'news' ? RouteMap::SOURCE_NEWS : RouteMap::SOURCE_BLOG, $id, $project_id);
CollectTask::_insert($item['url'], $project_id, $api_type == 'news' ? RouteMap::SOURCE_NEWS : RouteMap::SOURCE_BLOG, $id, $link_type, $language_list, $page_list);
} catch (\Exception $e) {
... ...