|
@@ -290,10 +290,7 @@ class User extends Api
|
|
$ret = $this->auth->direct($user->id);
|
|
$ret = $this->auth->direct($user->id);
|
|
$is_register = 0;
|
|
$is_register = 0;
|
|
|
|
|
|
- //非首次注册男性用户每次打开app,系统自动推送女性(公会)打招呼消息3人次
|
|
|
|
- /*if($user->gender == 1 && $user->gh_id == 0){
|
|
|
|
- $this->firstopen_send($user->id);
|
|
|
|
- }*/
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
// $this->success('选择性别', ['code' => 5]);
|
|
// $this->success('选择性别', ['code' => 5]);
|
|
|
|
|
|
@@ -303,15 +300,10 @@ class User extends Api
|
|
];
|
|
];
|
|
$ret = $this->auth->register($mobile, Random::alnum(), '', $mobile, $extend);
|
|
$ret = $this->auth->register($mobile, Random::alnum(), '', $mobile, $extend);
|
|
$is_register = 1;
|
|
$is_register = 1;
|
|
- //亿米
|
|
|
|
-// if(input('register_from','') == 'xiaomi'){
|
|
|
|
-// $this->yimi_advert();
|
|
|
|
-// }
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
- //结果
|
|
|
|
- /*$rs['userinfo'] = $this->auth->getUserinfo();
|
|
|
|
- $rs['is_register'] = $is_register;*/
|
|
|
|
|
|
+
|
|
if ($ret) {
|
|
if ($ret) {
|
|
$this->success(__('Logged in successful'), $this->auth->getUserinfo());
|
|
$this->success(__('Logged in successful'), $this->auth->getUserinfo());
|
|
} else {
|
|
} else {
|
|
@@ -381,10 +373,7 @@ class User extends Api
|
|
$ret = $this->auth->direct($user->id);
|
|
$ret = $this->auth->direct($user->id);
|
|
$is_register = 0;
|
|
$is_register = 0;
|
|
|
|
|
|
- //非首次注册男性用户每次打开app,系统自动推送女性(公会)打招呼消息3人次
|
|
|
|
- /*if($user->gender == 1 && $user->gh_id == 0){
|
|
|
|
- $this->firstopen_send($user->id);
|
|
|
|
- }*/
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
$extend = [
|
|
$extend = [
|
|
'register_from' => input('register_from',''),
|
|
'register_from' => input('register_from',''),
|
|
@@ -392,15 +381,11 @@ class User extends Api
|
|
];
|
|
];
|
|
$ret = $this->auth->register($mobile, Random::alnum(), '', $mobile, $extend);
|
|
$ret = $this->auth->register($mobile, Random::alnum(), '', $mobile, $extend);
|
|
$is_register = 1;
|
|
$is_register = 1;
|
|
- //亿米
|
|
|
|
-// if(input('register_from','') == 'xiaomi'){
|
|
|
|
-// $this->yimi_advert();
|
|
|
|
-// }
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
//结果
|
|
//结果
|
|
- /*$rs['userinfo'] = $this->auth->getUserinfo();
|
|
|
|
- $rs['is_register'] = $is_register;*/
|
|
|
|
|
|
+
|
|
if ($ret) {
|
|
if ($ret) {
|
|
$this->success(__('Logged in successful'), $this->auth->getUserinfo());
|
|
$this->success(__('Logged in successful'), $this->auth->getUserinfo());
|
|
} else {
|
|
} else {
|
|
@@ -1857,7 +1842,7 @@ class User extends Api
|
|
$this->error('您的网络开小差啦~');
|
|
$this->error('您的网络开小差啦~');
|
|
}
|
|
}
|
|
|
|
|
|
- $data = $this->userInfo('return');
|
|
|
|
|
|
+ //$data = $this->userInfo('return');
|
|
$data['gender'] = $edit_data['gender'];
|
|
$data['gender'] = $edit_data['gender'];
|
|
$data['avatar'] = $edit_data['avatar'];
|
|
$data['avatar'] = $edit_data['avatar'];
|
|
|
|
|