@@ -37,15 +37,13 @@ public JsonController(SelectTable _selectTable, DbContext _db,IIdentityService i
3737 /// <returns></returns>
3838 [ HttpPost ( "/get" ) ]
3939
40- public ActionResult Query ( [ FromBody ] string json )
40+ public ActionResult Query ( [ FromBody ] JObject jobject )
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 ] string json )
179+ public ActionResult Add ( [ FromBody ] JObject jobject )
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- JObject jobject = JObject . Parse ( json ) ;
190- var sb = new System . 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 ] string json )
223+ public ActionResult Edit ( [ FromBody ] JObject jobject )
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 ] string json )
274+ public ActionResult Remove ( [ FromBody ] JObject jobject )
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 ( ) ;
0 commit comments