Files
workspace/code/email/Email-Vue/src/service/userAccount.ts
T
2025-06-10 21:27:20 +08:00

28 lines
985 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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);
};