|
|
@ -9,22 +9,22 @@ var openID; |
|
|
* 返回值globalCustomerID,WeixinUser_Phone |
|
|
* 返回值globalCustomerID,WeixinUser_Phone |
|
|
* 成功调用获取cookie方法及判断是否绑定成功方法 |
|
|
* 成功调用获取cookie方法及判断是否绑定成功方法 |
|
|
*/ |
|
|
*/ |
|
|
function GetBindCustomer(that) { |
|
|
|
|
|
let method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetBindCustomer'; |
|
|
|
|
|
let params = [app.globalData.appID, app.globalData.openID]; |
|
|
|
|
|
network.requestLoading(method, params, function (res) { |
|
|
|
|
|
if (res.result != null) { |
|
|
|
|
|
app.globalData.globalCustomerID = res.result.ID; |
|
|
|
|
|
app.globalData.phoneNum = res.result.WeixinUser_Phone; |
|
|
|
|
|
// 获取cookie值
|
|
|
|
|
|
WeixinLogin(function (res) { |
|
|
|
|
|
wx.switchTab({ |
|
|
|
|
|
url: '/pages/homePage/homePage', |
|
|
|
|
|
}) |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// function GetBindCustomer(that) {
|
|
|
|
|
|
// let method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetBindCustomer';
|
|
|
|
|
|
// let params = [app.globalData.appID, app.globalData.openID];
|
|
|
|
|
|
// network.requestLoading(method, params, function (res) {
|
|
|
|
|
|
// if (res.result != null) {
|
|
|
|
|
|
// app.globalData.globalCustomerID = res.result.ID;
|
|
|
|
|
|
// app.globalData.phoneNum = res.result.WeixinUser_Phone;
|
|
|
|
|
|
// // 获取cookie值
|
|
|
|
|
|
// WeixinLogin(function (res) {
|
|
|
|
|
|
// wx.switchTab({
|
|
|
|
|
|
// url: '/pages/homePage/homePage',
|
|
|
|
|
|
// })
|
|
|
|
|
|
// });
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
// 获取cookie值 参数1、appID 2、openID
|
|
|
// 获取cookie值 参数1、appID 2、openID
|
|
|
function WeixinLogin(successtion) { |
|
|
function WeixinLogin(successtion) { |
|
|
@ -74,20 +74,20 @@ Page({ |
|
|
|
|
|
|
|
|
// 页面生命周期函数
|
|
|
// 页面生命周期函数
|
|
|
onShow: function() { |
|
|
onShow: function() { |
|
|
var that = this; |
|
|
|
|
|
wx.login({ |
|
|
|
|
|
success: function(res) { |
|
|
|
|
|
let code = res.code; |
|
|
|
|
|
let method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetMiniOpenIdByCode'; |
|
|
|
|
|
let params = [app.globalData.appID, code]; |
|
|
|
|
|
// 获取openID
|
|
|
|
|
|
network.requestLoading(method, params, function(res) { |
|
|
|
|
|
app.globalData.openID = res.result; |
|
|
|
|
|
// 获取绑定客户ID及用户电话
|
|
|
|
|
|
GetBindCustomer(that) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// var that = this;
|
|
|
|
|
|
// wx.login({
|
|
|
|
|
|
// success: function(res) {
|
|
|
|
|
|
// let code = res.code;
|
|
|
|
|
|
// let method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetMiniOpenIdByCode';
|
|
|
|
|
|
// let params = [app.globalData.appID, code];
|
|
|
|
|
|
// // 获取openID
|
|
|
|
|
|
// network.requestLoading(method, params, function(res) {
|
|
|
|
|
|
// app.globalData.openID = res.result;
|
|
|
|
|
|
// // 获取绑定客户ID及用户电话
|
|
|
|
|
|
// GetBindCustomer(that)
|
|
|
|
|
|
// })
|
|
|
|
|
|
// }
|
|
|
|
|
|
// });
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//获取企业编号
|
|
|
//获取企业编号
|
|
|
|