作者 刘锟

update

@@ -320,6 +320,9 @@ class ProjectUpdate extends Command @@ -320,6 +320,9 @@ class ProjectUpdate extends Command
320 } else { 320 } else {
321 $image = $item['images'] ?? ''; 321 $image = $item['images'] ?? '';
322 } 322 }
  323 + if(strpos($image,'//') === 0){
  324 + $image = 'https:'.$image;
  325 + }
323 $id = $model->addReturnId([ 326 $id = $model->addReturnId([
324 'project_id' => $project_id, 327 'project_id' => $project_id,
325 'name' => $item['ttile'], 328 'name' => $item['ttile'],
@@ -40,7 +40,7 @@ class Temp extends Command @@ -40,7 +40,7 @@ class Temp extends Command
40 40
41 protected function start_update() 41 protected function start_update()
42 { 42 {
43 - $list = UpdateLog::where('project_id', 437)->where('api_type', 'news')->get(); 43 + $list = UpdateLog::where('project_id', '!=', 437)->where('api_type', 'news')->get();
44 44
45 foreach ($list as $task) { 45 foreach ($list as $task) {
46 $project_id = $task->project_id; 46 $project_id = $task->project_id;
@@ -86,8 +86,8 @@ class Temp extends Command @@ -86,8 +86,8 @@ class Temp extends Command
86 } else { 86 } else {
87 $image = $item['images'] ?? ''; 87 $image = $item['images'] ?? '';
88 } 88 }
89 - if(strpos($image,'//') === 0){  
90 - $image = 'https:'.$image; 89 + if (strpos($image, '//') === 0) {
  90 + $image = 'https:' . $image;
91 } 91 }
92 $model->edit(['image' => $image], ['id' => $news['id']]); 92 $model->edit(['image' => $image], ['id' => $news['id']]);
93 } catch (\Exception $e) { 93 } catch (\Exception $e) {