前端请求报错:'JSON parse error: syntax error, expect {, actual e…1, line 1, column 2selectUid%5B%5D=VluJeA9upFXgJD', code: '500'}

1、如果不用
JSON.stringify(inputJson) 包起来就会报错
let inputJson = {"selectUid" : selectUid};
    var response = await $.ajax({
        type: 'POST',
        url: 'xxx',
        data: inputJson,  //正确的是JSON.stringify(inputJson)
        contentType: "application/json;charset=UTF-8",
        dataType: "json",
    })

  

posted @ 2023-07-24 19:00  信铁寒胜  阅读(257)  评论(0)    收藏  举报