@@ -37,15 +37,13 @@ public JsonController(SelectTable _selectTable, DbContext _db,IIdentityService i
37
37
/// <returns></returns>
38
38
[ HttpPost ( "/get" ) ]
39
39
40
- public ActionResult Query ( [ FromBody ] string json )
40
+ public ActionResult Query ( [ FromBody ] JObject jobject )
41
41
{
42
- json = HttpUtility . UrlDecode ( json ) ;
43
42
JObject ht = new JObject ( ) ;
44
43
ht . Add ( "code" , "200" ) ;
45
44
ht . Add ( "msg" , "success" ) ;
46
45
try
47
46
{
48
- JObject jobject = JObject . Parse ( json ) ;
49
47
int page = 0 , count = 0 , query = 0 , total = 0 ;
50
48
foreach ( var item in jobject )
51
49
{
@@ -178,16 +176,16 @@ public ActionResult Query([FromBody]string json)
178
176
/// <param name="json"></param>
179
177
/// <returns></returns>
180
178
[ HttpPost ( "/add" ) ]
181
- public ActionResult Add ( [ FromBody ] string json )
179
+ public ActionResult Add ( [ FromBody ] JObject jobject )
182
180
{
183
- json = HttpUtility . UrlDecode ( json ) ;
181
+
184
182
JObject ht = new JObject ( ) ;
185
183
ht . Add ( "code" , "200" ) ;
186
184
ht . Add ( "msg" , "success" ) ;
187
185
try
188
186
{
189
- JObject jobject = JObject . Parse ( json ) ;
190
- var sb = new System . Text . StringBuilder ( 100 ) ;
187
+
188
+
191
189
192
190
foreach ( var item in jobject )
193
191
{
@@ -222,16 +220,13 @@ public ActionResult Add([FromBody]string json)
222
220
/// <param name="json"></param>
223
221
/// <returns></returns>
224
222
[ HttpPost ( "/edit" ) ]
225
- public ActionResult Edit ( [ FromBody ] string json )
223
+ public ActionResult Edit ( [ FromBody ] JObject jobject )
226
224
{
227
- json = HttpUtility . UrlDecode ( json ) ;
228
225
JObject ht = new JObject ( ) ;
229
226
ht . Add ( "code" , "200" ) ;
230
227
ht . Add ( "msg" , "success" ) ;
231
228
try
232
229
{
233
- JObject jobject = JObject . Parse ( json ) ;
234
-
235
230
foreach ( var item in jobject )
236
231
{
237
232
string key = item . Key . Trim ( ) ;
@@ -276,16 +271,14 @@ public ActionResult Edit([FromBody]string json)
276
271
/// <param name="json"></param>
277
272
/// <returns></returns>
278
273
[ HttpPost ( "/remove" ) ]
279
- public ActionResult Remove ( [ FromBody ] string json )
274
+ public ActionResult Remove ( [ FromBody ] JObject jobject )
280
275
{
281
- json = HttpUtility . UrlDecode ( json ) ;
282
276
JObject ht = new JObject ( ) ;
283
277
ht . Add ( "code" , "200" ) ;
284
278
ht . Add ( "msg" , "success" ) ;
285
279
try
286
280
{
287
281
var role = _identitySvc . GetRole ( ) ;
288
- JObject jobject = JObject . Parse ( json ) ;
289
282
foreach ( var item in jobject )
290
283
{
291
284
string key = item . Key . Trim ( ) ;
0 commit comments