Przeglądaj źródła

😎1、更换新的swaggerUI访问地址sapi 2、升级依赖

zuohuaijun 2 miesięcy temu
rodzic
commit
64856aa42b

+ 14 - 14
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -13,16 +13,16 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="4.1.0" />
-    <PackageReference Include="AlipaySDKNet.Standard" Version="4.9.874" />
+    <PackageReference Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="4.2.0" />
+    <PackageReference Include="AlipaySDKNet.Standard" Version="4.9.971" />
     <PackageReference Include="AngleSharp" Version="1.4.0" />
     <PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
     <PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
-    <PackageReference Include="Elastic.Clients.Elasticsearch" Version="9.2.2" />
-    <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.221" />
-    <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.221" />
-    <PackageReference Include="Furion.Pure" Version="4.9.7.221" />
-    <PackageReference Include="Hardware.Info" Version="101.1.0.1" />
+    <PackageReference Include="Elastic.Clients.Elasticsearch" Version="9.2.3" />
+    <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.8.10" />
+    <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.8.10" />
+    <PackageReference Include="Furion.Pure" Version="4.9.8.10" />
+    <PackageReference Include="Hardware.Info" Version="101.1.1.1" />
     <PackageReference Include="Hashids.net" Version="1.7.0" />
     <PackageReference Include="IPTools.China" Version="1.6.0" />
     <PackageReference Include="IPTools.International" Version="1.6.0" />
@@ -34,7 +34,7 @@
     <PackageReference Include="MailKit" Version="4.14.1" />
     <PackageReference Include="MiniExcel" Version="1.42.0" />
     <PackageReference Include="MiniWord" Version="0.9.2" />
-    <PackageReference Include="NewLife.Redis" Version="6.4.2025.1113" />
+    <PackageReference Include="NewLife.Redis" Version="6.4.2026.104" />
     <PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="4.0.0" />
     <PackageReference Include="OnceMi.AspNetCore.OSS" Version="1.2.0" />
     <PackageReference Include="QRCoder" Version="1.7.0" />
@@ -43,10 +43,10 @@
     <PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.13.0" />
     <PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.16.0" />
     <PackageReference Include="SqlSugar.MongoDbCore" Version="5.1.4.277" />
-    <PackageReference Include="SqlSugarCore" Version="5.1.4.210" />
+    <PackageReference Include="SqlSugarCore" Version="5.1.4.211" />
     <PackageReference Include="SSH.NET" Version="2025.1.0" />
     <PackageReference Include="System.Linq.Dynamic.Core" Version="1.7.1" />
-    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1355" />
+    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1363" />
     <PackageReference Include="UAParser" Version="3.1.47" />
     <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
     <PackageReference Include="BouncyCastle.Cryptography" Version="2.6.2" Aliases="BouncyCastleV2" />
@@ -64,11 +64,11 @@
   <ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
     <PackageReference Include="AspNet.Security.OAuth.Gitee" Version="10.0.0" />
     <PackageReference Include="AspNet.Security.OAuth.Weixin" Version="10.0.0" />
-    <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="10.0.0" />
-    <PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="10.0.0" />
-    <PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="10.0.0" />
+    <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="10.0.2" />
+    <PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="10.0.2" />
+    <PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="10.0.2" />
     <PackageReference Include="Microsoft.PowerShell.SDK" Version="7.5.4" />
-    <PackageReference Include="XiHan.Framework.Utils" Version="1.4.5" />
+    <PackageReference Include="XiHan.Framework.Utils" Version="2.0.0" />
   </ItemGroup>	
 
 </Project>

+ 5 - 5
Admin.NET/Admin.NET.Test/Admin.NET.Test.csproj

@@ -12,12 +12,12 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Furion.Xunit" Version="4.9.7.221" />
+    <PackageReference Include="Furion.Xunit" Version="4.9.8.10" />
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
-    <PackageReference Include="Selenium.Support" Version="4.38.0" />
-    <PackageReference Include="Selenium.WebDriver" Version="4.38.0" />
-    <PackageReference Include="Selenium.WebDriver.MSEdgeDriver" Version="141.0.3537.71" />
-    <PackageReference Include="xunit.assert" Version="2.9.3" />
+    <PackageReference Include="Selenium.Support" Version="4.40.0" />
+    <PackageReference Include="Selenium.WebDriver" Version="4.40.0" />
+    <PackageReference Include="Selenium.WebDriver.MSEdgeDriver" Version="144.0.3719.82" />
+    <PackageReference Include="xunit.v3.assert" Version="3.2.2" />
   </ItemGroup>
 
   <ItemGroup>

+ 2 - 2
Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj

@@ -10,8 +10,8 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="IGeekFan.AspNetCore.Knife4jUI" Version="0.0.16" />
-    <PackageReference Include="System.Security.Cryptography.Pkcs" Version="10.0.0" />
+    <PackageReference Include="Scalar.AspNetCore" Version="2.12.24" />
+    <PackageReference Include="System.Security.Cryptography.Pkcs" Version="10.0.2" />
   </ItemGroup>
 
   <ItemGroup>

