From 706d652ff91034f35bd7056a613398857b7ced9b Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Fri, 10 Jun 2022 11:36:32 +0800 Subject: [PATCH] setter --- app/controller/api/User.php | 4 ---- app/validate/User.php | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/controller/api/User.php b/app/controller/api/User.php index 7c0b954..dda5ef3 100755 --- a/app/controller/api/User.php +++ b/app/controller/api/User.php @@ -104,10 +104,6 @@ class User extends Base $now = date('Y-m-d H:i:s'); if (!$account) { - - if(empty($params['nickname'])||empty($params['headimgurl'] )){ - return $this->json(4002, '登录失败'); - } // 自动注册 $inviterAid = 0; $inviterParentAid = 0; diff --git a/app/validate/User.php b/app/validate/User.php index 6654fde..30ad557 100755 --- a/app/validate/User.php +++ b/app/validate/User.php @@ -11,8 +11,8 @@ class User extends Validate 'password|密码' => 'require|min:4|max:16', 'code|小程序code' => 'require', - 'nickname|昵称' => 'max:100', - 'headimgurl|头像' => 'max:300', + 'nickname|昵称' => 'require|max:100', + 'headimgurl|头像' => 'require|max:300', 'country|国家' => 'max:100', 'province|省份' => 'max:100', 'city|城市' => 'max:100',