发布时间:2018-03-27 09:17:53 作者:佚名 阅读:(235)
// 获取用户信息 wx.getSetting({ success: res => { if (res.authSetting['scope.userInfo']) { // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 wx.getUserInfo({ success: res => { // 可以将 res 发送给后台解码出 unionId this.globalData.userInfo = res.userInfo // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 // 所以此处加入 callback 以防止这种情况 if (this.userInfoReadyCallback) { this.userInfoReadyCallback(res) } } }) } } })
欢迎分享转载→ 微信小程序获取用户微信头像、昵称
Android studio:Gradle project sync failed解决方法
发布时间:2020-09-28Unable to access Android Sdk add-on list
发布时间:2020-09-27修改Android Studio下的AVD的路径
发布时间:2020-09-27Emulator: emulator: INFO: QtLogger.cpp:68: Critical: Uncaught ReferenceError: $ is not defined
发布时间:2020-09-24Emulator: audio: Failed to create voice `adc'
发布时间:2020-09-24Emulator: dsound: Could not initialize DirectSoundCapture
发布时间:2020-09-24Emulator: emulator: ERROR: AdbHostServer.cpp:83: adb protocol fault (couldn't read status length)
发布时间:2020-09-24Emulator: deleteSnapshot: for default_boot
发布时间:2020-09-24INSTALL_FAILED_OLDER_SDK
发布时间:2020-09-23net::ERR_CLEARTEXT_NOT_PERMITTED
发布时间:2020-09-23© 2015-2021 - 吾爱编程网 版权所有 苏ICP备18033726号-1关于我们 - 网站声明 - 联系我们