From 920da7d91811748d0b6d1173a121d5a9c716440e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Tue, 21 Jan 2025 10:35:11 +0800 Subject: [PATCH 01/18] =?UTF-8?q?fix=EF=BC=9A=F0=9F=98=80=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=97=A7=E7=89=88=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E8=A1=A8=E7=BB=93=E6=9E=84=E6=8A=A5Captcha?= =?UTF-8?q?=E3=80=81SecondVer=E5=AD=97=E6=AE=B5=E4=B8=8D=E8=83=BD=E4=B8=BA?= =?UTF-8?q?null=E7=9A=84=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Entity/SysTenant.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs b/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs index 45422726..9176987a 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs @@ -170,12 +170,12 @@ public partial class SysTenant : EntityBase /// /// 图形验证码 /// - [SugarColumn(ColumnDescription = "图形验证码")] + [SugarColumn(ColumnDescription = "图形验证码", DefaultValue = "1")] public virtual bool Captcha { get; set; } = true; /// /// 登录二次验证 /// - [SugarColumn(ColumnDescription = "登录二次验证")] + [SugarColumn(ColumnDescription = "登录二次验证", DefaultValue = "0")] public virtual bool SecondVer { get; set; } = false; } \ No newline at end of file From b8d1172719f23e52c5dd5292e41124a40cbeb3ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Tue, 21 Jan 2025 11:05:16 +0800 Subject: [PATCH 02/18] =?UTF-8?q?fix:=20=F0=9F=98=80=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=9D=9E=E9=BB=98=E8=AE=A4=E7=A7=9F=E6=88=B7=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=85=AC=E5=85=B1=E5=AD=97=E5=85=B8=E5=80=BC?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs | 6 +++--- Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs b/Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs index 68978974..87977de6 100644 --- a/Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs @@ -158,7 +158,7 @@ public class SysDictDataService : IDynamicApiController, ITransient { dictDataList = await _sysDictDataRep.AsQueryable().ClearFilter() .InnerJoin((u, a) => u.DictTypeId == a.Id) - .Where((u, a) => a.SysFlag == YesNoEnum.Y || u.TenantId == _userManager.TenantId) + .Where((u, a) => a.SysFlag == YesNoEnum.Y && u.TenantId == SqlSugarConst.DefaultTenantId || (a.SysFlag == YesNoEnum.N && u.TenantId == _userManager.TenantId)) .Where(u => u.DictTypeId == dictTypeId).OrderBy(u => new { u.OrderNo, u.Code }).ToListAsync(); _sysCacheService.Set($"{CacheConst.KeyDict}{dictType.Code}", dictDataList); } @@ -178,7 +178,7 @@ public class SysDictDataService : IDynamicApiController, ITransient { dictDataList = await _sysDictDataRep.Change().AsQueryable() .LeftJoin((u, a) => u.Id == a.DictTypeId).ClearFilter() - .Where((u, a) => u.SysFlag == YesNoEnum.Y || a.TenantId == _userManager.TenantId) + .Where((u, a) => u.SysFlag == YesNoEnum.Y && a.TenantId == SqlSugarConst.DefaultTenantId || (u.SysFlag == YesNoEnum.N && a.TenantId == _userManager.TenantId)) .Where((u, a) => u.Code == code && u.Status == StatusEnum.Enable && a.Status == StatusEnum.Enable) .OrderBy((u, a) => new { a.OrderNo, a.Code }) .Select((u, a) => a).ToListAsync(); @@ -197,7 +197,7 @@ public class SysDictDataService : IDynamicApiController, ITransient { return await _sysDictDataRep.Change().AsQueryable() .LeftJoin((u, a) => u.Id == a.DictTypeId).ClearFilter() - .Where((u, a) => u.SysFlag == YesNoEnum.Y || a.TenantId == _userManager.TenantId) + .Where((u, a) => u.SysFlag == YesNoEnum.Y && a.TenantId == SqlSugarConst.DefaultTenantId || (u.SysFlag == YesNoEnum.N && a.TenantId == _userManager.TenantId)) .Where((u, a) => u.Code == input.Code) .WhereIF(input.Status.HasValue, (u, a) => u.Status == (StatusEnum)input.Status.Value && a.Status == (StatusEnum)input.Status.Value) .OrderBy((u, a) => new { a.OrderNo, a.Code }) diff --git a/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs b/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs index b08d6015..9ad6b4dd 100644 --- a/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs @@ -162,7 +162,7 @@ public class SysDictTypeService : IDynamicApiController, ITransient { var ds = await _sysDictTypeRep.AsQueryable() .InnerJoin((u, a) => u.Id == a.DictTypeId).ClearFilter() - .Where((u, a) => u.SysFlag == YesNoEnum.Y || a.TenantId == _userManager.TenantId) + .Where((u, a) => u.SysFlag == YesNoEnum.Y && a.TenantId == SqlSugarConst.DefaultTenantId || (u.SysFlag == YesNoEnum.N && a.TenantId == _userManager.TenantId)) .Where((u, a) => u.IsDelete == false && a.IsDelete == false && u.Status == StatusEnum.Enable && a.Status == StatusEnum.Enable) .Select((u, a) => new { TypeCode = u.Code, a.Code, a.Name, a.Value, a.Remark, a.OrderNo, a.TagType, a.ExtData }) .ToListAsync(); From 282788e82d070f2f8e7bb8ae9f7b7e870edb92e1 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Tue, 21 Jan 2025 11:16:54 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=F0=9F=98=8E1=E3=80=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE=20=202=E3=80=81=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Configuration/Swagger.json | 2 +- .../Admin.NET.Core/Admin.NET.Core.csproj | 4 +- Admin.NET/Admin.NET.Core/Entity/SysTenant.cs | 4 +- .../Entity/SysTenantCarousel.cs | 45 +++++ .../Service/Auth/SysAuthService.cs | 2 +- .../Service/Tenant/Dto/SysInfoInput.cs | 5 + .../Service/Tenant/SysTenantService.cs | 9 +- Web/package.json | 14 +- Web/src/api-services/apis/sys-common-api.ts | 91 ++++++++++ Web/src/api-services/apis/sys-user-api.ts | 166 +++++++++--------- Web/src/api-services/base.ts | 2 +- Web/src/api-services/models/api-output.ts | 8 + Web/src/api-services/models/sys-info-input.ts | 8 + Web/src/views/system/infoSetting/index.vue | 65 ++++--- .../system/user/component/userCenter.vue | 2 +- 15 files changed, 298 insertions(+), 129 deletions(-) create mode 100644 Admin.NET/Admin.NET.Core/Entity/SysTenantCarousel.cs diff --git a/Admin.NET/Admin.NET.Application/Configuration/Swagger.json b/Admin.NET/Admin.NET.Application/Configuration/Swagger.json index f91fe788..59d79160 100644 --- a/Admin.NET/Admin.NET.Application/Configuration/Swagger.json +++ b/Admin.NET/Admin.NET.Application/Configuration/Swagger.json @@ -23,7 +23,7 @@ "DocExpansionState": "List", // List、Full、None "EnableAllGroups": true, //"ServerDir": "xxx", // 二级虚拟目录并且开启 Servers 选择列表 - "HideServers": true, + "HideServers": false, "Servers": [ { "Url": "http://ip/xxx", diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index 516f8572..b9bd4991 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -33,7 +33,7 @@ - + @@ -49,7 +49,7 @@ - + diff --git a/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs b/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs index 9176987a..45422726 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs @@ -170,12 +170,12 @@ public partial class SysTenant : EntityBase /// /// 图形验证码 /// - [SugarColumn(ColumnDescription = "图形验证码", DefaultValue = "1")] + [SugarColumn(ColumnDescription = "图形验证码")] public virtual bool Captcha { get; set; } = true; /// /// 登录二次验证 /// - [SugarColumn(ColumnDescription = "登录二次验证", DefaultValue = "0")] + [SugarColumn(ColumnDescription = "登录二次验证")] public virtual bool SecondVer { get; set; } = false; } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Entity/SysTenantCarousel.cs b/Admin.NET/Admin.NET.Core/Entity/SysTenantCarousel.cs new file mode 100644 index 00000000..ca87036a --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Entity/SysTenantCarousel.cs @@ -0,0 +1,45 @@ +//// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +//// +//// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +//// +//// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +//namespace Admin.NET.Core; + +///// +///// 系统租户轮播图表 +///// +//[SugarTable(null, "系统租户轮播图表")] +//[SysTable] +//public partial class SysTenantCarousel : EntityBaseId +//{ +// /// +// /// 租户Id +// /// +// [SugarColumn(ColumnDescription = "租户Id")] +// public long TenantId { get; set; } + +// ///// +// ///// 文件Id +// ///// +// //[SugarColumn(ColumnDescription = "文件Id")] +// //public long? FileId { get; set; } + +// /// +// /// 文件名称 +// /// +// [SugarColumn(ColumnDescription = "文件名称", Length = 64), MaxLength(64)] +// public string? FileName { get; set; } + +// /// +// /// 文件路径 +// /// +// [SugarColumn(ColumnDescription = "文件路径", Length = 256), MaxLength(256)] +// public string? FilePath { get; set; } + +// /// +// /// 排序 +// /// +// [SugarColumn(ColumnDescription = "排序", DefaultValue = "100")] +// public int OrderNo { get; set; } = 100; +//} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs index b572a0d3..f7ae023d 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs @@ -13,7 +13,7 @@ namespace Admin.NET.Core.Service; /// 系统登录授权服务 🧩 /// [ApiDescriptionSettings(Order = 500, Description = "登录授权")] -[AppApiDescription("账号密码登录 🔖")] +[AppApiDescription("登录授权")] public class SysAuthService : IDynamicApiController, ITransient { private readonly UserManager _userManager; diff --git a/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/SysInfoInput.cs b/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/SysInfoInput.cs index 7d7fdb5b..280a1ae1 100644 --- a/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/SysInfoInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/SysInfoInput.cs @@ -97,4 +97,9 @@ public class SysInfoInput /// 登录二次验证 /// public bool SecondVer { get; set; } = false; + + /// + /// 轮播图 + /// + public List CarouselFiles { get; set; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs b/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs index 956a79a6..4a241287 100644 --- a/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs @@ -566,7 +566,7 @@ public class SysTenantService : IDynamicApiController, ITransient var tenant = await _sysTenantRep.GetFirstAsync(u => u.Id == tenantId); if (tenant == null) return ""; - // 若租户系统标题为空,则获取默认租户系统信息 + // 若租户系统标题为空,则获取默认租户系统信息(兼容已有未配置的租户) if (string.IsNullOrWhiteSpace(tenant.Title)) tenant = await _sysTenantRep.GetFirstAsync(u => u.Id == SqlSugarConst.DefaultTenantId); @@ -615,6 +615,8 @@ public class SysTenantService : IDynamicApiController, ITransient tenant = input.Adapt(); tenant.Id = input.TenantId; + // 保存轮播图 + // logo 不为空才保存 if (!string.IsNullOrEmpty(input.LogoBase64)) { @@ -629,8 +631,8 @@ public class SysTenantService : IDynamicApiController, ITransient // 根据文件名取扩展名 var ext = string.IsNullOrWhiteSpace(input.LogoFileName) ? ".png" : Path.GetExtension(input.LogoFileName); // 本地图标保存路径 - var path = "upload"; - var fileName = $"{input.TenantId}-logo{ext}".ToLower(); + var path = $"upload/{input.TenantId}/"; + var fileName = $"logo{ext}".ToLower(); var absoluteFilePath = Path.Combine(App.WebHostEnvironment.WebRootPath, path, fileName); // 删除已存在文件 @@ -648,6 +650,7 @@ public class SysTenantService : IDynamicApiController, ITransient // 保存图标配置 tenant.Logo = $"/{path}/{fileName}"; } + await _sysTenantRep.AsUpdateable(tenant).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); } } \ No newline at end of file diff --git a/Web/package.json b/Web/package.json index c3fb2432..9aefa44a 100644 --- a/Web/package.json +++ b/Web/package.json @@ -2,7 +2,7 @@ "name": "admin.net.pro", "type": "module", "version": "2.4.33", - "lastBuildTime": "2025.01.17", + "lastBuildTime": "2025.01.21", "description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架", "author": "zuohuaijun", "license": "MIT", @@ -51,7 +51,7 @@ "mqtt": "^5.10.3", "nprogress": "^0.2.0", "ol": "^10.3.1", - "pinia": "^2.3.0", + "pinia": "^2.3.1", "print-js": "^1.6.0", "push.js": "^1.0.12", "qrcodejs2-fixes": "^0.0.2", @@ -74,7 +74,7 @@ "vue-router": "^4.5.0", "vue-signature-pad": "^3.0.2", "vue3-tree-org": "^4.2.2", - "vxe-pc-ui": "^4.3.75", + "vxe-pc-ui": "^4.3.76", "vxe-table": "^4.10.0", "vxe-table-plugin-element": "^4.0.4", "vxe-table-plugin-export-xlsx": "^4.0.7", @@ -88,8 +88,8 @@ "@types/node": "^20.17.14", "@types/nprogress": "^0.2.3", "@types/sortablejs": "^1.15.8", - "@typescript-eslint/eslint-plugin": "^8.20.0", - "@typescript-eslint/parser": "^8.20.0", + "@typescript-eslint/eslint-plugin": "^8.21.0", + "@typescript-eslint/parser": "^8.21.0", "@vitejs/plugin-vue": "^5.2.1", "@vitejs/plugin-vue-jsx": "^4.1.1", "@vue/compiler-sfc": "^3.5.13", @@ -97,13 +97,13 @@ "eslint": "^9.18.0", "eslint-plugin-vue": "^9.32.0", "globals": "^15.14.0", - "less": "^4.2.1", + "less": "^4.2.2", "prettier": "^3.4.2", "rollup-plugin-visualizer": "^5.14.0", "sass": "^1.83.4", "terser": "^5.37.0", "typescript": "^5.7.3", - "vite": "^6.0.7", + "vite": "^6.0.10", "vite-plugin-cdn-import": "^1.0.1", "vite-plugin-compression2": "^1.3.3", "vite-plugin-vue-setup-extend": "^0.4.0", diff --git a/Web/src/api-services/apis/sys-common-api.ts b/Web/src/api-services/apis/sys-common-api.ts index 2de9a014..8de031fe 100644 --- a/Web/src/api-services/apis/sys-common-api.ts +++ b/Web/src/api-services/apis/sys-common-api.ts @@ -174,6 +174,59 @@ export const SysCommonApiAxiosParamCreator = function (configuration?: Configura options: localVarRequestOptions, }; }, + /** + * + * @summary 生成所有移动端接口 🔖 + * @param {string} [groupName] + * @param {boolean} [isAppApi] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysCommonGenerateAppApiGet: async (groupName?: string, isAppApi?: boolean, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysCommon/generateAppApi`; + // 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 localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + if (groupName !== undefined) { + localVarQueryParameter['groupName'] = groupName; + } + + if (isAppApi !== undefined) { + localVarQueryParameter['isAppApi'] = isAppApi; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, /** * * @summary 获取MD5加密字符串 🏆 @@ -512,6 +565,21 @@ export const SysCommonApiFp = function(configuration?: Configuration) { return axios.request(axiosRequestArgs); }; }, + /** + * + * @summary 生成所有移动端接口 🔖 + * @param {string} [groupName] + * @param {boolean} [isAppApi] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysCommonGenerateAppApiGet(groupName?: string, isAppApi?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysCommonApiAxiosParamCreator(configuration).apiSysCommonGenerateAppApiGet(groupName, isAppApi, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, /** * * @summary 获取MD5加密字符串 🏆 @@ -634,6 +702,17 @@ export const SysCommonApiFactory = function (configuration?: Configuration, base async apiSysCommonDownloadErrorExcelTempPost(fileName?: string, options?: AxiosRequestConfig): Promise> { return SysCommonApiFp(configuration).apiSysCommonDownloadErrorExcelTempPost(fileName, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary 生成所有移动端接口 🔖 + * @param {string} [groupName] + * @param {boolean} [isAppApi] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysCommonGenerateAppApiGet(groupName?: string, isAppApi?: boolean, options?: AxiosRequestConfig): Promise> { + return SysCommonApiFp(configuration).apiSysCommonGenerateAppApiGet(groupName, isAppApi, options).then((request) => request(axios, basePath)); + }, /** * * @summary 获取MD5加密字符串 🏆 @@ -736,6 +815,18 @@ export class SysCommonApi extends BaseAPI { public async apiSysCommonDownloadErrorExcelTempPost(fileName?: string, options?: AxiosRequestConfig) : Promise> { return SysCommonApiFp(this.configuration).apiSysCommonDownloadErrorExcelTempPost(fileName, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary 生成所有移动端接口 🔖 + * @param {string} [groupName] + * @param {boolean} [isAppApi] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysCommonApi + */ + public async apiSysCommonGenerateAppApiGet(groupName?: string, isAppApi?: boolean, options?: AxiosRequestConfig) : Promise> { + return SysCommonApiFp(this.configuration).apiSysCommonGenerateAppApiGet(groupName, isAppApi, options).then((request) => request(this.axios, this.basePath)); + } /** * * @summary 获取MD5加密字符串 🏆 diff --git a/Web/src/api-services/apis/sys-user-api.ts b/Web/src/api-services/apis/sys-user-api.ts index 0143f6b8..faf9857c 100644 --- a/Web/src/api-services/apis/sys-user-api.ts +++ b/Web/src/api-services/apis/sys-user-api.ts @@ -132,54 +132,6 @@ export const SysUserApiAxiosParamCreator = function (configuration?: Configurati options: localVarRequestOptions, }; }, - /** - * - * @summary 更新用户基本信息 🔖 - * @param {SysUser} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiSysUserBaseInfoPost: async (body?: SysUser, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/sysUser/baseInfo`; - // 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 localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication Bearer required - // http bearer authentication required - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; - } - - localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - 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, - options: localVarRequestOptions, - }; - }, /** * * @summary 修改用户密码 🔖 @@ -614,6 +566,54 @@ export const SysUserApiAxiosParamCreator = function (configuration?: Configurati options: localVarRequestOptions, }; }, + /** + * + * @summary 更新用户基本信息 🔖 + * @param {SysUser} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiSysUserUpdateBaseInfoPost: async (body?: SysUser, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysUser/updateBaseInfo`; + // 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 localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + 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, + options: localVarRequestOptions, + }; + }, /** * * @summary 更新用户 🔖 @@ -741,20 +741,6 @@ export const SysUserApiFp = function(configuration?: Configuration) { return axios.request(axiosRequestArgs); }; }, - /** - * - * @summary 更新用户基本信息 🔖 - * @param {SysUser} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiSysUserBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await SysUserApiAxiosParamCreator(configuration).apiSysUserBaseInfoPost(body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, /** * * @summary 修改用户密码 🔖 @@ -881,6 +867,20 @@ export const SysUserApiFp = function(configuration?: Configuration) { return axios.request(axiosRequestArgs); }; }, + /** + * + * @summary 更新用户基本信息 🔖 + * @param {SysUser} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysUserUpdateBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await SysUserApiAxiosParamCreator(configuration).apiSysUserUpdateBaseInfoPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, /** * * @summary 更新用户 🔖 @@ -936,16 +936,6 @@ export const SysUserApiFactory = function (configuration?: Configuration, basePa async apiSysUserBaseInfoGet(options?: AxiosRequestConfig): Promise> { return SysUserApiFp(configuration).apiSysUserBaseInfoGet(options).then((request) => request(axios, basePath)); }, - /** - * - * @summary 更新用户基本信息 🔖 - * @param {SysUser} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiSysUserBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig): Promise> { - return SysUserApiFp(configuration).apiSysUserBaseInfoPost(body, options).then((request) => request(axios, basePath)); - }, /** * * @summary 修改用户密码 🔖 @@ -1036,6 +1026,16 @@ export const SysUserApiFactory = function (configuration?: Configuration, basePa async apiSysUserUnlockLoginPost(body?: UnlockLoginInput, options?: AxiosRequestConfig): Promise> { return SysUserApiFp(configuration).apiSysUserUnlockLoginPost(body, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary 更新用户基本信息 🔖 + * @param {SysUser} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiSysUserUpdateBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig): Promise> { + return SysUserApiFp(configuration).apiSysUserUpdateBaseInfoPost(body, options).then((request) => request(axios, basePath)); + }, /** * * @summary 更新用户 🔖 @@ -1086,17 +1086,6 @@ export class SysUserApi extends BaseAPI { public async apiSysUserBaseInfoGet(options?: AxiosRequestConfig) : Promise> { return SysUserApiFp(this.configuration).apiSysUserBaseInfoGet(options).then((request) => request(this.axios, this.basePath)); } - /** - * - * @summary 更新用户基本信息 🔖 - * @param {SysUser} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SysUserApi - */ - public async apiSysUserBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig) : Promise> { - return SysUserApiFp(this.configuration).apiSysUserBaseInfoPost(body, options).then((request) => request(this.axios, this.basePath)); - } /** * * @summary 修改用户密码 🔖 @@ -1196,6 +1185,17 @@ export class SysUserApi extends BaseAPI { public async apiSysUserUnlockLoginPost(body?: UnlockLoginInput, options?: AxiosRequestConfig) : Promise> { return SysUserApiFp(this.configuration).apiSysUserUnlockLoginPost(body, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary 更新用户基本信息 🔖 + * @param {SysUser} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SysUserApi + */ + public async apiSysUserUpdateBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig) : Promise> { + return SysUserApiFp(this.configuration).apiSysUserUpdateBaseInfoPost(body, options).then((request) => request(this.axios, this.basePath)); + } /** * * @summary 更新用户 🔖 diff --git a/Web/src/api-services/base.ts b/Web/src/api-services/base.ts index a12ce916..851510e1 100644 --- a/Web/src/api-services/base.ts +++ b/Web/src/api-services/base.ts @@ -17,7 +17,7 @@ import { Configuration } from "./configuration"; // @ts-ignore import globalAxios, { AxiosRequestConfig, AxiosInstance } from 'axios'; -export const BASE_PATH = "/".replace(/\/+$/, ""); +export const BASE_PATH = "http://localhost:5005".replace(/\/+$/, ""); /** * diff --git a/Web/src/api-services/models/api-output.ts b/Web/src/api-services/models/api-output.ts index d482ed3a..99b33d84 100644 --- a/Web/src/api-services/models/api-output.ts +++ b/Web/src/api-services/models/api-output.ts @@ -45,6 +45,14 @@ export interface ApiOutput { */ route?: string | null; + /** + * 控制器名称 + * + * @type {string} + * @memberof ApiOutput + */ + action?: string | null; + /** * 请求方式 * diff --git a/Web/src/api-services/models/sys-info-input.ts b/Web/src/api-services/models/sys-info-input.ts index 2642fb1f..26624763 100644 --- a/Web/src/api-services/models/sys-info-input.ts +++ b/Web/src/api-services/models/sys-info-input.ts @@ -147,4 +147,12 @@ export interface SysInfoInput { * @memberof SysInfoInput */ secondVer?: boolean; + + /** + * 轮播图 + * + * @type {Array} + * @memberof SysInfoInput + */ + carouselFiles?: Array | null; } diff --git a/Web/src/views/system/infoSetting/index.vue b/Web/src/views/system/infoSetting/index.vue index cad996d3..255e1511 100644 --- a/Web/src/views/system/infoSetting/index.vue +++ b/Web/src/views/system/infoSetting/index.vue @@ -152,7 +152,7 @@ - + @@ -191,16 +191,12 @@ + + diff --git a/Web/src/views/system/codeGen/component/genConfigDialog.vue b/Web/src/views/system/codeGen/component/genConfigDialog.vue index 35a294bf..1ac558d0 100644 --- a/Web/src/views/system/codeGen/component/genConfigDialog.vue +++ b/Web/src/views/system/codeGen/component/genConfigDialog.vue @@ -1,6 +1,7 @@