1.优化设备只能登录一个

This commit is contained in:
2026-05-29 14:19:24 +08:00
parent 1df1396b44
commit 4324c19d30
8 changed files with 217 additions and 2 deletions

View File

@@ -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,