feat: 支持平台代登录客户工作台
This commit is contained in:
@@ -21,6 +21,12 @@ export interface RegisterMerchantResult {
|
||||
nextStep: string
|
||||
}
|
||||
|
||||
export interface ImpersonationExchangeResult {
|
||||
tokenType: string
|
||||
accessToken: string
|
||||
expiresIn: number
|
||||
}
|
||||
|
||||
export function loginMerchant(username: string, password: string) {
|
||||
return apiRequest<TokenPair>({ method: 'POST', url: '/auth/login', data: { username, password } })
|
||||
}
|
||||
@@ -36,3 +42,7 @@ export function logoutMerchant(refreshToken: string) {
|
||||
export function changeCurrentPassword(oldPassword: string, newPassword: string) {
|
||||
return apiRequest<void>({ method: 'PUT', url: '/auth/password', data: { oldPassword, newPassword } })
|
||||
}
|
||||
|
||||
export function exchangeImpersonationCode(code: string) {
|
||||
return apiRequest<ImpersonationExchangeResult>({ method: 'POST', url: '/auth/impersonations/exchange', data: { code } })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user