杂务:打包并提交当前改动
This commit is contained in:
@@ -22,7 +22,6 @@ export interface UpdateUserInfoRequest {
|
||||
nickname?: string
|
||||
avatar?: string
|
||||
signature?: string
|
||||
phone?: string
|
||||
}
|
||||
|
||||
export interface ListUsersParams {
|
||||
@@ -52,6 +51,7 @@ export interface UpdateUserRequest {
|
||||
|
||||
export interface UpdatePasswordRequest {
|
||||
password: string
|
||||
verificationCode: string
|
||||
}
|
||||
|
||||
export interface BindPhoneRequest {
|
||||
@@ -59,6 +59,11 @@ export interface BindPhoneRequest {
|
||||
verificationCode: string
|
||||
}
|
||||
|
||||
export interface AvailabilityCheckResponse {
|
||||
available: boolean
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface UpdatePhoneRequest {
|
||||
oldPhone: string
|
||||
newPhone: string
|
||||
@@ -70,7 +75,7 @@ export const userApi = {
|
||||
return api.get<UserVO>('/user/info')
|
||||
},
|
||||
updateUserInfo: (data: UpdateUserInfoRequest) => {
|
||||
return api.put('/user/info', data)
|
||||
return api.put('/user/update', data)
|
||||
},
|
||||
updatePassword: (data: UpdatePasswordRequest) => {
|
||||
return api.put('/user/password', data)
|
||||
@@ -84,6 +89,12 @@ export const userApi = {
|
||||
getUserByAccount: (account: string) => {
|
||||
return api.get<UserVO>(`/user/get/account/${account}`)
|
||||
},
|
||||
checkAccountAvailability: (account: string) => {
|
||||
return api.get<AvailabilityCheckResponse>(`/user/check/account/${encodeURIComponent(account)}`)
|
||||
},
|
||||
checkPhoneAvailability: (phone: string) => {
|
||||
return api.get<AvailabilityCheckResponse>(`/user/check/phone/${encodeURIComponent(phone)}`)
|
||||
},
|
||||
listUsersByType: (type: number) => {
|
||||
return api.get<UserVO[]>(`/user/list/type/${type}`)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user