Reference link: https://blog.csdn.net/mr_wuch/article/details/7833914 6
app.userInfoReadyCallback = res => {
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
ES6 arrow functions explained: https://segmentfault.com/a/1190000009410939