|
@@ -11,7 +11,6 @@ use think\Validate;
|
|
|
|
|
|
use app\common\library\Token;
|
|
|
use think\Db;
|
|
|
-use app\common\model\UserDeviceInfo;
|
|
|
use onlogin\onlogin;
|
|
|
|
|
|
use addons\epay\library\Service;
|
|
@@ -97,7 +96,7 @@ class User extends Api
|
|
|
|
|
|
} else {
|
|
|
$extend = [
|
|
|
-
|
|
|
+ 'plat_unique_id' => input('plat_unique_id','','trim'),
|
|
|
];
|
|
|
$ret = $this->auth->register('', '', '', $mobile, $extend);
|
|
|
|
|
@@ -235,7 +234,7 @@ class User extends Api
|
|
|
|
|
|
} else {
|
|
|
$extend = [
|
|
|
-
|
|
|
+ 'plat_unique_id' => input('plat_unique_id','','trim'),
|
|
|
];
|
|
|
$ret = $this->auth->register('', '', '', $mobile, $extend);
|
|
|
$is_register = 1;
|
|
@@ -626,7 +625,7 @@ class User extends Api
|
|
|
} else {
|
|
|
$extend = [
|
|
|
'ios_user_id' => $iosUserId,
|
|
|
-
|
|
|
+ 'plat_unique_id' => input('plat_unique_id','','trim'),
|
|
|
];
|
|
|
$ret = $this->auth->register('', '','', $mobile, $extend);
|
|
|
}
|
|
@@ -701,7 +700,7 @@ class User extends Api
|
|
|
} else {
|
|
|
$extend = [
|
|
|
'wechat_openid' => $wechatCode['openid'],
|
|
|
-
|
|
|
+ 'plat_unique_id' => input('plat_unique_id','','trim'),
|
|
|
];
|
|
|
$ret = $this->auth->register('', '','', $mobile, $extend);
|
|
|
}
|
|
@@ -826,40 +825,7 @@ class User extends Api
|
|
|
*/
|
|
|
public function changeDeviceIp()
|
|
|
{
|
|
|
- // 接口防并发
|
|
|
- if (!$this->apiLimit(1, 5000)) {
|
|
|
- return ;
|
|
|
- }
|
|
|
|
|
|
- $user = $this->auth->getUser();
|
|
|
- $ip = request()->ip();
|
|
|
- $deviceId = $this->request->request('device_id','');
|
|
|
- $phoneModel = $this->request->request('phone_model','');
|
|
|
- $brand = $this->request->request('brand','');
|
|
|
- $apiVersion = $this->request->request('api_version','');
|
|
|
- $deviceOs = $this->request->request('device_os','');
|
|
|
-
|
|
|
- if ($ip !== $user->loginip){
|
|
|
- $update = [];
|
|
|
- $update['id'] = $user->id;
|
|
|
- $update['loginip'] = $ip;
|
|
|
- \app\common\model\User::update($update);
|
|
|
- }
|
|
|
-
|
|
|
- $userDeviceInfo = UserDeviceInfo::get(['user_id'=>$user->u_id]);
|
|
|
- if (empty($userDeviceInfo)){
|
|
|
- $userDeviceInfo = new UserDeviceInfo();
|
|
|
- $userDeviceInfo->user_id = $user->u_id;
|
|
|
- }
|
|
|
- $userDeviceInfo->device_os = $deviceOs;
|
|
|
- $userDeviceInfo->device_id = $deviceId;
|
|
|
- $userDeviceInfo->phone_model = $phoneModel;
|
|
|
- $userDeviceInfo->brand = $brand;
|
|
|
- $userDeviceInfo->api_version = $apiVersion;
|
|
|
- $userDeviceInfo->save();
|
|
|
-
|
|
|
- //首页接口调用,这里不反回信息
|
|
|
-// $this->success("更新成功!");
|
|
|
}
|
|
|
|
|
|
//假注销
|