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