From 4136c6f945816055d0060e7114345400fa2206e9 Mon Sep 17 00:00:00 2001 From: ChenYi <296215406@outlook.com> Date: Thu, 18 Sep 2025 11:17:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9UTC=E6=97=B6=E6=A0=87?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=EF=BC=8C=E8=A7=A3=E5=86=B3js=E7=B2=BE?= =?UTF-8?q?=E5=BA=A6=E6=8D=9F=E5=A4=B1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- host/JiShe.IoT.HttpApi.Host/Program.cs | 9 +++++---- .../configs/appsettings.Development.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/host/JiShe.IoT.HttpApi.Host/Program.cs b/host/JiShe.IoT.HttpApi.Host/Program.cs index 59ad177..ab410ba 100644 --- a/host/JiShe.IoT.HttpApi.Host/Program.cs +++ b/host/JiShe.IoT.HttpApi.Host/Program.cs @@ -1,7 +1,3 @@ -using Microsoft.AspNetCore.Server.Kestrel.Core; -using Microsoft.Extensions.Configuration; -using static Volo.Abp.Identity.Settings.IdentitySettingNames; - namespace JiShe.IoT; public class Program @@ -10,6 +6,11 @@ public class Program { try { + //var options = new Yitter.IdGenerator.IdGeneratorOptions(2); + //Yitter.IdGenerator.YitIdHelper.SetIdGenerator(options); + //long nanosecondsFromSnowflakeId = ServicePro.Core.TimestampHelper.NextUnixNanosecondsFromSnowflakeId(); + //long nanosecondsDateOffset = ServicePro.Core.TimestampHelper.ToUnixTimeNanoseconds(DateTimeOffset.UtcNow); + //string text = Convert.ToBase64String(Encoding.UTF8.GetBytes("admin:admin123")); Log.Information("JiShe.IoT.HttpApi.Host."); var builder = WebApplication.CreateBuilder(args); diff --git a/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json b/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json index e552a2d..16a452a 100644 --- a/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json +++ b/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json @@ -1,7 +1,7 @@ { "App": { "SelfUrl": "http://localhost:44315", - "CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://10.10.70.11:4200" + "CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://10.10.90.3:4200" }, "ConnectionStrings": { "Default": "Data Source=47.110.53.196;Port=13306;Database=JiSheIoTProDB;uid=root;pwd=JiShe!aqG#5kGgh&0;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;",