7 回复
登录
// js
getUserInfo: function (e) {
var userInfo = e.detail.userInfo
app.globalData.userInfo = userInfo
this.setData({
userInfo: userInfo,
hasUserInfo: true
})
console.log(e)
console.log(userInfo)
if (userInfo.gender == 0) {
console.log('未知')
} else if (userInfo.gender == 1) {
console.log('男')
} else {
console.log('女')
}
}
// 不能用open-data