wesmiler 3 лет назад
Родитель
Сommit
fe07e3bed2
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      source/application/api/service/User.php

+ 3 - 3
source/application/api/service/User.php

@@ -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()]);