login接口走https

This commit is contained in:
洛洛希雅 2024-04-27 00:24:31 +08:00
parent e794314496
commit ec72f77e53

View File

@ -32,6 +32,16 @@ export async function getMyRole(): Promise<IUserRole> {
//登录 //登录
export async function login(data): Promise<IUser> { export async function login(data): Promise<IUser> {
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) return post('/login', data)
} }