GetUserInfo: function (cb) {
Var that=this
If (this. GlobalData. The userInfo) {
Typeof cb=="function" & amp; & Cb (enclosing globalData. The userInfo)
} else {
//call the login interface
Wx. Login ({
Success: the function (res) {
Var code=res. Code;
//get wx user simple info
Wx. GetUserInfo ({
Success: the function (res) {
That. GlobalData. The userInfo=res. The userInfo
Typeof cb=="function" & amp; & Cb (that globalData. The userInfo);
//get the user sessionKey
//get sessionKey
That. GetUserSessionKey (code);
}
});
}
});
}
},