$.ajax({
            type: "post",
            dataType: "json",
            url: "自己的接口路径",
            contentType: "application/json;charset=UTF-8",//指定消息请求类型
            data: JSON.stringify(json),//将js对象转成json对象
            success: function (data) {
                if (data.error == 0) {
                    alert("交卷成功");
                } else {
                    alert(data.error + " " + data.msg);
                }
            }
        });

缺少:contentType: "application/json;charset=UTF-8"

相关文章:

  • 2021-09-21
  • 2021-11-19
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
相关资源
相似解决方案