{% extends "admin_layout.html" %} {% block active_nav %}users{% endblock %} {% block title %}用户管理 · 管理后台{% endblock %} {% block content %}

👥 用户管理

{% if q %}清空{% endif %}
用户列表(共 {{ total }} 人)
{% for r in rows %} {% else %} {% endfor %}
用户名UID角色状态推广权限 会员剩余到期时间数据量注册时间操作
{{ r.username }} {{ r.uid }} {% if r.role == 'admin' %}管理员 {% elif r.role == 'agent' %}代理 {% else %}用户{% endif %} {% if r.status == 'active' %}正常 {% else %}已禁用{% endif %} {% if r.promotion_mode == 'on' %}已开通 {% elif r.promotion_mode == 'off' %}已关闭 {% else %}自动{% endif %} {% if r.license.status == 'active' %}有效 {% elif r.license.status == 'expired' %}已过期 {% else %}未开通{% endif %} {% if r.license.status == 'active' %}{{ r.license.remaining_days }} 天{% else %}-{% endif %} {{ (r.license.expires_at or '')[:10] or '-' }} {{ fmt_storage(r.storage_bytes) }} {{ (r.created_at or '')[:10] }}
{% if r.role != 'admin' %} {% if r.status == 'active' %}
{% else %}
{% endif %} {% endif %} {% if r.role == 'admin' %} 管理员 {% else %} {% if r.role == 'agent' %}
{% else %}
{% endif %} {# 1019 推广权限手动开关:on=强制开通 / off=强制关闭 / auto=恢复付费自动 #} {% if r.promotion_mode != 'on' %}
{% endif %} {% if r.promotion_mode != 'off' %}
{% endif %} {% if r.promotion_mode != 'auto' %}
{% endif %} {% endif %} {% if r.role != 'admin' %}
{% endif %}
暂无用户
{% if total_pages > 1 %}
共 {{ total }} 条 · 第 {{ page }}/{{ total_pages }} 页
{% if page > 1 %}上一页{% endif %} {{ page }} {% if page < total_pages %}下一页{% endif %}
{% endif %} {# ---- 手动开/延有效期 弹窗(只 ✕ 关闭) ---- #} {% for r in rows %} {# ---- 重置密码 弹窗 ---- #} {% endfor %} {% endblock %} {% block scripts %} {% endblock %}