Browse Source

no message

feature/v1.1.0
xpz2018 7 years ago
parent
commit
ec8ebcb722
1 changed files with 3 additions and 3 deletions
  1. 6
      app.js

6
app.js

@ -18,11 +18,11 @@ App({
wx.getUserInfo({ wx.getUserInfo({
success: res => { success: res => {
// 可以将 res 发送给后台解码出 unionId // 可以将 res 发送给后台解码出 unionId
app.globalData.userInfo = res.userInfo
getAppn>pan class="p">().globalData.userInfo = res.userInfo
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况 // 所以此处加入 callback 以防止这种情况
if (app.userInfoReadyCallback) {
app.userInfoReadyCallback(res)
if (getAppn>pan class="p">().userInfoReadyCallback) {
getAppn>pan class="p">().userInfoReadyCallback(res)
} }
} }
}) })

Loading…
Cancel
Save