proxy代理
'default':{
target: 'http://192.168.1.4:8080/renren-api/WINMET_APP_COMPANY_DEFAULT_HISTORY_AND_DEFAULT_STOCK_INFORMATION/?',
secure: true, // 如果是https接口,需要配置这个参数
ws: true,
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
pathRewrite: {
'^/default': '' // /default前替换为空
}
},
请求
isDefault() {
// console.log(this.serachdata.corp_id, "公司id")
var params = { corpId: this.serachdata.corp_id };
axios.post('/default',
JSON.stringify(params),
{ headers: { 'Content-Type': 'application/json;charset=UTF-8' } }
).then((res) => {
console.log(res.data.result, "是否违约~~~~")
})
}