vue在使用axios发送post请求时没有携带请求方法,怎么解决?

这是发送请求的代码

function changeblog() {
      console.log(content);
      axios
        .post("http://xxx.xxx.xx.x:xxxx/editor/content/add", {
           content: content.value, date: date() ,
        })
        .then((res) => {
          console.log(res.data);
          // state.lists = res.data;
        })
        .catch((err) => {
          console.log(err);
        });
    }

在发送请求后会先发送option请求,这个请求正常,但是后面的post请求没有请求方法,一直挂起

img

img


前端刷新之后后端报400的错误

img

你先拿postman试试呗,先排除后端问题

从node日志看是POST方法没错,可以输出node接到的详细请求看看

跨域了吧