From 6ecfcb07bd3cda090bc5135f00dff1fe37ef216a Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 3 Apr 2025 21:03:54 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"feat:=20=E6=9C=AC=E5=9C=B0=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E9=BB=98=E8=AE=A4=20website"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 198cd6912c4065ae7ee20bb1b09597c8af54b9db. --- apps/web-antd/.env.development | 2 -- apps/web-antd/src/api/core/auth.ts | 28 ++++++---------- .../src/views/_core/authentication/login.vue | 32 ++++++------------- packages/effects/hooks/src/use-app-config.ts | 9 ++---- packages/types/global.d.ts | 2 -- 5 files changed, 22 insertions(+), 51 deletions(-) diff --git a/apps/web-antd/.env.development b/apps/web-antd/.env.development index cbe12db2a..5d29cd97b 100644 --- a/apps/web-antd/.env.development +++ b/apps/web-antd/.env.development @@ -7,8 +7,6 @@ VITE_BASE=/ VITE_GLOB_API_URL=/admin-api # 是否打开 devtools,true 为打开,false 为关闭 VITE_DEVTOOLS=false -# 本地开发默认 website -VITE_APP_WEBSITE=www.iocoder.cn # 是否注入全局loading VITE_INJECT_APP_LOADING=true diff --git a/apps/web-antd/src/api/core/auth.ts b/apps/web-antd/src/api/core/auth.ts index e5cffc513..4071577dd 100644 --- a/apps/web-antd/src/api/core/auth.ts +++ b/apps/web-antd/src/api/core/auth.ts @@ -1,6 +1,5 @@ -import type { AuthPermissionInfo } from '@vben/types'; - import { baseRequestClient, requestClient } from '#/api/request'; +import type { AuthPermissionInfo } from '@vben/types'; export namespace AuthApi { /** 登录接口参数 */ @@ -35,6 +34,7 @@ export namespace AuthApi { mobile: string; code: string; } + } /** 登录 */ @@ -44,22 +44,16 @@ export async function loginApi(data: AuthApi.LoginParams) { /** 刷新 accessToken */ export async function refreshTokenApi(refreshToken: string) { - return baseRequestClient.post( - `/system/auth/refresh-token?refreshToken=${refreshToken}`, - ); + return baseRequestClient.post(`/system/auth/refresh-token?refreshToken=${refreshToken}`); } /** 退出登录 */ export async function logoutApi(accessToken: string) { - return baseRequestClient.post( - '/system/auth/logout', - {}, - { - headers: { - Authorization: `Bearer ${accessToken}`, - }, - }, - ); + return baseRequestClient.post('/system/auth/logout', {}, { + headers: { + Authorization: `Bearer ${accessToken}`, + } + }); } /** 获取权限信息 */ @@ -78,9 +72,7 @@ export async function getTenantSimpleList() { /** 使用租户域名,获得租户信息 */ export async function getTenantByWebsite(website: string) { - return requestClient.get( - `/system/tenant/get-by-website?website=${website}`, - ); + return requestClient.get(`/system/tenant/get-by-website?website=${website}`); } /** 获取验证码 */ @@ -91,4 +83,4 @@ export async function getCaptcha(data: any) { /** 校验验证码 */ export async function checkCaptcha(data: any) { return baseRequestClient.post('/system/captcha/check', data); -} +} \ No newline at end of file diff --git a/apps/web-antd/src/views/_core/authentication/login.vue b/apps/web-antd/src/views/_core/authentication/login.vue index b67d2bdde..b0f15b6a0 100644 --- a/apps/web-antd/src/views/_core/authentication/login.vue +++ b/apps/web-antd/src/views/_core/authentication/login.vue @@ -1,31 +1,21 @@