+ 15 - 11
Admin.NET/Admin.NET.Web.Core/Startup.cs

@@ -12,7 +12,6 @@ using Furion;
 using Furion.Logging;
 using Furion.SpecificationDocument;
 using Furion.VirtualFileServer;
-using IGeekFan.AspNetCore.Knife4jUI;
 using IPTools.Core;
 using Microsoft.AspNetCore.Authentication.JwtBearer;
 using Microsoft.AspNetCore.Builder;
@@ -24,6 +23,7 @@ using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Hosting;
 using Newtonsoft.Json;
 using OnceMi.AspNetCore.OSS;
+using Scalar.AspNetCore;
 using SixLabors.ImageSharp.Web.DependencyInjection;
 using System;
 using System.Linq;
@@ -363,16 +363,6 @@ public class Startup : AppStartup
             options.LoginConfig.SessionKey = "schedule_session_key"; // 登录客户端存储的 Session 键
         });
 
-        // 配置Swagger-Knife4UI(路由前缀一致代表独立,不同则代表共存)
-        app.UseKnife4UI(options =>
-        {
-            options.RoutePrefix = "kapi";
-            foreach (var groupInfo in SpecificationDocumentBuilder.GetOpenApiGroups())
-            {
-                options.SwaggerEndpoint("/" + groupInfo.RouteTemplate, groupInfo.Title);
-            }
-        });
-
         app.UseInject(string.Empty, options =>
         {
             foreach (var groupInfo in SpecificationDocumentBuilder.GetOpenApiGroups())
@@ -391,6 +381,20 @@ public class Startup : AppStartup
 
         app.UseEndpoints(endpoints =>
         {
+            // 配置 Scalar 第三方 UI 集成(路由前缀一致代表独立,不同则代表共存)
+            if (App.GetConfig<bool>("AppSettings:InjectSpecificationDocument", true))
+            {
+                endpoints.MapScalarApiReference("sapi", options =>
+                {
+                    options.WithTitle("Admin.NET");
+
+                    // 配置 OpenAPI 文档
+                    foreach (var groupInfo in SpecificationDocumentBuilder.GetOpenApiGroups())
+                    {
+                        options.AddDocument(groupInfo.Group, groupInfo.Title, groupInfo.RouteTemplate);
+                    }
+                });
+            }
             // 注册集线器
             endpoints.MapHubs();
 

+ 21 - 0
Web/lang/index.json

@@ -12955,5 +12955,26 @@
 		"zh-tw": "",
 		"en": "",
 		"it": ""
+	},
+	"xzd9zs5": {
+		"zh-cn": "个性化首页",
+		"zh-hk": "",
+		"zh-tw": "",
+		"en": "",
+		"it": ""
+	},
+	"f0b7168": {
+		"zh-cn": " 增加附属机构 ",
+		"zh-hk": "",
+		"zh-tw": "",
+		"en": "",
+		"it": ""
+	},
+	"3zrnt8f": {
+		"zh-cn": " 具有相应组织机构的数据权限 ",
+		"zh-hk": "",
+		"zh-tw": "",
+		"en": "",
+		"it": ""
 	}
 }

+ 31 - 29
Web/package.json

@@ -2,7 +2,8 @@
 	"name": "admin.net",
 	"type": "module",
 	"version": "2.4.33",
-	"lastBuildTime": "2025.12.06",
+	"packageManager": "pnpm@10.28.2",
+	"lastBuildTime": "2026.01.30",
 	"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
 	"author": "zuohuaijun",
 	"license": "MIT",
@@ -37,20 +38,20 @@
 		"@wangeditor/editor-for-vue": "^5.1.12",
 		"animate.css": "^4.1.1",
 		"async-validator": "^4.2.5",
-		"axios": "^1.13.2",
+		"axios": "^1.13.4",
 		"countup.js": "^2.9.0",
 		"cropperjs": "^1.6.2",
 		"echarts": "^6.0.0",
 		"echarts-gl": "^2.0.9",
 		"echarts-wordcloud": "^2.1.0",
-		"element-plus": "^2.12.0",
-		"ezuikit-js": "^8.2.0",
+		"element-plus": "^2.13.1",
+		"ezuikit-js": "^8.2.6",
 		"js-cookie": "^3.0.5",
 		"js-table2excel": "^1.1.2",
 		"json-editor-vue": "^0.18.1",
 		"jsplumb": "^2.15.6",
-		"lodash-es": "^4.17.21",
-		"md-editor-v3": "^6.2.0",
+		"lodash-es": "^4.17.23",
+		"md-editor-v3": "^6.3.1",
 		"mitt": "^3.0.1",
 		"monaco-editor": "^0.55.1",
 		"mqtt": "^5.14.1",
@@ -59,56 +60,56 @@
 		"print-js": "^1.6.0",
 		"push.js": "^1.0.12",
 		"qrcodejs2-fixes": "^0.0.2",
-		"qs": "^6.14.0",
+		"qs": "^6.14.1",
 		"relation-graph": "^2.2.11",
 		"screenfull": "^6.0.2",
-		"sm-crypto-v2": "^1.15.0",
+		"sm-crypto-v2": "^1.15.1",
 		"sortablejs": "^1.15.6",
 		"splitpanes": "^4.0.4",
 		"vcrontab-3": "^3.3.22",
 		"vform3-builds": "^3.0.10",
-		"vue": "^3.5.25",
+		"vue": "^3.5.27",
 		"vue-clipboard3": "^2.0.0",
 		"vue-demi": "^0.14.10",
-		"vue-draggable-plus": "^0.6.0",
+		"vue-draggable-plus": "^0.6.1",
 		"vue-grid-layout": "3.0.0-beta1",
-		"vue-i18n": "^11.2.2",
+		"vue-i18n": "^11.2.8",
 		"vue-json-pretty": "^2.6.0",
 		"vue-plugin-hiprint": "^0.0.60",
-		"vue-router": "^4.6.3",
+		"vue-router": "^5.0.0",
 		"vue-signature-pad": "^3.0.2",
 		"vue3-tree-org": "^4.2.2",
 		"xlsx-js-style": "^1.2.0"
 	},
 	"devDependencies": {
 		"@eslint/eslintrc": "^3.3.3",
-		"@eslint/js": "^9.39.1",
+		"@eslint/js": "^9.39.2",
 		"@plugin-web-update-notification/vite": "^2.0.2",
 		"@rollup/pluginutils": "^5.3.0",
 		"@types/lodash-es": "^4.17.12",
-		"@types/node": "^22.19.1",
+		"@types/node": "^22.19.7",
 		"@types/nprogress": "^0.2.3",
 		"@types/sortablejs": "^1.15.9",
-		"@typescript-eslint/eslint-plugin": "^8.48.1",
-		"@typescript-eslint/parser": "^8.48.1",
-		"@vitejs/plugin-vue": "^6.0.2",
-		"@vitejs/plugin-vue-jsx": "^5.1.2",
-		"@vue/compiler-sfc": "^3.5.25",
+		"@typescript-eslint/eslint-plugin": "^8.54.0",
+		"@typescript-eslint/parser": "^8.54.0",
+		"@vitejs/plugin-vue": "^6.0.3",
+		"@vitejs/plugin-vue-jsx": "^5.1.3",
+		"@vue/compiler-sfc": "^3.5.27",
 		"cli-progress": "^3.12.0",
-		"code-inspector-plugin": "^1.2.10",
+		"code-inspector-plugin": "^1.4.1",
 		"colors": "^1.4.0",
 		"dotenv": "^17.2.3",
-		"eslint": "^9.39.1",
-		"eslint-plugin-vue": "^10.6.2",
-		"globals": "^16.5.0",
-		"less": "^4.4.2",
-		"prettier": "^3.7.4",
+		"eslint": "^9.39.2",
+		"eslint-plugin-vue": "^10.7.0",
+		"globals": "^17.2.0",
+		"less": "^4.5.1",
+		"prettier": "^3.8.1",
 		"rollup-plugin-visualizer": "^6.0.5",
-		"sass": "^1.94.2",
-		"terser": "^5.44.1",
+		"sass": "^1.97.3",
+		"terser": "^5.46.0",
 		"typescript": "^5.9.3",
-		"vite": "^7.2.6",
-		"vite-auto-i18n-plugin": "^1.1.14",
+		"vite": "^7.3.1",
+		"vite-auto-i18n-plugin": "^1.1.16",
 		"vite-plugin-cdn-import": "^1.0.1",
 		"vite-plugin-compression2": "^2.4.0",
 		"vite-plugin-vue-setup-extend": "^0.4.0",
@@ -126,6 +127,7 @@
 			"es5-ext",
 			"esbuild",
 			"json-editor-vue",
+			"less",
 			"vue-demi"
 		],
 		"overrides": {

+ 6 - 4
Web/vite.config.ts

@@ -55,13 +55,15 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
 			JSON.parse(env.VITE_OPEN_CDN) ? buildConfig.cdn() : null,
 			// 使用说明 https://github.com/auto-i18n/auto-i18n-translation-plugins
 			vitePluginsAutoI18n({
+				// 是否触发翻译
+				enabled: false,
 				originLang: 'zh-cn', //源语言,翻译以此语言为基础
 				targetLangList: ['zh-hk', 'zh-tw', 'en', 'it'], // 目标语言列表,支持配置多个语言
-				translator: new EmptyTranslator() // 只生成Web\lang\index.json文件
+				translator: new EmptyTranslator(), // 只生成Web\lang\index.json文件
 				// translator: new YoudaoTranslator({ // 有道实时翻译
-                // appId: '你申请的appId',
-                // appKey: '你申请的appKey'
-            	// })
+				// appId: '你申请的appId',
+				// appKey: '你申请的appKey'
+				// })
 			}),
 		],
 		root: process.cwd(),