想要请求获取下拉列表的内容,post不携带参数
getFactoryNameList().then(res => {
console.log(res)
this.temp.factoryName = res.data.data
})
export function getFactoryNameList() {
return request({
url: 'factory/getFactoryNameList',
method: 'post',
})
}
headers里没有content-type了
另外,post请求不带参数这样写对吗
axios是有默认的
Content-Type
的,当然,你也可以自定义..