你好,新学的python和vue ,遇到一个入门级的坑 ,望请解答下,谢谢
userlogin(this.loginForm.username,this.loginForm.password).then(
function(resp) {
const flag = resp.data.request['flag']
if (flag == 'yes') {
that.loading = true
var dcs=that.redirect.replace('/','')
return that.$router.push({ path: that.redirect.replace('/','') || '/', query: that.otherQuery }) --问题点在这
// console.log(resp.data.request['flag'])
} else {
alert('账号异常!')
that.loading = false
console.log('error submit!!')
}
}
)
这个是能获取成功的
但是就是不跳转页面