作者 lyh

gx

@@ -25,8 +25,6 @@ class ProcessRecordsLogic extends BaseLogic @@ -25,8 +25,6 @@ class ProcessRecordsLogic extends BaseLogic
25 'record' => [], 25 'record' => [],
26 'remark' => '', 26 'remark' => '',
27 ]; 27 ];
28 - }else{  
29 - $data = $data->toArray();  
30 } 28 }
31 $data['project_company'] = $project['company'] ?? ''; 29 $data['project_company'] = $project['company'] ?? '';
32 $data['project_plan'] = $project['deploy_build']['plan'][0] ?? ''; 30 $data['project_plan'] = $project['deploy_build']['plan'][0] ?? '';
@@ -12,7 +12,7 @@ class ProcessRecords extends Base @@ -12,7 +12,7 @@ class ProcessRecords extends Base
12 protected $table = 'gl_project_process_records'; 12 protected $table = 'gl_project_process_records';
13 13
14 public function setRecordAttribute($value){ 14 public function setRecordAttribute($value){
15 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($value, true) . PHP_EOL, FILE_APPEND); 15 +
16 foreach ($value as &$v){ 16 foreach ($value as &$v){
17 foreach ($v['image'] as $kImage => $vImage){ 17 foreach ($v['image'] as $kImage => $vImage){
18 $v['image'][$kImage] = basename($vImage); 18 $v['image'][$kImage] = basename($vImage);
@@ -21,12 +21,12 @@ class ProcessRecords extends Base @@ -21,12 +21,12 @@ class ProcessRecords extends Base
21 $v['file'][$kFile] = basename($vFile); 21 $v['file'][$kFile] = basename($vFile);
22 } 22 }
23 } 23 }
24 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($value, true) . PHP_EOL, FILE_APPEND);  
25 $this->attributes['record'] = Arr::a2s($value); 24 $this->attributes['record'] = Arr::a2s($value);
26 } 25 }
27 26
28 public function getRecordAttribute($value){ 27 public function getRecordAttribute($value){
29 $value = Arr::s2a($value); 28 $value = Arr::s2a($value);
  29 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($value, true) . PHP_EOL, FILE_APPEND);
30 foreach ($value as &$v){ 30 foreach ($value as &$v){
31 foreach ($v['image'] as $kImage => $vImage){ 31 foreach ($v['image'] as $kImage => $vImage){
32 $v['image'][$kImage] = getImageUrl($vImage); 32 $v['image'][$kImage] = getImageUrl($vImage);