mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-09 02:01:31 +08:00
finish page/settings
This commit is contained in:
@@ -30,6 +30,15 @@ export interface SetContactParams {
|
||||
contact: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Set UserInfo interface parameters
|
||||
*/
|
||||
export interface SetUserInfoParams {
|
||||
nick: string
|
||||
desc: string
|
||||
avtr: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Register interface parameters
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
ResetPasswordParams,
|
||||
SetPasswordParams,
|
||||
SetContactParams,
|
||||
SetUserInfoParams,
|
||||
RegisterParams,
|
||||
ResetPasswordResultModel,
|
||||
RegisterResultModel,
|
||||
@@ -21,6 +22,7 @@ enum Api {
|
||||
ResetPassword = '/resetPassword',
|
||||
SetPassword = '/setPassword',
|
||||
SetContact = '/setContact',
|
||||
SetUserInfo = '/setUserInfo',
|
||||
Register = '/register',
|
||||
GetUserInfo = '/getUserInfo',
|
||||
GetUsersCount = '/getUsersCount',
|
||||
@@ -88,6 +90,21 @@ export function setContactApi(params: SetContactParams, mode: ErrorMessageMode =
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: set userinfo api, borrowing the ResetPasswordResultModel as they're the same
|
||||
*/
|
||||
export function setUserInfoApi(params: SetUserInfoParams, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<ResetPasswordResultModel>(
|
||||
{
|
||||
url: Api.SetUserInfo,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: register api
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user