Vue axios 提交问题

let $this = this;
//定义Vue this 对象:then里的的this 指并非Vue
this.$http.post('/login', formData, config).then(res => {
console.log(res)
if (res.data.status === true) {
$this.$router.push({
name:"home",
});
} else {
$this.open("请先注册账号");
}
})
posted @ 2018-04-26 17:09  我有一颗大白菜  阅读(217)  评论(0编辑  收藏  举报