Commit 3f989d03 by shijiuyan

1

parent 6341be4a
...@@ -32,9 +32,7 @@ Page({ ...@@ -32,9 +32,7 @@ Page({
var location = wx.getStorageSync('location'); var location = wx.getStorageSync('location');
var latitude = location.latitude; var latitude = location.latitude;
var longitude = location.longitude; var longitude = location.longitude;
wx.showToast({
title: location,
})
wx.request({ wx.request({
url: app.url + 'ajax_get_user_role.php', url: app.url + 'ajax_get_user_role.php',
data: { data: {
......
...@@ -70,9 +70,19 @@ Page({ ...@@ -70,9 +70,19 @@ Page({
} }
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_user_register.php', url: app.url + 'ajax_user_register.php',
data: { data: {
unionId: config.unionId, unionId: resp.data.result.unionId,
openId: config.openId, openId: config.openId,
role: that.data.role, role: that.data.role,
name: app.globalData.userInfo.nickName, name: app.globalData.userInfo.nickName,
...@@ -106,6 +116,9 @@ Page({ ...@@ -106,6 +116,9 @@ Page({
complete: function (res) { }, complete: function (res) { },
}) })
} }
}
})
}
}) })
} }
}) })
\ No newline at end of file
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