mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-09 10:21:00 +08:00
login add salt
This commit is contained in:
@@ -67,3 +67,7 @@ export interface GetUserInfoModel {
|
||||
// 介绍
|
||||
desc?: string
|
||||
}
|
||||
|
||||
export interface GetLoginSaltModel {
|
||||
salt: string
|
||||
}
|
||||
|
||||
@@ -7,11 +7,13 @@ import {
|
||||
RegisterParams,
|
||||
ResetPasswordResultModel,
|
||||
RegisterResultModel,
|
||||
GetLoginSaltModel,
|
||||
} from './model/userModel'
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios'
|
||||
|
||||
enum Api {
|
||||
GetLoginSalt = '/getLoginSalt',
|
||||
Login = '/login',
|
||||
Logout = '/logout',
|
||||
ResetPassword = '/resetPassword',
|
||||
@@ -66,6 +68,13 @@ export function registerApi(params: RegisterParams, mode: ErrorMessageMode = 'mo
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: getLoginSalt
|
||||
*/
|
||||
export function getLoginSalt(username: string) {
|
||||
return defHttp.get<GetLoginSaltModel>({ url: Api.GetLoginSalt, params: { username: username } })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: getUserInfo
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user