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',