无法登出的bug: 让 登录在获取wx user info之后执行,得到最新的code

wechat_user_type
Ge Hao 8 years ago
parent 347e4b64f6
commit e63103fbf3
  1. 6
      pages/mine/mine.js

@ -30,6 +30,10 @@ Page({
onLoad: function() {
var that = this
app.getUserInfo(function(userInfo){
that.setData({userInfo: userInfo})
if (app.globalData.token) {
profile.getCustomerInfo({}, that.infoCallback)
} else {
@ -39,8 +43,6 @@ Page({
profile.getCustomerInfo({}, that.infoCallback)
}
}
app.getUserInfo(function(userInfo){
that.setData({userInfo: userInfo})
})
},

Loading…
Cancel
Save