Просмотр исходного кода

🤓增加验证码配置项 !529

zuohuaijun 3 лет назад
Родитель
Сommit
cc015de3d6

+ 6 - 2
Admin.NET/Admin.NET.Core/Admin.NET.Core.xml

@@ -192,8 +192,12 @@
             登录二次验证
             </summary>
         </member>
-        <!-- Badly formed XML comment ignored for member "F:Admin.NET.Core.CommonConst.SysCaptcha" -->
-        <member name="F:Admin.NET.Core.CommonConst.SysWartermarkText">
+        <member name="F:Admin.NET.Core.CommonConst.SysCaptcha">
+            <summary>
+            开启图形验证码
+            </summary>
+        </member>
+        <member name="F:Admin.NET.Core.CommonConst.SysWartermark">
             <summary>
             开启水印
             </summary>

+ 1 - 2
Admin.NET/Admin.NET.Core/Const/CommonConst.cs

@@ -23,14 +23,13 @@ public class CommonConst
 
     /// <summary>
     /// 开启图形验证码
-
     /// </summary>
     public const string SysCaptcha = "sys_captcha";
 
     /// <summary>
     /// 开启水印
     /// </summary>
-    public const string SysWartermarkText = "sys_wartermark_text";
+    public const string SysWartermark = "sys_wartermark";
 
     /// <summary>
     /// 开启操作日志

+ 1 - 1
Admin.NET/Admin.NET.Core/SeedData/SysConfigSeedData.cs

