diff --git a/api/account.php b/api/account.php index dec4718..c676b3c 100644 --- a/api/account.php +++ b/api/account.php @@ -315,7 +315,19 @@ function acctAuthPlayer() { if ($ban !== null) error('账号已被封禁:' . $ban, 403); $blk = playerWebBlacklistReason($player); if ($blk !== null) error('你已被拉黑,无法进行账号安全操作', 403); - if (!isPlayerRegistered($player)) error('玩家未注册', 403); + if (!isPlayerRegistered($player)) { + // ★第57批续9:Java端已验证的玩家(web_login_verified表)放行,避免users表同步延迟导致偶发无效 + $vdb = getDB(); + try { + $vdb->exec("CREATE TABLE IF NOT EXISTS web_login_verified (player_name TEXT PRIMARY KEY, verified_at INTEGER NOT NULL)"); + $vStmt = $vdb->prepare("SELECT 1 FROM web_login_verified WHERE player_name = :player"); + $vStmt->bindValue(':player', $player, SQLITE3_TEXT); + $vRow = $vStmt->execute()->fetchArray(); + if (!$vRow) error('玩家未注册', 403); + } catch (\Throwable $e) { + error('玩家未注册', 403); + } + } return $player; } diff --git a/player.php b/player.php index 35704a6..d87551e 100644 --- a/player.php +++ b/player.php @@ -2738,19 +2738,23 @@ if ($currentVersion !== $BUILD_VERSION) { } if (d.status === 'approved') { if (_bindWizTimer) { clearInterval(_bindWizTimer); _bindWizTimer = null; } + closeDrawer(); acctBindEmailPwdStep(); return; } if (d.status === 'completed') { if (_bindWizTimer) { clearInterval(_bindWizTimer); _bindWizTimer = null; } + closeDrawer(); acctBindEmailCodeStep(d.email); return; } + closeDrawer(); acctBindEmailFinish(d.status, d.fail_reason); } catch (e) { /* 网络抖动忽略,下一轮重试 */ } } function acctBindEmailCodeStep(email) { + closeDrawer(); const _masked = (email || '').replace(/^(.).*(@.*)$/, '$1***$2'); acctModalSet(`
✅ 游戏内已批准,邮箱 ${_masked} 已绑定。 @@ -2822,6 +2826,7 @@ if ($currentVersion !== $BUILD_VERSION) { function acctBindEmailFinish(status, reason) { if (_bindWizTimer) { clearInterval(_bindWizTimer); _bindWizTimer = null; } + closeDrawer(); if (status === 'rejected') { acctModalSet( '
' +