1
0
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:
源文雨
2023-03-18 18:27:33 +08:00
parent 78418429c1
commit 7dbf8dc517
6 changed files with 117 additions and 12 deletions

View File

@@ -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
*/

View File

@@ -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
*/