Commit 94ec58eb by shijiuyan

1

parent fd00aed0
...@@ -85,25 +85,38 @@ Page({ ...@@ -85,25 +85,38 @@ Page({
this.userInfoReadyCallback(res) this.userInfoReadyCallback(res)
} }
wx.request({ wx.request({
url: 'https://www.koala-online.cn/compass/if/ajax_leader_user_register.php', url: app.url + 'ajax_get_unionid.php',
data: { data: {
unionId: config.unionId, openid: config.openId,
openId: config.openId, iv: res.iv,
headerImg: app.globalData.userInfo.avatarUrl, encryptedData: res.encryptedData
qrId: this.data.qrId,
},
header: { 'content-type': 'application/json' },
method: 'GET',
dataType: 'json',
success: function (res) {
//跳转到年龄选择
wx.navigateTo({
url: '../ageChange/ageChange',
});
}, },
fail: function (res) { }, success(resp) {
complete: function (res) { }, if (resp.data.status == 'OK') {
}) wx.request({
url: 'https://www.koala-online.cn/compass/if/ajax_leader_user_register.php',
data: {
unionId: resp.data.result.unionId,
openId: config.openId,
headerImg: app.globalData.userInfo.avatarUrl,
qrId: this.data.qrId,
},
header: { 'content-type': 'application/json' },
method: 'GET',
dataType: 'json',
success: function (res) {
//跳转到年龄选择
wx.navigateTo({
url: '../ageChange/ageChange',
});
},
fail: function (res) { },
complete: function (res) { },
})
}
}
});
} }
}) })
......
...@@ -198,38 +198,51 @@ Page({ ...@@ -198,38 +198,51 @@ Page({
return return
} }
wx.request({ wx.request({
url: app.url + 'ajax_social_user_register1.php', url: app.url + 'ajax_get_unionid.php',
data: { data: {
unionId: config.unionId, openid: config.openId,
openId: config.openId, iv: res.iv,
name: that.data.name, encryptedData: res.encryptedData
mobile: that.data.mobile,
legalPerson: that.data.legalPerson,
organizationContact: that.data.organizationContact,
headerImg: app.globalData.userInfo.avatarUrl,
longitude: location.longitude,
latitude: location.latitude
},
header: { 'content-type': 'application/json' },
method: 'GET',
dataType: 'json',
success: function (res) {
wx.showToast({
title: res.data.result.message,
icon: 'success',
duration: 2000
});
//注册成功以后,弹出机构认证对话框
that.setData({
showRule: true,
uploadPic: 1
})
},
fail: function (res) {
console.log(res, '失败')
}, },
complete: function (res) { }, success(resp) {
}) if (resp.data.status == 'OK') {
wx.request({
url: app.url + 'ajax_social_user_register1.php',
data: {
unionId: resp.data.result.unionId,
openId: config.openId,
name: that.data.name,
mobile: that.data.mobile,
legalPerson: that.data.legalPerson,
organizationContact: that.data.organizationContact,
headerImg: app.globalData.userInfo.avatarUrl,
longitude: location.longitude,
latitude: location.latitude
},
header: { 'content-type': 'application/json' },
method: 'GET',
dataType: 'json',
success: function (res) {
wx.showToast({
title: res.data.result.message,
icon: 'success',
duration: 2000
});
//注册成功以后,弹出机构认证对话框
that.setData({
showRule: true,
uploadPic: 1
})
},
fail: function (res) {
console.log(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