the field returned by a successful cross-domain vue proxy axios request has no value, but the same field returned by using the tool request is not empty
related codes
proxyTable: {
"/http": {
target: "http://dt-dev.arctron.cn",
changeOrigin: true,
pathRewrite: {
"^/http": ""
}
}
}
var host = process.env.NODE_ENV === "development" ? "/http/api" : ""
var instance = axios.create({
baseURL: host
})
Vue.prototype.$ajax = instance
this.$ajax.post("/statistic/getdata", {
register_id: 104408387592139285,
from:1536540793,
to:1536548044,
split:300
}).then((res) => {
console.log(res)
}).catch((error) => {
console.log(error)
})