Commit 94ec58eb by shijiuyan

1

parent fd00aed0
......@@ -85,25 +85,38 @@ Page({
this.userInfoReadyCallback(res)
}
wx.request({
url: 'https://www.koala-online.cn/compass/if/ajax_leader_user_register.php',
url: app.url + 'ajax_get_unionid.php',
data: {
unionId: config.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',
});
openid: config.openId,
iv: res.iv,
encryptedData: res.encryptedData
},
fail: function (res) { },
complete: function (res) { },
})
success(resp) {
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({
return
}
wx.request({
url: app.url + 'ajax_social_user_register1.php',
url: app.url + 'ajax_get_unionid.php',
data: {
unionId: config.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, '失败')
openid: config.openId,
iv: res.iv,
encryptedData: res.encryptedData
},
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