feat(developer): 重构登录和注册页面样式并添加审核标准文档

- 使用 Bootstrap 重构登录和注册页面样式
- 在注册页面添加必须同意审核标准的复选框
- 新增 APP 审核标准文档
This commit is contained in:
2025-07-07 20:57:23 +08:00
parent 5ff5b53ed4
commit 433bfae1ba
3 changed files with 75 additions and 123 deletions

View File

@@ -54,89 +54,38 @@ if (!($conn instanceof mysqli)) {
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>开发者登录</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 300px;
}
h2 {
text-align: center;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="email"],
input[type="password"] {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 3px;
}
input[type="submit"] {
width: 100%;
padding: 10px;
background-color: #007BFF;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #0056b3;
}
.error {
color: red;
margin-bottom: 10px;
}
.success {
color: green;
margin-bottom: 10px;
}
.register-link {
text-align: center;
margin-top: 10px;
padding: 20px 0;
}
</style>
</head>
<body>
<div class="container">
<div class="container mt-5 col-md-4">
<h2>开发者登录</h2>
<?php if (isset($success)): ?>
<div class="success"><?php echo $success; ?></div>
<div class="alert alert-success" role="alert"><?php echo $success; ?></div>
<?php endif; ?>
<?php if (!empty($error)): ?>
<div class="error"><?php echo $error; ?></div>
<div class="alert alert-danger" role="alert"><?php echo $error; ?></div>
<?php endif; ?>
<form method="post">
<div class="form-group">
<label for="email">邮箱</label>
<input type="email" id="email" name="email" required>
<div class="mb-3">
<label for="email" class="form-label">邮箱</label>
<input type="email" id="email" name="email" class="form-control" required>
</div>
<div class="form-group">
<label for="password">密码</label>
<input type="password" id="password" name="password" required>
<label for="password" class="form-label">密码</label>
<input type="password" id="password" name="password" class="form-control" required>
</div>
<input type="submit" value="登录">
<button type="submit" class="btn btn-primary w-100">登录</button>
</form>
<div class="register-link">
还没有账号?<a href="register.php">注册</a>
<div class="text-center mt-3">
还没有账号?<a href="register.php" class="text-decoration-none">注册</a>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -10,6 +10,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (empty($username) || empty($email) || empty($password)) {
$error = '用户名、邮箱和密码不能为空';
} elseif (empty($_POST['agree'])) {
$error = '必须同意 APP 审核标准才能注册';
} elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$error = '请输入有效的邮箱地址';
} else {
@@ -57,80 +59,40 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>开发者注册</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 300px;
}
h2 {
text-align: center;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="text"],
input[type="email"],
input[type="password"] {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 3px;
}
input[type="submit"] {
width: 100%;
padding: 10px;
background-color: #007BFF;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #0056b3;
}
.error {
color: red;
margin-bottom: 10px;
padding: 20px 0;
}
</style>
</head>
<body>
<div class="container">
<div class="container mt-5 col-md-4">
<h2>开发者注册</h2>
<?php if (!empty($error)): ?>
<div class="error"><?php echo $error; ?></div>
<div class="alert alert-danger" role="alert"><?php echo $error; ?></div>
<?php endif; ?>
<form method="post">
<div class="form-group">
<label for="username">用户名</label>
<input type="text" id="username" name="username" required>
<div class="mb-3">
<label for="username" class="form-label">用户名</label>
<input type="text" id="username" name="username" class="form-control" required>
</div>
<div class="form-group">
<label for="email">邮箱</label>
<input type="email" id="email" name="email" required>
<label for="email" class="form-label">邮箱</label>
<input type="email" id="email" name="email" class="form-control" required>
</div>
<div class="form-group">
<label for="password">密码</label>
<input type="password" id="password" name="password" required>
<div class="mb-3">
<label for="password" class="form-label">密码</label>
<input type="password" id="password" name="password" class="form-control" required>
</div>
<input type="submit" value="注册">
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="agree" name="agree" required>
<label class="form-check-label" for="agree">我已阅读并同意 <a href="/docs/app_review_standards.php" target="_blank">APP 审核标准</a></label>
</div>
<button type="submit" class="btn btn-primary w-100">注册</button>
</form>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,41 @@
<?php
/**
* APP 审核标准文档
*/
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>APP 审核标准</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container mt-5">
<h1 class="mb-4">APP 审核标准</h1>
<section class="mb-5">
<h2>内容审核</h2>
<ul>
<li>无违法、违规内容</li>
<li>无侵犯知识产权内容</li>
</ul>
</section>
<section class="mb-5">
<h2>功能审核</h2>
<ul>
<li>功能完整,无明显缺陷</li>
<li>与描述功能一致</li>
</ul>
</section>
<section class="mb-5">
<h2>性能审核</h2>
<ul>
<li>启动速度快</li>
<li>无明显卡顿</li>
</ul>
</section>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>