代码如下
this.$axios({
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
method: "POST",
url: "http://crm.tonyliangli.cn/api/company/companyUsers",
data: {
token: "1511328705UZVQ"
}
})
.then(function(res) {
console.log(res);
})
.catch(function(err) {
console.log(err);
});
加上headers之后传递不过去参数
不加报错: Failed to load http://crm.tonyliangli.cn/api/company/companyUsers: Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.
这是什么原因啊 来大神解答下