first commit

This commit is contained in:
2026-05-21 16:44:31 +08:00
commit 7dbc5542de
99 changed files with 47743 additions and 0 deletions
+168
View File
@@ -0,0 +1,168 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>软件授权 · {{ exchange_display }}</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: #0a0a10;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
color: #e8e8f0;
min-height: 100vh;
padding: 2rem 1rem;
}
.wrap { max-width: 520px; margin: 0 auto; }
h1 {
font-size: 1.35rem;
margin-bottom: 0.35rem;
background: linear-gradient(90deg, #4cc2ff, #7b42ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.sub { color: #8892b0; font-size: 0.85rem; margin-bottom: 1.5rem; }
.card {
background: #12121a;
border: 1px solid #242435;
border-radius: 14px;
padding: 1.25rem 1.35rem;
margin-bottom: 1rem;
}
.card h2 { font-size: 0.95rem; color: #a9a9ff; margin-bottom: 0.75rem; }
.device {
font-family: ui-monospace, monospace;
font-size: 0.82rem;
word-break: break-all;
background: #1a1a29;
padding: 0.75rem;
border-radius: 8px;
border: 1px solid #2e2e45;
color: #b8f5d0;
}
.hint { font-size: 0.8rem; color: #8892b0; margin-top: 0.5rem; line-height: 1.5; }
.wechat {
font-size: 1.1rem;
color: #4cc2ff;
font-weight: 600;
}
.remark-box {
margin-top: 0.6rem;
padding: 0.65rem 0.75rem;
background: #331e24;
border: 1px solid #5c3040;
border-radius: 8px;
color: #ffb4b4;
font-size: 0.82rem;
}
.plans { list-style: none; font-size: 0.88rem; color: #c5c5e0; }
.plans li { padding: 0.25rem 0; }
label { display: block; font-size: 0.88rem; color: #a9a9ff; margin-bottom: 0.4rem; }
input[type="text"] {
width: 100%;
padding: 0.8rem 1rem;
border-radius: 10px;
border: 1px solid #2e2e45;
background: #1a1a29;
color: #fff;
font-size: 0.95rem;
}
button {
width: 100%;
margin-top: 1rem;
padding: 0.85rem;
border: none;
border-radius: 10px;
background: linear-gradient(90deg, #4285f4, #7b42ff);
color: #fff;
font-size: 1rem;
cursor: pointer;
}
.flash {
padding: 0.75rem;
margin-bottom: 1rem;
background: #331e24;
color: #ff8888;
border-radius: 8px;
font-size: 0.85rem;
}
.ok { background: #1a3328; color: #7dffb0; }
.status-line { font-size: 0.88rem; margin: 0.35rem 0; }
.badge {
display: inline-block;
padding: 0.15rem 0.5rem;
border-radius: 6px;
font-size: 0.75rem;
}
.badge-ok { background: #1a4030; color: #7dffb0; }
.badge-no { background: #402020; color: #ff8888; }
a { color: #4cc2ff; }
</style>
</head>
<body>
<div class="wrap">
<h1>复盘交易系统 · 授权</h1>
<p class="sub">整机许可 · 每 {{ check_interval_days }} 天联网校验一次</p>
{% for msg in messages %}
<div class="flash{% if msg is iterable and msg|length > 1 and msg[0] == 'ok' %} ok{% endif %}">
{% if msg is iterable and msg|length > 1 %}{{ msg[1] }}{% else %}{{ msg }}{% endif %}
</div>
{% endfor %}
<div class="card">
<h2>授权状态</h2>
{% if licensed %}
<span class="badge badge-ok">已授权</span>
{% else %}
<span class="badge badge-no">未授权或已过期</span>
{% endif %}
{% if expires_at_display %}
<p class="status-line">到期时间:{{ expires_at_display }}BJ</p>
{% endif %}
{% if days_left is not none and licensed %}
<p class="status-line">剩余约 {{ days_left }} 天</p>
{% endif %}
{% if plan %}
<p class="status-line">套餐:{{ plan }}</p>
{% endif %}
<p class="status-line" style="margin-top:0.6rem;font-size:0.78rem;color:#6a7088;">
校验间隔 {{ check_interval_days }} 天;断网宽限 {{ offline_grace_days }} 天
</p>
</div>
<div class="card">
<h2>设备 ID(换机需重新联系签发)</h2>
<div class="device" id="deviceId">{{ device_id }}</div>
<p class="hint">复制上方 ID,联系管理员获取激活码。续费在剩余天数上叠加。</p>
</div>
<div class="card">
<h2>购买 / 续费</h2>
<ul class="plans">
{% for p in plans %}
<li>{{ p.name }}:¥{{ p.price }} / {{ p.days }} 天</li>
{% endfor %}
</ul>
<p class="hint" style="margin-top:0.75rem;">
微信:<span class="wechat">{{ wechat_id }}</span>
</p>
<div class="remark-box">
<strong>添加微信时必须填写备注:</strong><br>
请将上方 <strong>设备 ID 完整复制</strong> 到好友验证备注中(或填写:{{ wechat_remark }}
</div>
</div>
<div class="card">
<h2>激活码兑换</h2>
<form method="POST">
<label for="activation_code">激活码</label>
<input type="text" id="activation_code" name="activation_code" required placeholder="粘贴管理员提供的激活码" autocomplete="off">
<button type="submit">激活 / 续费</button>
</form>
{% if not api_configured and not disabled %}
<p class="hint" style="color:#ff8888;margin-top:0.75rem;">未配置 LICENSE_API_URL,请在 .env 中设置授权服务地址。</p>
{% endif %}
</div>
</div>
</body>
</html>