升级php版本后错误修复

This commit is contained in:
2024-12-02 09:02:37 +08:00
parent 8cccdec06d
commit dc37829fa1
2 changed files with 12 additions and 8 deletions

View File

@@ -139,14 +139,20 @@ class PatientController extends BaseServiceController
'patient'=>'patient.name',
'idcard'=>'patient.id_card',
'mobile'=>'patient.mobile',
'status_text'=> function ($d) {
return self::getStatusInfo($d->status, 'text');
},
'status_type' => function ($d) {
return self::getStatusInfo($d->status, 'type');
},
'status','status_text','status_type','is_pay','created_at','is_cancel'
]
];
$list = $this->create($query,$post);
foreach ($list->models as &$model) {
$model->status_text = self::getStatusInfo($model->status, 'text');
$model->status_type = self::getStatusInfo($model->status, 'type');
}
// foreach ($list->models as &$model) {
// $model->status_text = self::getStatusInfo($model->status, 'text');
// $model->status_type = self::getStatusInfo($model->status, 'type');
// }
return $list;
}