From b4ffcdb05aa68df2895c38cb40ea1220878cf0d0 Mon Sep 17 00:00:00 2001 From: coward Date: Fri, 9 Aug 2024 11:07:27 +0800 Subject: [PATCH] =?UTF-8?q?:art:=E5=AE=A2=E6=88=B7=E7=AB=AF=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/http/index.js | 2 +- src/views/workbench/api.js | 7 ++ src/views/workbench/index.vue | 218 +++++++++++++++++++++++++++++++++- 3 files changed, 222 insertions(+), 5 deletions(-) create mode 100644 src/views/workbench/api.js diff --git a/src/utils/http/index.js b/src/utils/http/index.js index 6fa57ef..6dcda20 100644 --- a/src/utils/http/index.js +++ b/src/utils/http/index.js @@ -3,7 +3,7 @@ import { resReject, resResolve, reqReject, reqResolve } from './interceptors' export function createAxios(options = {}) { const defaultOptions = { - timeout: 12000, + timeout: 120000, } const service = axios.create({ ...defaultOptions, diff --git a/src/views/workbench/api.js b/src/views/workbench/api.js new file mode 100644 index 0000000..bfc3594 --- /dev/null +++ b/src/views/workbench/api.js @@ -0,0 +1,7 @@ +import { request } from '@/utils' + +export default { + logsList: (params) => request.get('/dashboard/request/list',{ params }), // 操作日志列表 + dailyPoetry: () => request.get('/dashboard/daily-poetry'), // 每日诗词 + clientConnections: () => request.get('/dashboard/connections') // 客户端链接信息 +} diff --git a/src/views/workbench/index.vue b/src/views/workbench/index.vue index 53dfaf0..516fefc 100644 --- a/src/views/workbench/index.vue +++ b/src/views/workbench/index.vue @@ -10,18 +10,228 @@ -

一个人几乎可以在任何他怀有无限热忱的事情上成功。

-

—— 查尔斯·史考伯

+

{{ dailyPoetry.content || '莫向外求,但从心觅,行有不得,反求诸己。' }}

+

—— {{ dailyPoetry.author || '佚名' }}

- + + + +