From ec72f77e530fdd5d0b1508d955a9759c744cc8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B4=9B=E5=B8=8C=E9=9B=85?= Date: Sat, 27 Apr 2024 00:24:31 +0800 Subject: [PATCH] =?UTF-8?q?login=E6=8E=A5=E5=8F=A3=E8=B5=B0https?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/api/user.ts b/src/api/user.ts index 5e4042e..3b9e391 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -32,6 +32,16 @@ export async function getMyRole(): Promise { //登录 export async function login(data): Promise { + if (import.meta.env.VITE_BUILD_TIMESTAMP) { + // 此登录请求走https接口 + return request({ + baseURL: 'https://lolosia.top/home/api/', + url: '/logout', + method: 'post', + responseType: 'json', + data + }).then((it) => it.data) + } return post('/login', data) }