Commit 94ec58eb by shijiuyan

1

parent fd00aed0
...@@ -85,9 +85,19 @@ Page({ ...@@ -85,9 +85,19 @@ Page({
this.userInfoReadyCallback(res) this.userInfoReadyCallback(res)
} }
wx.request({ wx.request({
url: app.url + 'ajax_get_unionid.php',
data: {
openid: config.openId,
iv: res.iv,
encryptedData: res.encryptedData
},
success(resp) {
if (resp.data.status == 'OK') {
wx.request({
url: 'https://www.koala-online.cn/compass/if/ajax_leader_user_register.php', url: 'https://www.koala-online.cn/compass/if/ajax_leader_user_register.php',
data: { data: {
unionId: config.unionId, unionId: resp.data.result.unionId,
openId: config.openId, openId: config.openId,
headerImg: app.globalData.userInfo.avatarUrl, headerImg: app.globalData.userInfo.avatarUrl,
qrId: this.data.qrId, qrId: this.data.qrId,
...@@ -105,6 +115,9 @@ Page({ ...@@ -105,6 +115,9 @@ Page({
complete: function (res) { }, complete: function (res) { },
}) })
} }
}
});
}
}) })
......
...@@ -198,9 +198,19 @@ Page({ ...@@ -198,9 +198,19 @@ Page({
return return
} }
wx.request({ wx.request({
url: app.url + 'ajax_get_unionid.php',
data: {
openid: config.openId,
iv: res.iv,
encryptedData: res.encryptedData
},
success(resp) {
if (resp.data.status == 'OK') {
wx.request({
url: app.url + 'ajax_social_user_register1.php', url: app.url + 'ajax_social_user_register1.php',
data: { data: {
unionId: config.unionId, unionId: resp.data.result.unionId,
openId: config.openId, openId: config.openId,
name: that.data.name, name: that.data.name,
mobile: that.data.mobile, mobile: that.data.mobile,
...@@ -230,6 +240,9 @@ Page({ ...@@ -230,6 +240,9 @@ Page({
}, },
complete: function (res) { }, complete: function (res) { },
}) })
}
}
});
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment