refactor(linuxdo): 优化账号绑定页面布局和代码结构

- 调整了页面布局,增加了 div 容器以改善元素排列
- 优化了 JavaScript 代码格式,提高了可读性
- 修复了一些小问题,如移除了多余的空行和不必要的换行符
This commit is contained in:
2024-12-22 11:22:36 +08:00
parent 2515e69686
commit 35c1afacc3

View File

@@ -138,30 +138,32 @@ function get_curl($url, $post = 0, $referer = 0, $cookie = 0, $header = 0, $ua =
?>
<!DOCTYPE HTML>
<html>
<head>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="applicable-device" content="mobile">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="full-screen" content="yes"/>
<meta name="x5-fullscreen" content="true"/>
<meta name="360-fullscreen" content="true"/>
<meta name="full-screen" content="yes" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<meta name="screen-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
<meta name="x5-page-mode" content="app">
<title><?=$_CONFIG['game_name']?> <?=$_CONFIG['game_description']?></title>
<meta name="description" content="<?=$_CONFIG['game_name']?> <?=$_CONFIG['game_description']?>">
<meta name="keywords" content="<?=$_CONFIG['game_name']?>,<?=$_CONFIG['game_description']?>">
<title><?= $_CONFIG['game_name'] ?> <?= $_CONFIG['game_description'] ?></title>
<meta name="description" content="<?= $_CONFIG['game_name'] ?> <?= $_CONFIG['game_description'] ?>">
<meta name="keywords" content="<?= $_CONFIG['game_name'] ?>,<?= $_CONFIG['game_description'] ?>">
<link rel="stylesheet" href="static/css/login.css?v=1.1.6"/>
<link rel="stylesheet" href="static/css/login.css?v=1.1.6" />
<script>
document.onkeydown = document.onkeyup = document.onkeypress = function(event) {
document.onkeydown = document.onkeyup = document.onkeypress = function (event) {
var e = event || window.event || arguments.callee.caller.arguments[0];
if (e && e.keyCode == 123) {
e.returnValue = false;
@@ -169,17 +171,13 @@ function get_curl($url, $post = 0, $referer = 0, $cookie = 0, $header = 0, $ua =
}
}
</script>
<script src="static/layer/layer.js"></script>
<script src="static/js/common.js?v=1"></script>
<script>
</head>
layer.config({skin: 'dialogs'});
</script>
</head>
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
<?php if (empty($row)) {?>
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
<?php if (empty($row)) { ?>
<div style="width:400px">
当前尚未有你的游戏账号,请选择<br>
<a onclick="registerDirect">Linuxdo账号绑定</a></br>
<a onclick="registerDirect" style="cursor:pointer"><b>Linuxdo账号绑定</b></a></br>
<input type="hidden" id="linuxdo" value="<?= $userInfo['user_username'] ?>">
<script>
function handleBind(account, linuxdo_account) {
@@ -213,11 +211,17 @@ function get_curl($url, $post = 0, $referer = 0, $cookie = 0, $header = 0, $ua =
}
</script>
<br>
<br>
如果已有账号,请输入账号和密码<br>
<input type="text" id="account" placeholder="请输入账号" onKeyUp="value = value.replace(/[\W]/g, '')" autocomplete="off"
disableautocomplete>
<input type="text" id="account" placeholder="请输入账号" onKeyUp="value = value.replace(/[\W]/g, '')"
autocomplete="off" disableautocomplete>
<br>
<input type="password" id="password" placeholder="请输入密码">
<br>
<button type="submit" @click="linkAccount">绑定并登录</button>
<?php } ?>
</div>
<?php } ?>
</body>
</html>