JS中this的指向问题(Uncaught (in promise) TypeError: Cannot read property ‘$router‘ of undefined)
代码如下:login(){ // let that = this; //地址http://localhost:8000/user/login、参数this.user axios .post("http://localhost:8000/user/login",this.user) .then(function(response){ if(response.data=="登录成功"){ //返回主界面 .
原创
2021-02-16 15:27:27 ·
1940 阅读 ·
0 评论