1.优化设备只能登录一个
This commit is contained in:
@@ -6,6 +6,7 @@ namespace app\api\controller;
|
||||
|
||||
use app\common\controller\Api;
|
||||
use app\common\facade\Token;
|
||||
use app\common\service\MobileAuthDeviceService;
|
||||
use ba\Random;
|
||||
use Webman\Http\Request;
|
||||
use support\Response;
|
||||
@@ -64,6 +65,7 @@ class V1 extends Api
|
||||
$token = Random::uuid();
|
||||
$expire = 60 * 60 * 24;
|
||||
Token::set($token, 'auth-token', 0, $expire);
|
||||
MobileAuthDeviceService::bindAuthTokenDevice($token, $deviceId, $expire);
|
||||
|
||||
return $this->mobileResult(1, 'ok', [
|
||||
'auth_token' => $token,
|
||||
|
||||
Reference in New Issue
Block a user