111 lines
5.8 KiB
HTML
111 lines
5.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>CDK兑换</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="{{ url_for('static', filename='css/particle-bg.css') }}" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<!-- Particles.js container -->
|
|
<div id="particles-js"></div>
|
|
|
|
<div class="container mt-5">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-8">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h2 class="text-center">CDK兑换</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }} mt-3" role="alert">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% if characters %}
|
|
<form method="post" action="{{ url_for('redeem') }}">
|
|
<div class="mb-3">
|
|
<label for="character_name" class="form-label">选择角色</label>
|
|
<select class="form-select" id="character_name" name="character_name" required>
|
|
<option value="">-- 请选择角色 --</option>
|
|
{% for character in characters %}
|
|
<option value="{{ character.name }}" {% if character.has_cdk %}disabled{% endif %}>
|
|
{{ character.name }} ({{ character.level }}级 {{ character.race_text }} {{ character.class_text }})
|
|
{% if character.has_cdk %}[已兑换]{% endif %}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
<div class="form-text">选择您要用于兑换CDK的游戏角色</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="link" class="form-label">宣传链接</label>
|
|
<input type="url" class="form-control" id="link" name="link" required>
|
|
<div class="form-text">请输入您发布宣传内容的帖子链接</div>
|
|
</div>
|
|
<div class="text-center">
|
|
<button type="submit" class="btn btn-primary">兑换CDK</button>
|
|
</div>
|
|
</form>
|
|
|
|
<!-- 已兑换的CDK列表 -->
|
|
<div class="mt-4">
|
|
<h4>已兑换的CDK</h4>
|
|
<div class="table-responsive">
|
|
<table class="table table-dark table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>角色名</th>
|
|
<th>等级</th>
|
|
<th>种族</th>
|
|
<th>职业</th>
|
|
<th>CDK</th>
|
|
<th>兑换时间</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for character in characters %}
|
|
{% if character.has_cdk %}
|
|
<tr>
|
|
<td>{{ character.name }}</td>
|
|
<td>{{ character.level }}</td>
|
|
<td>{{ character.race_text }}</td>
|
|
<td>{{ character.class_text }}</td>
|
|
<td>{{ character.cdk }}</td>
|
|
<td>{{ character.redeem_time }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-warning">
|
|
<h4 class="alert-heading">无法兑换CDK</h4>
|
|
<p>您需要先在游戏中创建角色才能兑换CDK。</p>
|
|
<hr>
|
|
<p class="mb-0">请登录游戏创建角色后再来尝试。</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3 text-center">
|
|
<a href="{{ url_for('user_dashboard') }}" class="btn btn-secondary">返回仪表盘</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
|
|
<script src="{{ url_for('static', filename='js/particles-config.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/cursor-effects.js') }}"></script>
|
|
</body>
|
|
</html> |