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

😁调整雪花Id注册顺序及其他

zuohuaijun 2 лет назад
Родитель
Сommit
232d867c62

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

@@ -16,7 +16,7 @@
 
   <ItemGroup>
     <PackageReference Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="2.0.24" />
-    <PackageReference Include="AngleSharp" Version="1.0.4" />
+    <PackageReference Include="AngleSharp" Version="1.0.5" />
     <PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
     <PackageReference Include="AspNet.Security.OAuth.Gitee" Version="6.0.15" />
     <PackageReference Include="AspNet.Security.OAuth.Weixin" Version="6.0.15" />

+ 3 - 0
Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs

@@ -17,6 +17,9 @@ public static class SqlSugarSetup
     /// <param name="services"></param>
     public static void AddSqlSugar(this IServiceCollection services)
     {
+        // 注册雪花Id
+        YitIdHelper.SetIdGenerator(App.GetOptions<SnowIdOptions>());
+
         // 自定义 SqlSugar 雪花ID算法
         SnowFlakeSingle.WorkId = App.GetOptions<SnowIdOptions>().WorkerId;
         StaticConfig.CustomSnowFlakeFunc = () =>

+ 0 - 4
Admin.NET/Admin.NET.Web.Core/Startup.cs

@@ -27,7 +27,6 @@ using OnceMi.AspNetCore.OSS;
 using System;
 using System.Net;
 using System.Net.Mail;
-using Yitter.IdGenerator;
 
 namespace Admin.NET.Web.Core;
 
@@ -166,9 +165,6 @@ public class Startup : AppStartup
         // 系统日志
         services.AddLoggingSetup();
 
-        // 雪花Id
-        YitIdHelper.SetIdGenerator(App.GetOptions<SnowIdOptions>());
-
         // 验证码
         services.AddCaptcha();
 

+ 1 - 1
Web/src/stores/userInfo.ts

@@ -55,7 +55,7 @@ export const useUserInfo = defineStore('userInfo', {
 						const userInfos = {
 							account: d.account,
 							realName: d.realName,
-							avatar: d.avatar ? d.avatar : '/favicon.ico',
+							avatar: d.avatar ? '/' + d.avatar : '/favicon.ico',
 							address: d.address,
 							signature: d.signature,
 							orgId: d.orgId,

+ 1 - 3
Web/src/types/views.d.ts

@@ -336,14 +336,12 @@ declare type TableDemoState = {
 			exportFileName?: string;
 			hidePrint?: boolean;
 			printName?: string;
-			
 			// isOperate: boolean;
 		};
 		// actions: WorkflowDrawerLabelType[];
 		search: TableSearchType[];
 		param: EmptyObjectType;
 		defaultSort: EmptyObjectType;
-		
 	};
 };
 
@@ -352,4 +350,4 @@ interface HttpJobMessage {
 	requestUri?: string | null;
 	httpMethod?: string | null;
 	body?: string | null;
-}
+}

+ 0 - 1
Web/src/views/system/config/index.vue

@@ -59,7 +59,6 @@ const tb = reactive<TableDemoState>({
 			{ prop: 'orderNo', width: 80, label: '排序', align: 'center', sortable: 'custom', isCheck: true },
 			{ prop: 'remark', label: '备注', align: '', headerAlign: 'center', showOverflowTooltip: true, isCheck: true },
 			{ prop: 'action', width: 140, label: '操作', type: 'action', align: 'center', isCheck: true, fixed: 'right', hideCheck: true },
-			
 		],
 		// 配置项(必传)
 		config: {