使用回调函数拿不到this如何处理?
在下列代码中调用login仍然不能在console打印出正确的值。console.log(that.hasSignup)返回undefined Page({
data: {
hasLogin: false,
hasCheck: false,
hasRegister: false,
hasSignup: false,
openid: ""
},
async login() {
let that = this
console.log(that.hasSignup)
console.log(that.hasSignup == false)
},
})