scaffolding built with vue-cli,
now there is api, but he has a parameter
{"CatId": 238, "Similar": false, "Trend": false, "IsNew": false, "Sales": true, "SuppNo": "LKN", "SuppCatId": 0}
http://116.62.33.192:66/product/getproductdetaillist
write as axion on the Internet. I don"t know where to write the parameters.
"/api": {
target:"http://116.62.33.192:66/product/getproductdetaillist",
changeOrigin:true,
pathRewrite:{
"^/api": "/api"
}
}
let postData = {"CatId": 238, "Similar": false, "Trend": false, "IsNew": false, "Sales": true, "SuppNo": "LKN", "SuppCatId": 0}
export default {
methods: {
jsonpData: function () {
this.$axios.post("/api", postData)
.then(res => {
console.log(res)
})
.catch(err => {
console.log(err)
})
}
}
}
write this way, he says 404, if you don"t, he says 405.