|
var weixinCode = this.getContext().getRequestParameter("code");
alert(weixinCode);
// 判断微信环境
if (justep.Browser.isWeChat) {
this.wxApi = new navigator.WxApi("wx3fb4a0dd8ea0730c");
}
Baas.sendRequest({
"url" : "/weixin/weixin",
"action" : "userinfo",
"async" : false,
"params" : {
code : weixinCode
},
"success" : function(weixinUser) {
var userID = weixinUser.openid;
alert(userID);
// 微信名称**********
var userDefaultName = weixinUser.nickname + "(来自微信的用户)";
var userDefaultAddress = weixinUser.country + weixinUser.province + weixinUser.city;
var userPhotoURL = weixinUser.headimgurl;
}
});
weixinCode = this.getContext().getRequestParameter("code"); 这个 一直获取不到数值 ,能够解释一下吗? weixinCode 具体是怎么用 的 ???谢谢
|
|