From f111f4a8d5a0d3f35393819ed1a380d38e7181b2 Mon Sep 17 00:00:00 2001 From: chiguyong Date: Mon, 23 Mar 2026 09:52:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20auth.ts=20API=E8=B7=AF=E5=BE=84=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0/api=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /auth/login -> /api/auth/login - /auth/logout -> /api/auth/logout - /auth/me -> /api/auth/me - /auth/refresh -> /api/auth/refresh --- src/api/auth.ts | 8 +- src/components/Pagination/index.vue | 23 +- src/components/TableActions/index.vue | 16 +- src/views/system/Permissions.vue | 300 +++++++++++++------------- src/views/system/Roles.vue | 166 +++++++------- src/views/system/Users.vue | 60 +++--- test-login.cjs | 62 ++++++ 7 files changed, 373 insertions(+), 262 deletions(-) create mode 100644 test-login.cjs diff --git a/src/api/auth.ts b/src/api/auth.ts index b808d969..12091a95 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -2,17 +2,17 @@ import request from '@/utils/request' import type { LoginRequest, LoginResponse } from '@/types' export const login = (data: LoginRequest) => { - return request.post('/auth/login', data) + return request.post('/api/auth/login', data) } export const logout = () => { - return request.post('/auth/logout') + return request.post('/api/auth/logout') } export const getCurrentUser = () => { - return request.get('/auth/me') + return request.get('/api/auth/me') } export const refreshToken = () => { - return request.post('/auth/refresh') + return request.post('/api/auth/refresh') } diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index 26516b4f..d7f65ccc 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -1,5 +1,6 @@ @@ -166,123 +191,102 @@ onMounted(fetchPermissions) - -
-
+ +
+ - - -
- - - - - -
+ /> + 查询 + 重置 +
- - - +
+ + + - + + + + +
+ + + +
+ - - - + + - - - + + - - - + + - - - + + - - - + + - - - + +
+ +
- - diff --git a/src/views/system/Roles.vue b/src/views/system/Roles.vue index 08337a1c..9c23d3c3 100644 --- a/src/views/system/Roles.vue +++ b/src/views/system/Roles.vue @@ -1,18 +1,24 @@ @@ -184,49 +197,54 @@ onMounted(fetchRoles) + +
+ + + 查询 + 重置 + +
+
- + + -
+ + +
@@ -262,7 +280,7 @@ onMounted(fetchRoles) +