作者 郭文星

123

@@ -62,7 +62,6 @@ class Login extends Base @@ -62,7 +62,6 @@ class Login extends Base
62 "wx_xcx_openid" => $res['openid'], 62 "wx_xcx_openid" => $res['openid'],
63 ]; 63 ];
64 $ret = $this->auth->register($username, "a123456", '','', $extend_data); 64 $ret = $this->auth->register($username, "a123456", '','', $extend_data);
65 - print_r($ret);return;  
66 if($ret){ 65 if($ret){
67 $return_data = $this->auth->getUserinfo(); 66 $return_data = $this->auth->getUserinfo();
68 $this->success('查询用户信息成功2',$return_data); 67 $this->success('查询用户信息成功2',$return_data);
@@ -142,14 +142,8 @@ class Auth @@ -142,14 +142,8 @@ class Auth
142 $this->setError('Nickname already exist'); 142 $this->setError('Nickname already exist');
143 return false; 143 return false;
144 } 144 }
145 - if ($email && User::getByEmail($email)) {  
146 - $this->setError('Email already exist');  
147 - return false;  
148 - }  
149 - if ($mobile && User::getByMobile($mobile)) {  
150 - $this->setError('Mobile already exist');  
151 - return false;  
152 - } 145 +
  146 +
153 147
154 $ip = request()->ip(); 148 $ip = request()->ip();
155 $time = time(); 149 $time = time();
@@ -163,6 +157,8 @@ class Auth @@ -163,6 +157,8 @@ class Auth
163 'score' => 0, 157 'score' => 0,
164 'avatar' => '', 158 'avatar' => '',
165 ]; 159 ];
  160 + print_r($data);return;
  161 +
166 $params = array_merge($data, [ 162 $params = array_merge($data, [
167 'nickname' => preg_match("/^1[3-9]{1}\d{9}$/", $username) ? substr_replace($username, '****', 3, 4) : $username, 163 'nickname' => preg_match("/^1[3-9]{1}\d{9}$/", $username) ? substr_replace($username, '****', 3, 4) : $username,
168 'salt' => Random::alnum(), 164 'salt' => Random::alnum(),