@@ -21,7 +21,7 @@ public class SysConfigSeedData : ISqlSugarEntitySeedData<SysConfig>
             new SysConfig{ Id=252885263003804, Name="单点登录", Code="sys_single_login", Value="True", SysFlag=YesNoEnum.Y, Remark="开启单点登录", OrderNo=5, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
             new SysConfig{ Id=252885263003805, Name="登录二次验证", Code="sys_second_ver", Value="True", SysFlag=YesNoEnum.Y, Remark="登录二次验证", OrderNo=6, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
             new SysConfig{ Id=252885263003806, Name="开启图形验证码", Code="sys_captcha", Value="True", SysFlag=YesNoEnum.Y, Remark="开启图形验证码", OrderNo=7, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
-            new SysConfig{ Id=252885263003807, Name="开启水印", Code="sys_wartermark_text", Value="True", SysFlag=YesNoEnum.Y, Remark="开启水印", OrderNo=8, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+            new SysConfig{ Id=252885263003807, Name="开启水印", Code="sys_wartermark", Value="True", SysFlag=YesNoEnum.Y, Remark="开启水印", OrderNo=8, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
         };
     }
 }

+ 4 - 5
Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs

@@ -58,9 +58,8 @@ public class SysAuthService : IDynamicApiController, ITransient
         //// 可以根据域名获取具体租户
         //var host = _httpContextAccessor.HttpContext.Request.Host;
 
-        // 判断验证码
-        var captchaConfig = await _sysConfigService.GetConfigValue<bool>(CommonConst.SysCaptcha);
-        if (captchaConfig == true)
+        // 是否开启验证码
+        if (await _sysConfigService.GetConfigValue<bool>(CommonConst.SysCaptcha))
         {
             // 判断验证码
             if (!_captcha.Validate(input.CodeId.ToString(), input.Code))
@@ -208,8 +207,8 @@ public class SysAuthService : IDynamicApiController, ITransient
     {
         var secondVerEnabled = await _sysConfigService.GetConfigValue<bool>(CommonConst.SysSecondVer);
         var captchaEnabled = await _sysConfigService.GetConfigValue<bool>(CommonConst.SysCaptcha);
-        var wartermarkTextEnabled = await _sysConfigService.GetConfigValue<bool>(CommonConst.SysWartermarkText);
-        return new { SecondVerEnabled = secondVerEnabled, CaptchaEnabled = captchaEnabled, WartermarkTextEnabled = wartermarkTextEnabled };
+        var wartermarkEnabled = await _sysConfigService.GetConfigValue<bool>(CommonConst.SysWartermark);
+        return new { SecondVerEnabled = secondVerEnabled, CaptchaEnabled = captchaEnabled, WartermarkEnabled = wartermarkEnabled };
     }
 
     /// <summary>

+ 66 - 67
Web/src/api-services/apis/sys-auth-api.ts

@@ -16,7 +16,6 @@ import { Configuration } from '../configuration';
 // Some imports not used depending on template conditions
 // @ts-ignore
 import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
-import { AdminResultBoolean } from '../models';
 import { AdminResultLoginOutput } from '../models';
 import { AdminResultLoginUserOutput } from '../models';
 import { AdminResultObject } from '../models';
@@ -65,32 +64,25 @@ export const SysAuthApiAxiosParamCreator = function (configuration?: Configurati
             };
         },
         /**
-         * 用户名/密码:superadmin/123456
-         * @summary 登录系统
-         * @param {LoginInput} body 
+         * 
+         * @summary 登录配置
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        loginPost: async (body: LoginInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            // verify required parameter 'body' is not null or undefined
-            if (body === null || body === undefined) {
-                throw new RequiredError('body','Required parameter body was null or undefined when calling loginPost.');
-            }
-            const localVarPath = `/login`;
+        loginConfigGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/loginConfig`;
             // use dummy base URL string because the URL constructor only accepts absolute URLs.
             const localVarUrlObj = new URL(localVarPath, 'https://example.com');
             let baseOptions;
             if (configuration) {
                 baseOptions = configuration.baseOptions;
             }
-            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
             const localVarHeaderParameter = {} as any;
             const localVarQueryParameter = {} as any;
 
             // authentication Bearer required
 
-            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
-
             const query = new URLSearchParams(localVarUrlObj.search);
             for (const key in localVarQueryParameter) {
                 query.set(key, localVarQueryParameter[key]);
@@ -101,8 +93,6 @@ export const SysAuthApiAxiosParamCreator = function (configuration?: Configurati
             localVarUrlObj.search = (new URLSearchParams(query)).toString();
             let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
             localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
-            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
 
             return {
                 url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
@@ -110,13 +100,18 @@ export const SysAuthApiAxiosParamCreator = function (configuration?: Configurati
             };
         },
         /**
-         * 
-         * @summary 退出系统
+         * 用户名/密码:superadmin/123456
+         * @summary 登录系统
+         * @param {LoginInput} body 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        logoutPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            const localVarPath = `/logout`;
+        loginPost: async (body: LoginInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            // verify required parameter 'body' is not null or undefined
+            if (body === null || body === undefined) {
+                throw new RequiredError('body','Required parameter body was null or undefined when calling loginPost.');
+            }
+            const localVarPath = `/login`;
             // use dummy base URL string because the URL constructor only accepts absolute URLs.
             const localVarUrlObj = new URL(localVarPath, 'https://example.com');
             let baseOptions;
@@ -129,6 +124,8 @@ export const SysAuthApiAxiosParamCreator = function (configuration?: Configurati
 
             // authentication Bearer required
 
+            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
+
             const query = new URLSearchParams(localVarUrlObj.search);
             for (const key in localVarQueryParameter) {
                 query.set(key, localVarQueryParameter[key]);
@@ -139,6 +136,8 @@ export const SysAuthApiAxiosParamCreator = function (configuration?: Configurati
             localVarUrlObj.search = (new URLSearchParams(query)).toString();
             let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
             localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
 
             return {
                 url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
@@ -147,17 +146,12 @@ export const SysAuthApiAxiosParamCreator = function (configuration?: Configurati
         },
         /**
          * 
-         * @summary 获取刷新Token
-         * @param {string} accessToken 
+         * @summary 退出系统
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        refreshTokenPost: async (accessToken: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            // verify required parameter 'accessToken' is not null or undefined
-            if (accessToken === null || accessToken === undefined) {
-                throw new RequiredError('accessToken','Required parameter accessToken was null or undefined when calling refreshTokenPost.');
-            }
-            const localVarPath = `/refreshToken`;
+        logoutPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/logout`;
             // use dummy base URL string because the URL constructor only accepts absolute URLs.
             const localVarUrlObj = new URL(localVarPath, 'https://example.com');
             let baseOptions;
@@ -170,10 +164,6 @@ export const SysAuthApiAxiosParamCreator = function (configuration?: Configurati
 
             // authentication Bearer required
 
-            if (accessToken !== undefined) {
-                localVarQueryParameter['accessToken'] = accessToken;
-            }
-
             const query = new URLSearchParams(localVarUrlObj.search);
             for (const key in localVarQueryParameter) {
                 query.set(key, localVarQueryParameter[key]);
@@ -192,24 +182,33 @@ export const SysAuthApiAxiosParamCreator = function (configuration?: Configurati
         },
         /**
          * 
-         * @summary 登录配置
+         * @summary 获取刷新Token
+         * @param {string} accessToken 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        loginConfigGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            const localVarPath = `/loginConfig`;
+        refreshTokenPost: async (accessToken: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            // verify required parameter 'accessToken' is not null or undefined
+            if (accessToken === null || accessToken === undefined) {
+                throw new RequiredError('accessToken','Required parameter accessToken was null or undefined when calling refreshTokenPost.');
+            }
+            const localVarPath = `/refreshToken`;
             // use dummy base URL string because the URL constructor only accepts absolute URLs.
             const localVarUrlObj = new URL(localVarPath, 'https://example.com');
             let baseOptions;
             if (configuration) {
                 baseOptions = configuration.baseOptions;
             }
-            const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
             const localVarHeaderParameter = {} as any;
             const localVarQueryParameter = {} as any;
 
             // authentication Bearer required
 
+            if (accessToken !== undefined) {
+                localVarQueryParameter['accessToken'] = accessToken;
+            }
+
             const query = new URLSearchParams(localVarUrlObj.search);
             for (const key in localVarQueryParameter) {
                 query.set(key, localVarQueryParameter[key]);
@@ -370,6 +369,19 @@ export const SysAuthApiFp = function(configuration?: Configuration) {
                 return axios.request(axiosRequestArgs);
             };
         },
+        /**
+         * 
+         * @summary 登录配置
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async loginConfigGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
+            const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).loginConfigGet(options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
         /**
          * 用户名/密码:superadmin/123456
          * @summary 登录系统
@@ -411,19 +423,6 @@ export const SysAuthApiFp = function(configuration?: Configuration) {
                 return axios.request(axiosRequestArgs);
             };
         },
-        /**
-         * 
-         * @summary 登录配置
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async loginConfigGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultBoolean>>> {
-            const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).loginConfigGet(options);
-            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
-                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
-                return axios.request(axiosRequestArgs);
-            };
-        },
         /**
          * 
          * @summary Swagger登录检查
@@ -483,6 +482,15 @@ export const SysAuthApiFactory = function (configuration?: Configuration, basePa
         async captchaGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
             return SysAuthApiFp(configuration).captchaGet(options).then((request) => request(axios, basePath));
         },
+        /**
+         * 
+         * @summary 登录配置
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async loginConfigGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
+            return SysAuthApiFp(configuration).loginConfigGet(options).then((request) => request(axios, basePath));
+        },
         /**
          * 用户名/密码:superadmin/123456
          * @summary 登录系统
@@ -512,15 +520,6 @@ export const SysAuthApiFactory = function (configuration?: Configuration, basePa
         async refreshTokenPost(accessToken: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
             return SysAuthApiFp(configuration).refreshTokenPost(accessToken, options).then((request) => request(axios, basePath));
         },
-        /**
-         * 
-         * @summary 登录配置
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async loginConfigGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultBoolean>> {
-            return SysAuthApiFp(configuration).loginConfigGet(options).then((request) => request(axios, basePath));
-        },
         /**
          * 
          * @summary Swagger登录检查
@@ -570,6 +569,16 @@ export class SysAuthApi extends BaseAPI {
     public async captchaGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
         return SysAuthApiFp(this.configuration).captchaGet(options).then((request) => request(this.axios, this.basePath));
     }
+    /**
+     * 
+     * @summary 登录配置
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysAuthApi
+     */
+    public async loginConfigGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
+        return SysAuthApiFp(this.configuration).loginConfigGet(options).then((request) => request(this.axios, this.basePath));
+    }
     /**
      * 用户名/密码:superadmin/123456
      * @summary 登录系统
@@ -602,16 +611,6 @@ export class SysAuthApi extends BaseAPI {
     public async refreshTokenPost(accessToken: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
         return SysAuthApiFp(this.configuration).refreshTokenPost(accessToken, options).then((request) => request(this.axios, this.basePath));
     }
-    /**
-     * 
-     * @summary 登录配置
-     * @param {*} [options] Override http request option.
-     * @throws {RequiredError}
-     * @memberof SysAuthApi
-     */
-    public async loginConfigGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultBoolean>> {
-        return SysAuthApiFp(this.configuration).loginConfigGet(options).then((request) => request(this.axios, this.basePath));
-    }
     /**
      * 
      * @summary Swagger登录检查

+ 2 - 2
Web/src/stores/themeConfig.ts

@@ -86,7 +86,7 @@ export const useThemeConfig = defineStore('themeConfig', {
 			// 是否开启 Tagsview
 			isTagsview: true,
 			// 是否开启 Breadcrumb 图标
-			isBreadcrumbIcon: true,
+			isBreadcrumbIcon: false,
 			// 是否开启 Tagsview 图标
 			isTagsviewIcon: false,
 			// 是否开启 TagsView 缓存
@@ -104,7 +104,7 @@ export const useThemeConfig = defineStore('themeConfig', {
 			// 是否开启水印
 			isWartermark: false,
 			// 水印文案
-			wartermarkText: '运城市智慧民政',
+			wartermarkText: 'Admin.NET',
 
 			/**
 			 * 其它设置

+ 35 - 31
Web/src/views/login/component/account.vue

@@ -10,24 +10,20 @@
 			</el-input>
 		</el-form-item>
 		<el-form-item class="login-animation2" prop="password">
-			<el-input :type="state.isShowPassword ? 'text' : 'password'" placeholder="请输入密码"
-				v-model="state.ruleForm.password" autocomplete="off">
+			<el-input :type="state.isShowPassword ? 'text' : 'password'" placeholder="请输入密码" v-model="state.ruleForm.password" autocomplete="off">
 				<template #prefix>
 					<el-icon>
 						<ele-Unlock />
 					</el-icon>
 				</template>
 				<template #suffix>
-					<i class="iconfont el-input__icon login-content-password"
-						:class="state.isShowPassword ? 'icon-yincangmima' : 'icon-xianshimima'"
-						@click="state.isShowPassword = !state.isShowPassword"> </i>
+					<i class="iconfont el-input__icon login-content-password" :class="state.isShowPassword ? 'icon-yincangmima' : 'icon-xianshimima'" @click="state.isShowPassword = !state.isShowPassword"> </i>
 				</template>
 			</el-input>
 		</el-form-item>
 		<el-form-item class="login-animation3" prop="captcha" v-show="state.captchaEnabled">
 			<el-col :span="15">
-				<el-input text maxlength="4" :placeholder="$t('message.account.accountPlaceholder3')"
-					v-model="state.ruleForm.code" clearable autocomplete="off">
+				<el-input text maxlength="4" :placeholder="$t('message.account.accountPlaceholder3')" v-model="state.ruleForm.code" clearable autocomplete="off">
 					<template #prefix>
 						<el-icon>
 							<ele-Position />
@@ -38,14 +34,12 @@
 			<el-col :span="1"></el-col>
 			<el-col :span="8">
 				<div class="login-content-code">
-					<img class="login-content-code-img" @click="getCaptcha" width="130px" height="38px"
-						:src="state.captchaImage" style="cursor: pointer" />
+					<img class="login-content-code-img" @click="getCaptcha" width="130px" height="38px" :src="state.captchaImage" style="cursor: pointer" />
 				</div>
 			</el-col>
 		</el-form-item>
 		<el-form-item class="login-animation4">
-			<el-button type="primary" class="login-content-submit" round v-waves
-				@click="state.secondVerEnabled ? openRotateVerify() : onSignIn()" :loading="state.loading.signIn">
+			<el-button type="primary" class="login-content-submit" round v-waves @click="state.secondVerEnabled ? openRotateVerify() : onSignIn()" :loading="state.loading.signIn">
 				<span>{{ $t('message.account.accountBtnText') }}</span>
 			</el-button>
 		</el-form-item>
@@ -54,9 +48,16 @@
 
 	<div class="dialog-header">
 		<el-dialog v-model="state.rotateVerifyVisible" :show-close="false">
-			<DragVerifyImgRotate ref="dragRef" :imgsrc="state.rotateVerifyImg" v-model:isPassing="state.isPassRotate"
-				text="请按住滑块拖动" successText="验证通过" handlerIcon="fa fa-angle-double-right"
-				successIcon="fa fa-hand-peace-o" @passcallback="passRotateVerify" />
+			<DragVerifyImgRotate
+				ref="dragRef"
+				:imgsrc="state.rotateVerifyImg"
+				v-model:isPassing="state.isPassRotate"
+				text="请按住滑块拖动"
+				successText="验证通过"
+				handlerIcon="fa fa-angle-double-right"
+				successIcon="fa fa-hand-peace-o"
+				@passcallback="passRotateVerify"
+			/>
 		</el-dialog>
 	</div>
 </template>
@@ -67,17 +68,17 @@ import { useRoute, useRouter } from 'vue-router';
 import { ElMessage } from 'element-plus';
 import { useI18n } from 'vue-i18n';
 import { initBackEndControlRoutes } from '/@/router/backEnd';
-import { Session } from '/@/utils/storage';
+import { Local, Session } from '/@/utils/storage';
 import { formatAxis } from '/@/utils/formatTime';
 import { NextLoading } from '/@/utils/loading';
 
-import { clearTokens, feature, getAPI } from '/@/utils/axios-utils';
-import { SysAuthApi } from '/@/api-services/api';
-
 import { storeToRefs } from 'pinia';
-import { Local } from '/@/utils/storage';
 import { useThemeConfig } from '/@/stores/themeConfig';
 import Watermark from '/@/utils/wartermark';
+
+import { clearTokens, feature, getAPI } from '/@/utils/axios-utils';
+import { SysAuthApi } from '/@/api-services/api';
+
 // 旋转图片滑块组件
 import verifyImg from '/@/assets/logo-mini.svg';
 const DragVerifyImgRotate = defineAsyncComponent(() => import('/@/components/dragVerify/dragVerifyImgRotate.vue'));
@@ -107,19 +108,19 @@ const state = reactive({
 		signIn: false,
 	},
 	captchaImage: '',
-	secondVerEnabled: true,
 	rotateVerifyVisible: false,
 	rotateVerifyImg: verifyImg,
+	secondVerEnabled: true,
 	captchaEnabled: true,
-	wartermarkTextEnabled: true,
+	wartermarkEnabled: true,
 	isPassRotate: false,
 });
 onMounted(async () => {
-	// 登录配置
+	// 获取登录配置
 	var res1 = await getAPI(SysAuthApi).loginConfigGet();
 	state.secondVerEnabled = res1.data.result.secondVerEnabled ?? true;
 	state.captchaEnabled = res1.data.result.captchaEnabled ?? true;
-	state.wartermarkTextEnabled = res1.data.result.wartermarkTextEnabled ?? true;
+	state.wartermarkEnabled = res1.data.result.wartermarkEnabled ?? true;
 
 	getCaptcha();
 });
@@ -129,6 +130,13 @@ const getThemeConfig = computed(() => {
 });
 // 存储布局配置
 const setLocalThemeConfig = () => {
+	// 是否显示水印
+	if (!state.wartermarkEnabled) return;
+
+	// getThemeConfig.value.wartermarkText = state.ruleForm.account;
+	getThemeConfig.value.isWartermark = true;
+	Watermark.set(getThemeConfig.value.wartermarkText);
+
 	Local.remove('themeConfig');
 	Local.set('themeConfig', getThemeConfig.value);
 };
@@ -139,7 +147,7 @@ const getCaptcha = async () => {
 	state.captchaImage = 'data:text/html;base64,' + res.data.result?.img;
 	state.ruleForm.codeId = res.data.result?.id;
 };
-// 时间获取
+// 获取时间
 const currentTime = computed(() => {
 	return formatAxis(new Date());
 });
@@ -183,13 +191,9 @@ const signInSuccess = (isNoPower: boolean | undefined) => {
 		} else {
 			router.push('/');
 		}
-		// 设置水印
-		if (state.wartermarkTextEnabled) {
-			getThemeConfig.value.wartermarkText = state.ruleForm.account;
-			getThemeConfig.value.isWartermark = true;
-			if (getThemeConfig.value.isWartermark) Watermark.set(getThemeConfig.value.wartermarkText);
-			setLocalThemeConfig();
-		}
+		// // 设置水印
+		// setLocalThemeConfig();
+
 		// 登录成功提示
 		const signInText = t('message.signInText');
 		ElMessage.success(`${currentTimeInfo},${signInText}`);