Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 84bd151431 | |||
| ad4f86b507 |
@@ -39,7 +39,7 @@ USER_LIMITS = {
|
|||||||
"daily_translations": 10,
|
"daily_translations": 10,
|
||||||
"max_pages": 50,
|
"max_pages": 50,
|
||||||
"max_file_size": 30 * 1024 * 1024, # 30MB
|
"max_file_size": 30 * 1024 * 1024, # 30MB
|
||||||
"features": ["basic_translate", "compare_view", "retranslate", "history"],
|
"features": ["basic_translate", "retranslate", "export_pdf", "history"],
|
||||||
},
|
},
|
||||||
"vip_basic": { # 基础会员 (月付 ¥29)
|
"vip_basic": { # 基础会员 (月付 ¥29)
|
||||||
"daily_translations": 50,
|
"daily_translations": 50,
|
||||||
|
|||||||
@@ -37,6 +37,45 @@
|
|||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
<!-- 会员状态栏 -->
|
||||||
|
{% if user %}
|
||||||
|
{% if user.user_type == 'vip_enterprise' %}
|
||||||
|
<div class="alert alert-dark py-2 mb-0 text-center">
|
||||||
|
<strong>👑 企业会员</strong> |
|
||||||
|
无限翻译次数 | 到期:{{ user.membership_expire.strftime('%Y-%m-%d') if user.membership_expire else '永久' }}
|
||||||
|
</div>
|
||||||
|
{% elif user.user_type == 'vip_pro' %}
|
||||||
|
<div class="alert alert-warning py-2 mb-0 text-center">
|
||||||
|
<strong>⭐ 专业会员</strong> |
|
||||||
|
每日200次 · 最多500页 | 到期:{{ user.membership_expire.strftime('%Y-%m-%d') if user.membership_expire else '永久' }}
|
||||||
|
| <a href="/pricing" class="alert-link">升级企业会员享无限</a>
|
||||||
|
</div>
|
||||||
|
{% elif user.user_type == 'vip_basic' %}
|
||||||
|
<div class="alert alert-success py-2 mb-0 text-center">
|
||||||
|
<strong>💚 基础会员</strong> |
|
||||||
|
每日50次 · 最多100页 | 到期:{{ user.membership_expire.strftime('%Y-%m-%d') if user.membership_expire else '永久' }}
|
||||||
|
| <a href="/pricing" class="alert-link">升级享更多权益</a>
|
||||||
|
</div>
|
||||||
|
{% elif user.user_type == 'free' %}
|
||||||
|
<div class="alert alert-info py-2 mb-0 text-center">
|
||||||
|
<strong>👤 免费用户</strong> |
|
||||||
|
每日10次 · 最多50页 | <a href="/pricing" class="alert-link">升级会员解锁更多功能</a>
|
||||||
|
</div>
|
||||||
|
{% elif user.user_type == 'admin' %}
|
||||||
|
<div class="alert alert-danger py-2 mb-0 text-center">
|
||||||
|
<strong>🔧 管理员</strong> |
|
||||||
|
完整权限 | <a href="/admin" class="alert-link">进入后台管理</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-secondary py-2 mb-0 text-center">
|
||||||
|
<strong>👁 访客模式</strong> |
|
||||||
|
每日仅3次 · 最多20页 · 功能受限 |
|
||||||
|
<a href="/login" class="alert-link">登录获取更多权益</a> 或
|
||||||
|
<a href="/register" class="alert-link">免费注册</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- 主内容 -->
|
<!-- 主内容 -->
|
||||||
<main class="container my-5">
|
<main class="container my-5">
|
||||||
<!-- 用户信息卡片 -->
|
<!-- 用户信息卡片 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user