diff --git a/app/controller/FollowController.php b/app/controller/FollowController.php index f418015..fd6aa72 100644 --- a/app/controller/FollowController.php +++ b/app/controller/FollowController.php @@ -123,10 +123,13 @@ class FollowController if(Util::isEmpty($type)){ return Util::fail([],'type'.trans('not_null')); } - // $picture = Util::getParam($request,'picture'); - // if(Util::isEmpty($picture)){ - // return Util::fail([],trans('picture_not_null')); - // } + + $picture = Util::getParam($request,'picture'); + $audio_text = Util::getParam($request,'audio_text'); + $remark = Util::getParam($request,'remark'); + if(Util::isEmpty($picture) && Util::isEmpty($audio_text) && Util::isEmpty($remark)){ + return Util::fail([],trans('follow_not_null')); + } $data = [ 'user_id'=>$request->user['id'], diff --git a/resource/translations/en/messages.php b/resource/translations/en/messages.php index 14f43de..21bb0ff 100644 --- a/resource/translations/en/messages.php +++ b/resource/translations/en/messages.php @@ -22,6 +22,7 @@ return [ 'param_error' => ' param error', 'required_not_null' => ' required not_ ull', 'picture_not_null' => ' picture not null', + 'follow_not_null' => ' The image and follow-up content cannot be empty at the same time', 'contacts_not_null' => ' Contact person, email, and phone cannot be empty at the same time', 'car_type_not_null' => ' preference_not_null', 'channel_not_null' => ' channel not null', diff --git a/resource/translations/ru/messages.php b/resource/translations/ru/messages.php index c96f0ab..67617df 100644 --- a/resource/translations/ru/messages.php +++ b/resource/translations/ru/messages.php @@ -22,6 +22,7 @@ return [ 'param_error' => ' Ошибка параметра', 'required_not_null' => ' Обязательное заполнение не может быть пустым.', 'picture_not_null' => ' Фотографии не могут быть пустыми', + 'follow_not_null' => ' Изображение и последующий контент не могут быть пустыми одновременно.X', 'contacts_not_null' => ' Контакты, почтовый ящик, телефон не может быть одновременно пустым', 'car_type_not_null' => ' Предпочтения не могут быть пустыми', 'channel_not_null' => ' Каналы не могут быть пустыми', diff --git a/resource/translations/zh_CN/messages.php b/resource/translations/zh_CN/messages.php index 07f384d..98cdfcb 100644 --- a/resource/translations/zh_CN/messages.php +++ b/resource/translations/zh_CN/messages.php @@ -22,6 +22,7 @@ return [ 'param_error' => ' 参数错误', 'required_not_null' => ' 必填项不能为空', 'picture_not_null' => ' 图片不能为空', + 'follow_not_null' => ' 图片与跟进内容不能同时为空', 'contacts_not_null' => ' 联系人,邮箱,电话不能同时为空', 'car_type_not_null' => ' 偏好不能为空', 'channel_not_null' => ' 渠道不能为空',