登录接口加密传输登录信息

This commit is contained in:
caozehui
2025-03-24 19:22:56 +08:00
parent e0b1b5907b
commit d7df999cf2
6 changed files with 77 additions and 24 deletions

View File

@@ -6,7 +6,7 @@ import type { Dict } from '@/api/interface'
* @name 登录模块
*/
// 用户登录
export const loginApi = (params: Login.ReqLoginForm) => {
export const loginApi = (params: { username: string; password: string }) => {
return http.post<Login.ResLogin>(`${rePrefix}/login`, params, { loading: false })
// return http.post<Login.ResLogin>(`/Register1`, params, { loading: false })
}
@@ -43,3 +43,9 @@ export const getCurrentScene = () => {
return http.get('/sysTestConfig/getCurrentScene', {}, { loading: false })
}
/**
* 获取RSA公钥
*/
export const getPublicKey = () => {
return http.get('/admin/getPublicKey', {}, { loading: false })
}