|
@@ -1314,12 +1314,15 @@ class LoginController extends Controller
|
|
|
$Phone = $this->checkPhone($Phone, $RegisterLocation,$request);
|
|
$Phone = $this->checkPhone($Phone, $RegisterLocation,$request);
|
|
|
//有错误返回
|
|
//有错误返回
|
|
|
if (is_array($Phone)) {
|
|
if (is_array($Phone)) {
|
|
|
- $Phone = "";
|
|
|
|
|
|
|
+ return $Phone;
|
|
|
}else if(is_object($Phone)&&isset($Phone->GlobalUID)){
|
|
}else if(is_object($Phone)&&isset($Phone->GlobalUID)){
|
|
|
//原来就存在,直接返回
|
|
//原来就存在,直接返回
|
|
|
$guser = GlobalUserInfo::toWebData($Phone,true);
|
|
$guser = GlobalUserInfo::toWebData($Phone,true);
|
|
|
$guser['reg'] = 1;
|
|
$guser['reg'] = 1;
|
|
|
return response()->json(apiReturnSuc($guser, ['reg.success', 'Registro realizado com sucesso!']));
|
|
return response()->json(apiReturnSuc($guser, ['reg.success', 'Registro realizado com sucesso!']));
|
|
|
|
|
+ } else if (is_numeric($Phone) && !str_starts_with($Phone, $RegisterLocation)) {
|
|
|
|
|
+ //如果是纯数字且不以国家码开头,自动加上国家码
|
|
|
|
|
+ $Phone = $RegisterLocation . $Phone;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|