|
|
@ -12,6 +12,8 @@ var bindPath = "/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/Bind"; |
|
|
var getBindCustomer = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetBindCustomer'; |
|
|
var getBindCustomer = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetBindCustomer'; |
|
|
var getCookie = '/MainSystem/MainSystem/Auth/WeixinLogin'; |
|
|
var getCookie = '/MainSystem/MainSystem/Auth/WeixinLogin'; |
|
|
var getCustomerList = '/MainSystem/B3WeChatMiniProgram/Rpcs/CustomerRpc/GetList'; |
|
|
var getCustomerList = '/MainSystem/B3WeChatMiniProgram/Rpcs/CustomerRpc/GetList'; |
|
|
|
|
|
var getCurrentID ="/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/AccountRpc/GetCurrentCustomerID" |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取绑定客户ID及用户电话 参数1、appID 2、openID |
|
|
* 获取绑定客户ID及用户电话 参数1、appID 2、openID |
|
|
* 返回值globalCustomerID,WeixinUser_Phone |
|
|
* 返回值globalCustomerID,WeixinUser_Phone |
|
|
@ -54,6 +56,8 @@ function IsBindWeixinMP(phone) { |
|
|
let params = [phone]; |
|
|
let params = [phone]; |
|
|
network.requestLoading(method, params, function (res) { |
|
|
network.requestLoading(method, params, function (res) { |
|
|
// res.result = false;
|
|
|
// res.result = false;
|
|
|
|
|
|
setCurrentCustomerID(); |
|
|
|
|
|
|
|
|
if (res.result == true) { |
|
|
if (res.result == true) { |
|
|
wx.switchTab({ |
|
|
wx.switchTab({ |
|
|
url: '/pages/homePage/homePage', |
|
|
url: '/pages/homePage/homePage', |
|
|
@ -67,6 +71,18 @@ function IsBindWeixinMP(phone) { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 跳转前获取客户自己的ID 存储后在创建订单时 基本信息带出使用
|
|
|
|
|
|
function setCurrentCustomerID (){ |
|
|
|
|
|
let method = getCurrentID; |
|
|
|
|
|
let params = []; |
|
|
|
|
|
network.transfer_request(method, params, function (res) { |
|
|
|
|
|
// res.result = false;
|
|
|
|
|
|
app.globalData.userID = res.result; |
|
|
|
|
|
console.log(res.result); |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 获取cookie值 参数1、appID 2、openID
|
|
|
// 获取cookie值 参数1、appID 2、openID
|
|
|
function WeixinLogin(successtion) { |
|
|
function WeixinLogin(successtion) { |
|
|
let method = getCookie; |
|
|
let method = getCookie; |
|
|
|