|
|
@@ -72,13 +72,13 @@ class User
|
|
|
public static function setProfile($userId, $post)
|
|
|
{
|
|
|
$nickname = isset($post['nickname'])? trim($post['nickname']) : '';
|
|
|
- if(empty($password)){
|
|
|
- throw new Exception('请输入6位数字密码');
|
|
|
+ if(empty($nickname)){
|
|
|
+ throw new Exception('请填写用户昵称');
|
|
|
}
|
|
|
|
|
|
$mobile = isset($post['mobile'])? trim($post['mobile']) : '';
|
|
|
if(empty($mobile) || !isMobile($mobile)){
|
|
|
- throw new Exception('请输入正确的手机号码');
|
|
|
+ throw new Exception('请填写正确的手机号码');
|
|
|
}
|
|
|
|
|
|
return UserModel::where('user_id', $userId)->update(['nickName'=>$nickname,'mobile'=>$mobile,'update_time'=>time()]);
|