From d55548f5a2287d13840adce54a57647d8ee58080 Mon Sep 17 00:00:00 2001 From: liuwei Date: Tue, 25 Nov 2025 16:51:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=8E=E5=8C=96UI1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/dashboard/templates/base.html | 415 +++++++++++++--------------- 1 file changed, 197 insertions(+), 218 deletions(-) diff --git a/admin/dashboard/templates/base.html b/admin/dashboard/templates/base.html index 6001681..1604756 100644 --- a/admin/dashboard/templates/base.html +++ b/admin/dashboard/templates/base.html @@ -4,218 +4,210 @@ {% block title %}机器人管理后台{% endblock %} - - - - - + + + + + - - - - {% block head %}{% endblock %} +
+ +
- -

机器人管理后台

+ +

机器人管理后台

- +
- 退出登录 + 退出
+
- + + - +
- - + + + - + @@ -223,84 +215,71 @@ - 刷新数据 + 刷新 - {% block content %}{% endblock %} +
- - + }, + created() { + const path = window.location.pathname; + this.showTimeRangeSelector = ['/', '/plugins', '/users', '/groups','/robot','/errors'].includes(path); + }, + mounted() { + document.querySelector('.app-container').classList.add('loaded'); + }, + methods: { + handleSelect(key) { + const routes = { + '1': '/', + '2': '/plugins', + '3': '/users', + '4': '/groups', + '5': '/errors', + '6': '/robot', + '7': '/messages', + '9': '/wx_logs', + '10': '/contacts', + '11': '/plugins_manage', + '12': '/virtual_group', + '13': '/api_docs', + '14': '/system_status', + '15': '/file_browser', + '16': '/message_push' + }; + if (routes[key] && window.location.pathname !== routes[key]) { + window.location.href = routes[key]; + } + }, + logout() { + this.$confirm('确认退出登录吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + window.location.href = '/logout'; + }); + } + } + }; + - {% block scripts %}{% endblock %} +{% block scripts %}{% endblock %} - \ No newline at end of file +