标签:成功 use 密码 lse ons 用户名 back 添加 response
1、可以在请求中添加跳转
myLogin(){ console.log(this.account+"----"+this.accountPassword) if(this.account == ‘‘ || this.accountPassword == ‘‘) { console.log(this.account) this.show( ‘请填写用户名/密码‘) }else { this.$http.post(‘http://localhost:8081/getUserByNameAndPsw‘, { userName: this.account, password:this.accountPassword }).then((response) => { console.log(response.body) if(response.body.code === 200){ this.visibleFlag = true console.log("成功登陆") this.$router.push(‘/navigation‘) // 实现跳转 }else { console.log(response.body.msg); this.visibleFlag = true this.show(response.body.msg) } }) } } }
标签:成功 use 密码 lse ons 用户名 back 添加 response
原文地址:https://www.cnblogs.com/ywjfx/p/12591310.html