接口请求地址以及接口返回提示修改

This commit is contained in:
2026-08-18 14:33:59 +08:00
parent bbbdb85f6e
commit d91f7928dd
10 changed files with 24 additions and 99 deletions
+4 -14
View File
@@ -1,17 +1,17 @@
import { request } from '../request';
/**
* Login
* 登录
*
* @param userName User name
* @param password Password
*/
export function fetchLogin(userName: string, password: string) {
export function fetchLogin(username: string, password: string) {
return request<Api.Auth.LoginToken>({
url: '/auth/login',
url: '/api/auth/login',
method: 'post',
data: {
userName,
username,
password
}
});
@@ -36,13 +36,3 @@ export function fetchRefreshToken(refreshToken: string) {
}
});
}
/**
* return custom backend error
*
* @param code error code
* @param msg error message
*/
export function fetchCustomBackendError(code: string, msg: string) {
return request({ url: '/auth/error', params: { code, msg } });
}