更新
This commit is contained in:
parent
72cd3e5054
commit
9fda964fc5
@ -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'] ?? null,
|
'annex' => $params['annex'] ?json_encode($params['annex']):'',
|
||||||
]);
|
]);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return true;
|
return true;
|
||||||
|
@ -107,11 +107,11 @@ class CustomContactsValidate extends BaseValidate
|
|||||||
|
|
||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && !is_array($value)){
|
||||||
$annex = json_decode($value,true);
|
// $annex = json_decode($value,true);
|
||||||
if(empty($annex) || !is_array($annex)){
|
// if(empty($annex) || !is_array($annex)){
|
||||||
return '附件数据格式错误';
|
return '附件数据格式错误';
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user