报错如下:
vue Uncaught (in promise) TypeError: Cannot read property ‘dealLogin’ of undefined
原因如下:
.then(function (response) { //这里不允许this
this.dealLogin(response);
}
改为如下解决问题:
.then((response) => { //yes,完美,解决啦!看一下有什么不同
this.dealLogin(response);
}