|
发表于 2017-2-9 17:17:38
|
显示全部楼层
- var weixinCode = this.getContext().getRequestParameter("code");
- if (weixinCode != "") {
- Baas.sendRequest({
- "url" : "/weixin/weixin",
- "action" : "userinfo",
- "async" : false,
- "params" : {
- code : weixinCode
- },
- "success" : function(weixinUser) {
- $(self.getElementByXid("headimg")).attr('src', weixinUser.headimgurl);
- $(self.getElementByXid("weixin")).text(weixinUser.nickname);
- $(self.getElementByXid("sex")).text(weixinUser.sex);
- $(self.getElementByXid("address")).text(weixinUser.country + "-" + weixinUser.province + "-" + weixinUser.city);
- }
- });
- }
复制代码 如果各配置文件配置成功是没有问题的 |
|