From df749439a5de13a84af230bbbe3d4a166f5129e4 Mon Sep 17 00:00:00 2001 From: "SmallChi(Koike)" <564952747@qq.com> Date: Fri, 27 Dec 2019 11:46:49 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8D=87=E7=BA=A7core3=202.=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=8D=8F=E8=AE=AE=E5=BA=93=203.TextJson=E7=9A=84?= =?UTF-8?q?=E6=8A=BD=E8=B1=A1=E7=B1=BB=E8=A7=A3=E4=B8=8D=E5=87=BA=EF=BC=8C?= =?UTF-8?q?=E6=9A=82=E6=97=B6=E9=87=87=E7=94=A8json.net=EF=BC=88=E6=9C=89?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E7=A0=94=E7=A9=B6=E4=B8=8B=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/JTTools.Test/JTTools.Test.csproj | 6 +- src/JTTools/JTTools.csproj | 14 ++--- src/JTTools/Program.cs | 19 +++--- src/ui/jttools/.eslintignore | 1 + src/ui/jttools/.eslintrc.js | 2 + src/ui/jttools/src/App.vue | 92 ++++++++++++++-------------- src/ui/jttools/src/main.js | 6 +- 7 files changed, 73 insertions(+), 67 deletions(-) diff --git a/src/JTTools.Test/JTTools.Test.csproj b/src/JTTools.Test/JTTools.Test.csproj index a5d9448..f71cb67 100644 --- a/src/JTTools.Test/JTTools.Test.csproj +++ b/src/JTTools.Test/JTTools.Test.csproj @@ -1,14 +1,14 @@  - netcoreapp3.0 + netcoreapp3.1 false - - + + all diff --git a/src/JTTools/JTTools.csproj b/src/JTTools/JTTools.csproj index e95b8d1..cdbfa25 100644 --- a/src/JTTools/JTTools.csproj +++ b/src/JTTools/JTTools.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + netcoreapp3.1 InProcess @@ -11,15 +11,15 @@ - - - + + + - + - - + + diff --git a/src/JTTools/Program.cs b/src/JTTools/Program.cs index f0b5dff..3e597f8 100644 --- a/src/JTTools/Program.cs +++ b/src/JTTools/Program.cs @@ -28,16 +28,19 @@ namespace JTTools { services.AddControllers() //Microsoft.AspNetCore.Mvc.NewtonsoftJson - //.AddNewtonsoftJson(jsonOptions => + .AddNewtonsoftJson(jsonOptions => + { + jsonOptions.SerializerSettings.Converters.Add(new ByteArrayHexConverter()); + jsonOptions.SerializerSettings.ContractResolver = new DefaultContractResolver(); + //jsonOptions.SerializerSettings.Formatting = Newtonsoft.Json.Formatting.Indented; + }) + //.AddJsonOptions(jsonOptions => //{ - // jsonOptions.SerializerSettings.Converters.Add(new ByteArrayHexConverter()); - // jsonOptions.SerializerSettings.ContractResolver = new DefaultContractResolver(); - // jsonOptions.SerializerSettings.Formatting = Newtonsoft.Json.Formatting.Indented; + // jsonOptions.JsonSerializerOptions.MaxDepth = 64; + + // jsonOptions.JsonSerializerOptions.Converters.Add(new ByteArrayHexTextJsonConverter()); //}) - .AddJsonOptions(jsonOptions => - { - jsonOptions.JsonSerializerOptions.Converters.Add(new ByteArrayHexTextJsonConverter()); - }); + ; services.AddCors(options => options.AddPolicy("Domain", builder => builder.WithOrigins(hostingContext.Configuration.GetSection("AllowedOrigins").Value.Split(",")) diff --git a/src/ui/jttools/.eslintignore b/src/ui/jttools/.eslintignore index e1fcc9c..f5d3a82 100644 --- a/src/ui/jttools/.eslintignore +++ b/src/ui/jttools/.eslintignore @@ -2,3 +2,4 @@ /config/ /dist/ /*.js +/*.vue diff --git a/src/ui/jttools/.eslintrc.js b/src/ui/jttools/.eslintrc.js index 22fdce8..7c86fec 100644 --- a/src/ui/jttools/.eslintrc.js +++ b/src/ui/jttools/.eslintrc.js @@ -22,6 +22,8 @@ module.exports = { // add your custom rules here rules: { // allow async-await + 'eslint-disable':'off', + 'eslint-disable-next-line':'off', 'generator-star-spacing': 'off', // allow debugger during development 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' diff --git a/src/ui/jttools/src/App.vue b/src/ui/jttools/src/App.vue index 2bf8de2..2c88856 100644 --- a/src/ui/jttools/src/App.vue +++ b/src/ui/jttools/src/App.vue @@ -20,7 +20,6 @@ - @@ -109,92 +108,93 @@ + >Copyright © 2015-2019 SmallChi. All Rights Reserved. 粤ICP备19128140号