diff --git a/src/apis/auth/type.ts b/src/apis/auth/type.ts index b154ea4..578010c 100644 --- a/src/apis/auth/type.ts +++ b/src/apis/auth/type.ts @@ -45,7 +45,6 @@ export interface RouteItem { export interface AccountLoginReq { username: string password: string - unCaptcha: boolean captcha: string uuid: string } diff --git a/src/apis/common/captcha.ts b/src/apis/common/captcha.ts index 5887f01..29ac1cb 100644 --- a/src/apis/common/captcha.ts +++ b/src/apis/common/captcha.ts @@ -5,11 +5,6 @@ export type * from './type' const BASE_URL = '/captcha' -/** @desc 获取图片验证码 */ -export function getCaptchaConfig() { - return http.get(`${BASE_URL}/config`) -} - /** @desc 获取图片验证码 */ export function getImageCaptcha() { return http.get(`${BASE_URL}/image`) diff --git a/src/apis/common/type.ts b/src/apis/common/type.ts index 90f23cc..7d5db76 100644 --- a/src/apis/common/type.ts +++ b/src/apis/common/type.ts @@ -3,6 +3,7 @@ export interface ImageCaptchaResp { uuid: string img: string expireTime: number + isEnabled: boolean } /** 仪表盘公告类型 */ diff --git a/src/apis/system/type.ts b/src/apis/system/type.ts index 96e48d6..bcc9ba5 100644 --- a/src/apis/system/type.ts +++ b/src/apis/system/type.ts @@ -293,17 +293,6 @@ export interface SiteConfig { SITE_BEIAN: OptionResp } -/** 邮箱配置类型 */ -export interface MailConfig { - MAIL_PROTOCOL: OptionResp - MAIL_HOST: OptionResp - MAIL_PORT: OptionResp - MAIL_USERNAME: OptionResp - MAIL_PASSWORD: OptionResp - MAIL_SSL_ENABLED: OptionResp - MAIL_SSL_PORT: OptionResp -} - /** 安全配置类型 */ export interface SecurityConfig { PASSWORD_ERROR_LOCK_COUNT: OptionResp @@ -316,9 +305,20 @@ export interface SecurityConfig { PASSWORD_REQUIRE_SYMBOLS: OptionResp } -/** 安全配置类型 */ -export interface CaptchaSetting { - NEED_CAPTCHA: OptionResp +/** 邮箱配置类型 */ +export interface MailConfig { + MAIL_PROTOCOL: OptionResp + MAIL_HOST: OptionResp + MAIL_PORT: OptionResp + MAIL_USERNAME: OptionResp + MAIL_PASSWORD: OptionResp + MAIL_SSL_ENABLED: OptionResp + MAIL_SSL_PORT: OptionResp +} + +/** 登录配置类型 */ +export interface LoginConfig { + LOGIN_CAPTCHA_ENABLED: OptionResp } /** 绑定三方账号信息 */ diff --git a/src/views/login/components/account/index.vue b/src/views/login/components/account/index.vue index 3590e4f..af9a88f 100644 --- a/src/views/login/components/account/index.vue +++ b/src/views/login/components/account/index.vue @@ -1,18 +1,23 @@ diff --git a/src/views/system/config/components/CaptchaSetting.vue b/src/views/system/config/components/LoginSetting.vue similarity index 50% rename from src/views/system/config/components/CaptchaSetting.vue rename to src/views/system/config/components/LoginSetting.vue index 5c04e79..9cee395 100644 --- a/src/views/system/config/components/CaptchaSetting.vue +++ b/src/views/system/config/components/LoginSetting.vue @@ -1,53 +1,44 @@