mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-12-15 23:00:45 +08:00
feat: 使用getConfig接口来获取系统配置
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
export type CaptchaDTO = {
|
||||
/** 验证码开关 */
|
||||
isCaptchaOn: boolean;
|
||||
/** 验证码的base64图片 */
|
||||
captchaCodeImg: string;
|
||||
/** 验证码对应的缓存key */
|
||||
captchaCodeKey: string;
|
||||
};
|
||||
|
||||
export type ConfigDTO = {
|
||||
/** 验证码开关 */
|
||||
isCaptchaOn: boolean;
|
||||
};
|
||||
|
||||
export type LoginByPasswordDTO = {
|
||||
/** 用户名 */
|
||||
username: string;
|
||||
@@ -32,6 +35,11 @@ export type RefreshTokenResult = {
|
||||
};
|
||||
};
|
||||
|
||||
/** 获取系统配置接口 */
|
||||
export const getConfig = () => {
|
||||
return http.request<ResponseData<ConfigDTO>>("get", "/getConfig");
|
||||
};
|
||||
|
||||
/** 验证码接口 */
|
||||
export const getCaptchaCode = () => {
|
||||
return http.request<ResponseData<CaptchaDTO>>("get", "/captchaImage");
|
||||
|
||||
Reference in New Issue
Block a user