Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 02ea361

Browse files
Merge pull request liaozb#7 from liaozb/master
Sync
2 parents ce61e3b + eeae0f4 commit 02ea361

File tree

4 files changed

+11
-23
lines changed

4 files changed

+11
-23
lines changed

‎APIJSON.NET/APIJSON.NET/APIJSON.NET.csproj

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@
1616

1717
<ItemGroup>
1818
<PackageReference Include="AspectCore.Extensions.Reflection" Version="1.2.0" />
19-
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.3" />
19+
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.4" />
2020
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.2.0" />
2121
<PackageReference Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
2222
<PackageReference Include="Microsoft.AspNetCore.Rewrite" Version="2.2.0" />
2323
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Https" Version="2.2.0" />
2424
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
2525
<PackageReference Include="MySql.Data" Version="8.0.15" />
26-
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.18.5" />
27-
<PackageReference Include="SqlKata" Version="1.1.7" />
28-
<PackageReference Include="SqlKata.Execution" Version="1.1.7" />
29-
<PackageReference Include="sqlSugarCore" Version="4.9.9.2" />
26+
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.18.6" />
27+
<PackageReference Include="sqlSugarCore" Version="4.9.9.6" />
3028
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
3129
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="4.0.1" />
3230
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="4.0.1" />

‎APIJSON.NET/APIJSON.NET/Controllers/JsonController.cs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@ public JsonController(SelectTable _selectTable, DbContext _db,IIdentityService i
3737
/// <returns></returns>
3838
[HttpPost("/get")]
3939

40-
public ActionResult Query([FromBody]stringjson)
40+
public ActionResult Query([FromBody]JObjectjobject)
4141
{
42-
json = HttpUtility.UrlDecode(json);
4342
JObject ht = new JObject();
4443
ht.Add("code", "200");
4544
ht.Add("msg", "success");
4645
try
4746
{
48-
JObject jobject = JObject.Parse(json);
4947
int page = 0, count = 0, query = 0, total = 0;
5048
foreach (var item in jobject)
5149
{
@@ -178,16 +176,16 @@ public ActionResult Query([FromBody]string json)
178176
/// <param name="json"></param>
179177
/// <returns></returns>
180178
[HttpPost("/add")]
181-
public ActionResult Add([FromBody]stringjson)
179+
public ActionResult Add([FromBody]JObjectjobject)
182180
{
183-
json=HttpUtility.UrlDecode(json);
181+
184182
JObject ht = new JObject();
185183
ht.Add("code", "200");
186184
ht.Add("msg", "success");
187185
try
188186
{
189-
JObjectjobject=JObject.Parse(json);
190-
varsb=newSystem.Text.StringBuilder(100);
187+
188+
191189

192190
foreach (var item in jobject)
193191
{
@@ -222,16 +220,13 @@ public ActionResult Add([FromBody]string json)
222220
/// <param name="json"></param>
223221
/// <returns></returns>
224222
[HttpPost("/edit")]
225-
public ActionResult Edit([FromBody]stringjson)
223+
public ActionResult Edit([FromBody]JObjectjobject)
226224
{
227-
json = HttpUtility.UrlDecode(json);
228225
JObject ht = new JObject();
229226
ht.Add("code", "200");
230227
ht.Add("msg", "success");
231228
try
232229
{
233-
JObject jobject = JObject.Parse(json);
234-
235230
foreach (var item in jobject)
236231
{
237232
string key = item.Key.Trim();
@@ -276,16 +271,14 @@ public ActionResult Edit([FromBody]string json)
276271
/// <param name="json"></param>
277272
/// <returns></returns>
278273
[HttpPost("/remove")]
279-
public ActionResult Remove([FromBody]stringjson)
274+
public ActionResult Remove([FromBody]JObjectjobject)
280275
{
281-
json = HttpUtility.UrlDecode(json);
282276
JObject ht = new JObject();
283277
ht.Add("code", "200");
284278
ht.Add("msg", "success");
285279
try
286280
{
287281
var role = _identitySvc.GetRole();
288-
JObject jobject = JObject.Parse(json);
289282
foreach (var item in jobject)
290283
{
291284
string key = item.Key.Trim();

‎APIJSON.NET/APIJSON.NET/Startup.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
using Microsoft.Extensions.Configuration;
1313
using Microsoft.Extensions.DependencyInjection;
1414
using Microsoft.IdentityModel.Tokens;
15-
using SqlKata.Execution;
1615
using Swashbuckle.AspNetCore.Swagger;
17-
using MySql.Data.MySqlClient;
18-
using SqlKata.Compilers;
1916

2017
public class Startup
2118
{

‎APIJSON.NET/APIJSON.NET/wwwroot/js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
url: $('#rest-url').val(),
148148
type: "POST", dataType: "json",
149149
contentType: "application/json;charset=utf-8",
150-
data: JSON.stringify($('#vInput').val()),
150+
data: $('#vInput').val(),
151151
success: function (data) {
152152

153153
App.jsonhtml = data;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /