|
@@ -87,6 +87,7 @@ class User extends Api
|
|
|
/*if (!Validate::regex($mobile, "^1\d{10}$")) {
|
|
|
$this->error(__('Mobile is incorrect'));
|
|
|
}*/
|
|
|
+ $simplemobile = $mobile;
|
|
|
$mobile = $countrycode.$mobile;
|
|
|
if (!Sms::check($mobile, $captcha, 'mobilelogin')) {
|
|
|
$this->error(__('Captcha is incorrect'));
|
|
@@ -105,7 +106,7 @@ class User extends Api
|
|
|
|
|
|
} else {
|
|
|
$extend = [
|
|
|
-// 'register_from' => input('register_from',''),
|
|
|
+ 'simplemobile' => $simplemobile,
|
|
|
];
|
|
|
$ret = $this->auth->register('', '', '', $mobile, $extend);
|
|
|
|
|
@@ -263,6 +264,7 @@ class User extends Api
|
|
|
// 取号成功, 执行登录等流程
|
|
|
// 用户登录逻辑 === 开始
|
|
|
$countrycode = 86;
|
|
|
+ $simplemobile = $mobile;
|
|
|
$mobile = $countrycode.$mobile;
|
|
|
$user = \app\common\model\User::getByMobile($mobile);
|
|
|
if ($user) {
|
|
@@ -278,8 +280,10 @@ class User extends Api
|
|
|
|
|
|
|
|
|
} else {
|
|
|
-
|
|
|
- $ret = $this->auth->register('', '', '', $mobile, []);
|
|
|
+ $extend = [
|
|
|
+ 'simplemobile' => $simplemobile,
|
|
|
+ ];
|
|
|
+ $ret = $this->auth->register('', '', '', $mobile, $extend);
|
|
|
$is_register = 1;
|
|
|
|
|
|
}
|
|
@@ -609,6 +613,7 @@ class User extends Api
|
|
|
/*if (!Validate::regex($mobile, "^1\d{10}$")) {
|
|
|
$this->error(__('Mobile is incorrect'));
|
|
|
}*/
|
|
|
+ $simplemobile = $mobile;
|
|
|
$mobile = $countrycode.$mobile;
|
|
|
$result = Sms::check($mobile, $captcha, 'changemobile');
|
|
|
if (!$result) {
|
|
@@ -646,6 +651,7 @@ class User extends Api
|
|
|
} else {
|
|
|
$extend = [
|
|
|
'ios_user_id' => $iosUserId,
|
|
|
+ 'simplemobile' => $simplemobile,
|
|
|
];
|
|
|
$ret = $this->auth->register('', '','', $mobile, $extend);
|
|
|
}
|
|
@@ -677,6 +683,7 @@ class User extends Api
|
|
|
/*if (!Validate::regex($mobile, "^1\d{10}$")) {
|
|
|
$this->error(__('Mobile is incorrect'));
|
|
|
}*/
|
|
|
+ $simplemobile = $mobile;
|
|
|
$mobile = $countrycode.$mobile;
|
|
|
$result = Sms::check($mobile, $captcha, 'changemobile');
|
|
|
if (!$result) {
|
|
@@ -718,6 +725,7 @@ class User extends Api
|
|
|
} else {
|
|
|
$extend = [
|
|
|
'wechat_openid' => $wechatCode['openid'],
|
|
|
+ 'simplemobile' => $simplemobile,
|
|
|
];
|
|
|
$ret = $this->auth->register('', '','', $mobile, $extend);
|
|
|
}
|