This commit is contained in:
weiz 2024-01-15 15:40:40 +08:00
parent 9475b5c7c9
commit 8fc7710f63
2 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@ class CustomContactsLogic extends BaseLogic
'telephone' => $params['telephone'] ?? '', 'telephone' => $params['telephone'] ?? '',
'email' => $params['email'] ?? '', 'email' => $params['email'] ?? '',
'notes' => $params['notes'] ?? '', 'notes' => $params['notes'] ?? '',
'annex' => $params['annex'] ?json_encode($params['annex']):'', 'annex' => $params['annex'] ? json_encode($params['annex']) : null,
]); ]);
Db::commit(); Db::commit();
return true; return true;

View File

@ -107,11 +107,11 @@ class CustomContactsValidate extends BaseValidate
public function checkAnnex($value): bool|string public function checkAnnex($value): bool|string
{ {
if(!empty($value) && !is_array($value)){ if(!empty($value) && $value != ''){
// $annex = json_decode($value,true); $annex = $value;//json_decode($value,true);
// if(empty($annex) || !is_array($annex)){ if(empty($annex) || !is_array($annex)){
return '附件数据格式错误'; return '附件格式错误';
// } }
} }
return true; return true;
} }