第57批续9: 修复弹窗卡死(poll终态前关drawer)+token偶发无效(web_login_verified fallback)
This commit is contained in:
+13
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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(`
|
||||
<div style="font-size:13px;color:var(--dim);margin-bottom:10px;line-height:1.7">✅ 游戏内已批准,邮箱 <b>${_masked}</b> 已绑定。
|
||||
@@ -2822,6 +2826,7 @@ if ($currentVersion !== $BUILD_VERSION) {
|
||||
|
||||
function acctBindEmailFinish(status, reason) {
|
||||
if (_bindWizTimer) { clearInterval(_bindWizTimer); _bindWizTimer = null; }
|
||||
closeDrawer();
|
||||
if (status === 'rejected') {
|
||||
acctModalSet(
|
||||
'<div style="text-align:center;padding:20px 0;font-size:14px;line-height:1.8">' +
|
||||
|
||||
Reference in New Issue
Block a user