post请求用formData和json都会报接口成功

 parameter: {
    
    
    id:"",
    isChecked: "",
    verifyRemark: ""
  }
interactions._submitWarningReason = function() {
    
    
  let that = this;
  axios
  .post(api + "/api/violation/check", 
   that.warningError.parameter
  )
  .then((res) => {
    
    
    if (res.data.success) {
    
    
      that.$message({
    
    
        message: "提交成功",
        center: true,
        // iconClass: "el-icon-circle-check",
        customClass: "message-paidan",
      });
      that._closeWarningErrorModal()
    } else {
    
    
      that.$message({
    
    
        message: "提交失败",
        center: true,
        customClass: "message-guiji",
      });
    }
  })
  .catch((err) => {
    
    
    console.log(err);
  })
}

接口啥的都提示成功,但是就是数据库中的数据不去更改。
项目经理把postman发过来之后,才发现问题出在哪里。
在这里插入图片描述

postman:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_43131046/article/details/121395891