fetch(modify):修复API的URL
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m1s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m1s
This commit is contained in:
@@ -16,42 +16,42 @@ import type {
|
||||
|
||||
export class AuthService extends BaseService {
|
||||
/**
|
||||
* 用户登录
|
||||
* 用户登录(统一认证接口)
|
||||
* @param params 登录参数
|
||||
*/
|
||||
static login(params: LoginParams): Promise<BaseResponse<LoginData>> {
|
||||
return this.post<BaseResponse<LoginData>>('/api/admin/login', params)
|
||||
return this.post<BaseResponse<LoginData>>('/api/auth/login', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
* 退出登录(统一认证接口)
|
||||
*/
|
||||
static logout(): Promise<BaseResponse> {
|
||||
return this.post<BaseResponse>('/api/admin/logout')
|
||||
return this.post<BaseResponse>('/api/auth/logout')
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户信息
|
||||
* GET /api/admin/me
|
||||
* 获取当前用户信息(统一认证接口)
|
||||
* GET /api/auth/me
|
||||
*/
|
||||
static getUserInfo(): Promise<BaseResponse<UserInfoResponse>> {
|
||||
return this.get<BaseResponse<UserInfoResponse>>('/api/admin/me')
|
||||
return this.get<BaseResponse<UserInfoResponse>>('/api/auth/me')
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新 Token
|
||||
* 刷新 Token(统一认证接口)
|
||||
* @param params 刷新参数
|
||||
*/
|
||||
static refreshToken(params: RefreshTokenParams): Promise<BaseResponse<RefreshTokenData>> {
|
||||
return this.post<BaseResponse<RefreshTokenData>>('/api/auth/refresh', params)
|
||||
return this.post<BaseResponse<RefreshTokenData>>('/api/auth/refresh-token', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
* 修改密码(统一认证接口)
|
||||
* @param params 修改密码参数
|
||||
*/
|
||||
static changePassword(params: ChangePasswordParams): Promise<BaseResponse> {
|
||||
return this.post<BaseResponse>('/api/auth/change-password', params)
|
||||
return this.put<BaseResponse>('/api/auth/password', params)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user