28 lines
985 B
TypeScript
28 lines
985 B
TypeScript
import { httpGet, httpPostJson } from "@/utils/http";
|
||
|
||
export interface UserAccount {
|
||
id: string; // 对应 b_id,Long 类型在 TS 中通常用 number 表示
|
||
email: string; // 对应 b_email
|
||
password: string; // 对应 b_password
|
||
displayName: string; // 对应 b_display_name
|
||
imapHost: string; // 对应 b_imap_host
|
||
imapPort: string; // 对应 b_imap_port
|
||
imapSsl: string; // 对应 b_imap_ssl
|
||
smtpHost: string; // 对应 b_smtp_host
|
||
smtpPort: string; // 对应 b_smtp_port
|
||
smtpSsl: string; // 对应 b_smtp_ssl
|
||
}
|
||
|
||
export const getUserAccountDetailApi = () => {
|
||
return httpGet<UserAccount>("/emailAccount/detail");
|
||
};
|
||
|
||
interface UpdateUserAccountParams {
|
||
id: string; // 对应 b_id,Long 类型在 TS 中通常用 number 表示
|
||
password: string; // 对应 b_password
|
||
displayName: string; // 对应 b_display_name
|
||
}
|
||
export const updateUserAccountApi = (params: UpdateUserAccountParams) => {
|
||
return httpPostJson<void>("/emailAccount/update", params);
|
||
};
|