methods: {
research: function () {
//post请求远程资源
this.$http.post(
//请求的url
"http://www.hefeixyh.com/login.html",
//请求参数,不能以get请求方式写:{params: {userName: "root123", passWord: "root123"}}
{userName: "root123", passWord: "root123"},
//解决跨域问题,不加无法跨域
{emulateJSON: true}
).then(result=>{
console.dir(result)
}).catch(error=>{
console.dir(error)
});
}
}