Commit ec64dd58 authored by 刘小敏's avatar 刘小敏

用户修改 增加性别修改字段

parent a764fff3
......@@ -97,7 +97,7 @@ class User extends Common
}
$user = auth_user();
$params = $this->request->only(['avatar', 'nickname', 'birthday']);
$params = $this->request->only(['avatar', 'nickname', 'birthday', 'gender']);
$this->svalidate($params, '.update');
// 处理 birthday 字段为空字符串的情况
......
......@@ -25,6 +25,7 @@ class User extends Validate
'email' => 'email|unique:user',
'code' => 'require',
'birthday' => 'regex:date',
'gender' => 'in:0,1,2',
];
protected $message = [
......@@ -75,6 +76,6 @@ class User extends Validate
'changeMobile' => ['mobile' => 'require|regex:mobile|unique:user', 'code'],
'changeUsername' => ['username'],
'updateMpUserInfo' => ['avatar', 'nickname'],
'update' => ['birthday']
'update' => ['birthday', 'gender']
];
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment