data using http-proxy-middleware post in vue-cli is not passed to the server, and the server always returns empty data
in config/index.js
proxyTable: {
"/api": {
target: "http://192.168.1.86:9999/web",
changeOrigin: true,
pathRewrite: {
"^/api": ""
}
},
Global axios is configured
import axios from "axios";
Vue.prototype.$http = axios;
request interface
let url = "api/"
this.$http({
url: url,
method: "post",
data: {
mobile: parseInt(this.phonenum),
type: 1
},
}).then(res => {})
.catch(err=>{})
after the request background succeeds, but the background does not receive data