From dbbc16346cf43bb8f1367950a03e91d4d0748c48 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 3 Apr 2025 12:20:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0=20server?= =?UTF-8?q?=20=E4=BD=BF=E7=94=A8=E8=93=9D=E5=9B=BE=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E9=99=8D=E4=BD=8E=E7=BB=B4=E6=8A=A4=E6=88=90=E6=9C=AC?= =?UTF-8?q?=EF=BC=8C=E9=99=8D=E4=BD=8E=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=97=B6=E5=AF=B9=E5=85=B6=E4=BB=96=E6=A8=A1=E5=9D=97=E7=9A=84?= =?UTF-8?q?=E5=BD=B1=E5=93=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/dashboard/blueprints/contacts.py | 5 +++-- admin/dashboard/templates/base.html | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/admin/dashboard/blueprints/contacts.py b/admin/dashboard/blueprints/contacts.py index d55580d..ad847ca 100644 --- a/admin/dashboard/blueprints/contacts.py +++ b/admin/dashboard/blueprints/contacts.py @@ -3,11 +3,11 @@ from .auth import login_required import logging # 创建联系人管理蓝图 -contacts_bp = Blueprint('contacts', __name__) +contacts_bp = Blueprint('contacts', __name__, url_prefix='/contacts') logger = logging.getLogger("ContactsBlueprint") # 联系人管理页面 -@contacts_bp.route('/contacts') +@contacts_bp.route('/') @login_required def contacts_management(): """通讯录管理页面""" @@ -32,6 +32,7 @@ def api_contacts_all(): return jsonify({"success": False, "error": str(e)}), 500 @contacts_bp.route('/api/statistics', methods=['GET']) +@login_required def api_contacts_statistics(): """获取联系人统计信息API""" try: diff --git a/admin/dashboard/templates/base.html b/admin/dashboard/templates/base.html index 9c675a7..1be32df 100644 --- a/admin/dashboard/templates/base.html +++ b/admin/dashboard/templates/base.html @@ -195,7 +195,7 @@ // 根据当前页面路径决定是否显示时间范围选择器 const path = window.location.pathname; // 只在统计相关页面显示时间范围选择器 - this.showTimeRangeSelector = ['/', '/plugins', '/users', '/groups','/robot_management','/errors'].includes(path); + this.showTimeRangeSelector = ['/', '/plugins', '/users', '/groups','/robot','/errors'].includes(path); }, methods: { handleSelect(key, keyPath) { @@ -207,7 +207,7 @@ '3': '/users', '4': '/groups', '5': '/errors', - '6': '/robot_management', + '6': '/robot', '7': '/messages', '9': '/wx_logs', '10': '/contacts'