From 347b4614262cc14b654e9183c922bd4f515af469 Mon Sep 17 00:00:00 2001 From: chenxuhui Date: Wed, 5 Dec 2018 20:31:47 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=8F=8A=E7=99=BB=E5=BD=95=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 35 +- imgs/bindImage.png | Bin 0 -> 15409 bytes .../debitNoteDetail/debitNoteDetail.js | 4 +- pages/debitNoteList/debitNoteList.js | 4 +- pages/homePage/homePage.js | 36 +- pages/login/login.js | 329 ++++++++---------- pages/login/login.json | 6 +- pages/login/login.wxml | 30 +- pages/login/login.wxss | 113 +++--- pages/orderDetails/orderDetails.js | 2 +- pages/orderInquiry/orderInquiry.js | 6 +- .../outStoreDetail/outStoreDetail.js | 2 +- pages/saleOutStore/saleOutStore.js | 4 +- pages/sendCargo/sendCargo.js | 2 +- pages/sendCargo/sendCargo.wxml | 1 + pages/sendCargo/sendCargo.wxss | 4 +- pages/sendTheDetails/sendTheDetails.js | 8 +- .../statementOfAccount/statementOfAccount.js | 2 +- utils/net.js | 132 ++++--- 19 files changed, 394 insertions(+), 326 deletions(-) create mode 100644 imgs/bindImage.png diff --git a/app.js b/app.js index 1999865..6e2352a 100644 --- a/app.js +++ b/app.js @@ -1,20 +1,31 @@ App({ onLaunch: function () { + var that = this; + wx.getSystemInfo({ + success: function (res) { + that.globalData.winHeight = res.windowHeight; + } + }); }, globalData: { + winHeight:0, + cookie: "", + decryptCookie: '', + userInfo: null, + baseUrl: "https://miniprogram.food988.com/Rest.aspx", + tranferBaseUrl: 'https://miniprogram.food988.com/RequestTransfer.aspx', + globalCustomerID: 0, + phoneNum: "", + openID: "", + appID: "wx0b897783b2588147", - Phone: "", - OpenId: "", - AppName: "WeChat", - AppId: "wx0b897783b2588147", - // 自己的服务器 - BaseUrl: "https://miniprogram.food988.com/Rest.aspx", - // 转发到客户服务器 - TranferBaseUrl:"https://miniprogram.food988.com/RequestTransfer.aspx", - CustomerId:"", - // 原测试路径 - // BaseUrl: "https://weixintest.food988.com/Rest.aspx" - + // Phone: "", + // OpenId: "", + // AppName: "WeChat", + // AppId: "wx0b897783b2588147", + // BaseUrl: "https://miniprogram.food988.com/Rest.aspx", + // TranferBaseUrl:"https://miniprogram.food988.com/RequestTransfer.aspx", + // CustomerId:"", }, }) \ No newline at end of file diff --git a/imgs/bindImage.png b/imgs/bindImage.png new file mode 100644 index 0000000000000000000000000000000000000000..ae5447aefd8900ebe667ce8b59f8c38037c7bdca GIT binary patch literal 15409 zcmcJ0XF!w9(rA!ZY#<6!6a_0Py$A?GP!Y?kfG?0x0)*Z}LazZ-1f{A-5fB6gBtSw9 zJrpU@Q49eBgpLp(^cIrbC!TY@dw<+>|J~;Yot>SXnVp^I^;6vkJV(zQ1%W_3 zj~?FB2Z8>o0D(9T9OeRAxZ9MFz`xU8+Qwc6NP90|D-S!+9b2Te-T6ldD+fD$J1bj% z_jWsV5Qy`FlcBMfvCb1U8ze%;iVY*^CBY#8Tyo#!fyt16C!VRhO3Ucx) zvT`c2@`}=O@@jI*YKp4o|NUG9M)R<>SJS_D|KDQ)ZyFaJy}VFrva-IuzB0awGDr^x zS$S1eRarR&Sp@}Y07BZ+-_6U)Puk7%(tjx2v-7m^a6)-GA>GciDOy=0y}dLp0-XM9 z3JBEykahF?x0nEd$@*ELWaVY#*i-rsppMS}8x(=~A81c6eY^k7@Bfvsr=dT}PFCN} z6Y1??11y~VCH7D#H7yT2D=(ynArk5OA1OX{M0z1T9g(Q>T3Y9?89BMxB7Hrt{{h$0 zQG4X(>1E|+WB2Hu#zlaDjFXeC+CBN3H?CSy+)qC=Hl<%r4 z-n{!C+!BH<~Ej=g7-8W#&#FB_tlQcGHzQw{cr);tD)#Z zxx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v_E|9R{!Zfg_ z?<4`8E{}X|HZ?w#5a*{@!ohU~`1yUUW_RQeIQ4ssK=hy0KNYy59$9z8V)q^Lq4LUkd(P1} zt{Kep?8W&e0bQ)LIajX_ek+m~BUfZ&WR-_!4~LiB8mCIvoxhqf*xh~q?4oOyiqSQ; z{QIFdar4o4z!RxO(JR;2IoZGkq1G9-vv+qRN4~foPFG^t7@;>NqX#Df)I zS^_P%KQ`@V$J3sv+{Q;xK+oA9sSO6Q#(WV+W&&5ZY{&k5D3GvaIQE7XFY@I8JIyp0 zw-q$;gwTup(#MX929IqmE#gLE;15B6R3RR(t>mF4w 0) { - var lastArr = that.data.array.concat(res.result) + var lastArr = that.data.customerArray.concat(res.result) that.setData({ - array: lastArr, + customerArray: lastArr, }) } }) + + }, + + // 电话输入框 + getPhone: function (e) { + let val = e.detail.value; + this.data.phoneNum = val; }, - // 用户绑定按钮操作 - getUserInfo: function(e) { + // 获取授权 成功 绑定信息到客户服务器 回调函数绑定中转服务器 + getUserInfo: function (e) { var that = this; if (e.detail.userInfo != null) { - app.globalData.userInfo = e.detail.userInfo; - nickName = app.globalData.userInfo.nickName; - gender = app.globalData.userInfo.gender; - province = app.globalData.userInfo.province; - city = app.globalData.userInfo.city; - country = app.globalData.userInfo.country; - avatarUrl = app.globalData.userInfo.avatarUrl; - //判断用户是否获取绑定信息 - if (that.data.showCustomerChoise) { - if (that.data.array[that.data.index].ID == 0) { - wx.showToast({ - image: '/imgs/avatar.png', - title: '请选择所属客户', - }) - return false; - } + app.globalData.userInfo = e.detail.userInfo + if (that.data.customerArray[that.data.index].ID == 0) { + wx.showToast({ + title: '请选择所属客户', + }) + return false; } - if (app.globalData.Phone == "") { + if (this.data.phoneNum == "") { wx.showToast({ - image: '/imgs/avatar.png', - title: '手机号码不能为空', + title: '请输入手机号码', }) return false; - } else if (!(/^1[34578]\d{9}$/.test(app.globalData.Phone))) { + } else if (!(/^1[34578]\d{9}$/.test(this.data.phoneNum))) { wx.showToast({ - image: '/imgs/avatar.png', title: '号码不正确', }) return false; } + let userInfos = app.globalData.userInfo + let method = bindByPhone; + let params = [{ + "OpenId": app.globalData.openID, + "Phone": this.data.phoneNum, + "NickName": userInfos.nickName, + "Sex": userInfos.gender, + "Province": userInfos.province, + "City": userInfos.city, + "Country": userInfos.country, + "HeadImgUrl": userInfos.avatarUrl, + "UnionId": "" + }]; + network.transfer_request(method, params, function (res) { + if (res.result != null) { + app.globalData.phoneNum = that.data.phoneNum; + // 判断是否绑定成功 + Bind(that) + } + }) } else { wx.showModal({ title: '授权提示', @@ -146,104 +206,5 @@ Page({ showCancel: false }) } - var method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/Bind'; - var params = [{ - OpenId: openid, - Phone: app.globalData.Phone, - NickName: app.globalData.userInfo.nickName, - Sex: app.globalData.userInfo.gender, - Province: app.globalData.userInfo.province, - City: app.globalData.userInfo.city, - Country: app.globalData.userInfo.country, - HeadImgUrl: app.globalData.userInfo.avatarUrl, - UnionId: "", - //请求新增参数 - AppId: app.globalData.AppId, - CustomerId: that.data.array[that.data.index].ID, - }]; - var storageCustomerID = that.data.array[that.data.index].ID; - app.globalData.CustomerId = storageCustomerID; - - // 先绑定客户服务器 - that.bindCustomerPreviousURL(function(res) { - // 再绑定中转服务器 - network.previousRequestLoading(method, params, function(res) { - // 再判断是否关联公众号 - IsBindWeixinMP(app.globalData.Phone); - - }); - }) - }, - - // 进入公众号绑定页面 - bindPublicNumber: function(event){ - wx.navigateTo({ - url: '/pages/first/first?code=' + code, - }) - }, - - // 绑定客户服务器 - bindCustomerPreviousURL: function(successaction) { - var method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/AccountRpc/XuBindByPhone'; - var previousParams = [{ - OpenId: openid, - Phone: app.globalData.Phone, - NickName: app.globalData.userInfo.nickName, - Sex: app.globalData.userInfo.gender, - Province: app.globalData.userInfo.province, - City: app.globalData.userInfo.city, - Country: app.globalData.userInfo.country, - HeadImgUrl: app.globalData.userInfo.avatarUrl, - UnionId: "", - }]; - network.requestLoading(method, previousParams, function(res) { - successaction(res.result); - }) - }, - - // 页面初始化 静默登录相关判断 - onShow: function() { - var that = this; - this.choiceCustomer(function (res){ - getOpenId(function (res) { - openid = res; - IsBind(openid, function (res) { - app.globalData.Phone = res; - if (res == "") { - - } else { - //跳转到指定页面 - IsBindWeixinMP(app.globalData.Phone) - } - }) - }) - }); - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function() { - var that = this - if (res.from === 'button') { - // 来自页面内转发按钮 - console.log(res.target) - } - return { - title: '分享页面的标题', - path: "/pages/login/login", - //分享成功后执行 - success: function(res) { - console.log("--------------转发成功--------------------") - }, - - fail: function(res) { - console.log("--------------转发失败--------------------") - } - } - } - - - }) \ No newline at end of file diff --git a/pages/login/login.json b/pages/login/login.json index 58857d8..7806624 100644 --- a/pages/login/login.json +++ b/pages/login/login.json @@ -1 +1,5 @@ -{"navigationBarTitleText": "禽客户易"} \ No newline at end of file +{ + "navigationBarBackgroundColor": "white", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "禽客户易" + } \ No newline at end of file diff --git a/pages/login/login.wxml b/pages/login/login.wxml index 9f096c4..0a17aa7 100644 --- a/pages/login/login.wxml +++ b/pages/login/login.wxml @@ -1,16 +1,26 @@ - - + + - - - {{array[index].Name}} - - + + 绑定客户 + + + {{customerArray[index].Name}} + + + + + + + 手机号码 + + + + + - - - + \ No newline at end of file diff --git a/pages/login/login.wxss b/pages/login/login.wxss index b5950ef..54cf4bd 100644 --- a/pages/login/login.wxss +++ b/pages/login/login.wxss @@ -1,60 +1,87 @@ -page { - background: #fff; +/* pages/login/login.wxss */ +.containerView{ + margin-left: 30rpx; + margin-right: 30rpx; + height: 240rpx; + margin-top: 40%; + display: flex; + flex-direction: column; + } -.img1 { - margin-left: 35%; - height: 150px; - width: 150px; - margin-top: 20%; +.customerChooseView{ + height: 120rpx; + width: 100%; + display: flex; + flex-direction: row; + font-size: 20px; + color: black; } -.pickerPlaceHolder { - text-align: center; - height: 40px; - background: #EAF1F8; - line-height: 40px; - color: #999; +.keyView{ + padding-top: 60rpx; + width: 40%; + height: 100%; } -.pickerSelected { - text-align: center; - height: 40px; - line-height: 40px; - background: #EAF1F8; +.valueView{ + padding-top: 60rpx; + width: 60%; + height: 100%; +} + +.pickerPlaceHolder{ + color:rgb(202, 202, 202); +} + +.pickerSelected{ color: black; } -.view2 { - border-top: 1px solid #fafafa; - border-right: 1px solid #fafafa; - border-left: 1px solid #fafafa; - border-bottom: 1px solid #fafafa; - width: 90%; - height: 40px; - margin-left: 5%; - margin-right: 5%; - border-radius: 0.2em; - margin-top: 5%; +.lineView { + height: 1rpx; + background-color: #dbdbdb; +} + +.imageView { + height: 80px; + width: 100%; + margin-top: 30px; + position: relative; + align-items: center; + justify-content: center; + box-sizing: content-box; } -.input { +/* .currentImage { + width: 100%; + height: 100%; +} */ + +.btnTextView { + position: absolute; + width: 100%; + top:0; + line-height: 65px; text-align: center; - height: 40px; - background: #EAF1F8; } -.denglu { - margin-left: 5%; - margin-top: 10%; - width: 90%; - margin-right: 5%; - background: #f98b29; - color: #fff; +.btnText { + color: white; + font-size: 34rpx; } -.wxmp { - position: fixed; - bottom: 0rpx; - width: 100%; +.btn_btn { + font-size: 40rpx; + color: white; + margin-top: 10%; + padding: 0, auto; + display: block; + border: none; + background: transparent; } +.currentImage { + width: 100%; + height: 80px; + +} \ No newline at end of file diff --git a/pages/orderDetails/orderDetails.js b/pages/orderDetails/orderDetails.js index 500fd81..c802a47 100644 --- a/pages/orderDetails/orderDetails.js +++ b/pages/orderDetails/orderDetails.js @@ -22,7 +22,7 @@ Page({ var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/GetOrderDetail'; var params = [ID]; - network.requestLoading(method, params, function (res) { + network.transfer_request(method, params, function (res) { that.setData({ list: res.result, }) diff --git a/pages/orderInquiry/orderInquiry.js b/pages/orderInquiry/orderInquiry.js index c2dd875..ff84a07 100644 --- a/pages/orderInquiry/orderInquiry.js +++ b/pages/orderInquiry/orderInquiry.js @@ -50,7 +50,7 @@ Page({ var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/GetOrder'; var params = [0, pageindex, pagesize]; - network.requestLoading(method, params, function(res) { + network.transfer_request(method, params, function(res) { for (var i = 0; i < res.result.length; i++) { let dmo = { LoadTime: timechage.formatTimeTwo(res.result[i].LoadTime.substring(6, 19), "Y/M/D h:m"), @@ -68,7 +68,7 @@ Page({ var reslut1=[]; var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/GetOrder'; var params = [20, pageindex, pagesize]; - network.requestLoading(method, params, function (res) { + network.transfer_request(method, params, function (res) { for (var i = 0; i < res.result.length; i++) { let dmo = { LoadTime: timechage.formatTimeTwo(res.result[i].LoadTime.substring(6, 19), "Y/M/D h:m"), @@ -127,7 +127,7 @@ Page({ var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/GetOrder'; var params = [0, pageindex, pagesize]; - network.requestLoading(method, params, function (res) { + network.transfer_request(method, params, function (res) { for (var i = 0; i < res.result.length; i++) { let dmo = { LoadTime: timechage.formatTimeTwo(res.result[i].LoadTime.substring(6, 19), "Y/M/D h:m"), diff --git a/pages/saleOutStore/outStoreDetail/outStoreDetail.js b/pages/saleOutStore/outStoreDetail/outStoreDetail.js index ca823c9..25e5a77 100644 --- a/pages/saleOutStore/outStoreDetail/outStoreDetail.js +++ b/pages/saleOutStore/outStoreDetail/outStoreDetail.js @@ -18,7 +18,7 @@ Page({ let totalMoney = 0; let method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/SaleOutStoreRpc/GetSaleOutStoreDetail'; let params = [detailItemID]; - network.requestLoading(method, params, function (res) { + network.transfer_request(method, params, function (res) { var array = res.result; for (var i = 0; i < array.length; i++) { if (array[i].Money) { diff --git a/pages/saleOutStore/saleOutStore.js b/pages/saleOutStore/saleOutStore.js index e774608..dd89a12 100644 --- a/pages/saleOutStore/saleOutStore.js +++ b/pages/saleOutStore/saleOutStore.js @@ -12,7 +12,7 @@ function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize) { let getArr = []; let method = outStoreMethod; let params = [0, UnCheckPageIndex, UnCheckPageSize]; - network.requestLoading(method, params, function(res) { + network.transfer_request(method, params, function(res) { var array = res.result; if (array.length <= 0) { wx.showToast({ @@ -48,7 +48,7 @@ function getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize) { let getArr = []; let method = outStoreMethod; let params = [20, CheckedPageIndex, CheckedPageSize]; - network.requestLoading(method, params, function(res) { + network.transfer_request(method, params, function(res) { var array = res.result; if (array.length <= 0) { wx.showToast({ diff --git a/pages/sendCargo/sendCargo.js b/pages/sendCargo/sendCargo.js index 363b42d..2328408 100644 --- a/pages/sendCargo/sendCargo.js +++ b/pages/sendCargo/sendCargo.js @@ -22,7 +22,7 @@ Page({ var reslut = []; var method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/OrderRpc/GetNoDriverOrder'; var params = []; - network.requestLoading(method, params, function (res) { + network.transfer_request(method, params, function (res) { for (var i = 0; i < res.result.length; i++) { let dmo = { LoadTime: timechage.formatTimeTwo(res.result[i].LoadTime.substring(6, 19), "Y/M/D h:m"), diff --git a/pages/sendCargo/sendCargo.wxml b/pages/sendCargo/sendCargo.wxml index 9c176da..ac12f51 100644 --- a/pages/sendCargo/sendCargo.wxml +++ b/pages/sendCargo/sendCargo.wxml @@ -18,6 +18,7 @@ Customer_Name}} ¥{{item.Money}} + NO.{{item. diff --git a/pages/sendCargo/sendCargo.wxss b/pages/sendCargo/sendCargo.wxss index 5d74076..b732418 100644 --- a/pages/sendCargo/sendCargo.wxss +++ b/pages/sendCargo/sendCargo.wxss @@ -44,11 +44,11 @@ page { } .goodsNum{ height: 100%; - width: 50%; + width: 30%; } .goodsMoney{ height: 100%; - width: 50%; + width: 70%; text-align: right; } diff --git a/pages/sendTheDetails/sendTheDetails.js b/pages/sendTheDetails/sendTheDetails.js index 5a6d389..c8abecd 100644 --- a/pages/sendTheDetails/sendTheDetails.js +++ b/pages/sendTheDetails/sendTheDetails.js @@ -28,7 +28,7 @@ Page({ "PageSize": 100 }]; - network.requestLoading(method2, params2, function(res) { + network.transfer_request(method2, params2, function(res) { that.setData({ name1: res.result, }) @@ -53,7 +53,7 @@ Page({ var method1 = '/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/OrderRpc/LoadForDriver'; var params1 = [ID]; - network.requestLoading(method1, params1, function(res) { + network.transfer_request(method1, params1, function(res) { that.setData({ ID1: res.result.ID, LoadTime1: timechage.formatTimeTwo(res.result.LoadTime.substring(6, 19), "Y/M/D"), @@ -74,7 +74,7 @@ Page({ "PageSize": 100 }]; - network.requestLoading(method2, params2, function(res) { + network.transfer_request(method2, params2, function(res) { //res就是我们请求接口返回的数据 that.setData({ name1: res.result, @@ -134,7 +134,7 @@ Page({ } else { var method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/OrderRpc/SetDriverToOrder'; var params = [ID, ID4]; - network.requestLoading(method, params, function(res) { + network.transfer_request(method, params, function(res) { if (ID4 != null) { wx.navigateBack({ delta: "/pages/theDriverSend/theDriverSend" diff --git a/pages/statementOfAccount/statementOfAccount.js b/pages/statementOfAccount/statementOfAccount.js index 5f8090e..ba81413 100644 --- a/pages/statementOfAccount/statementOfAccount.js +++ b/pages/statementOfAccount/statementOfAccount.js @@ -44,7 +44,7 @@ Page({ getBalanceList: function(params, clear) { let that = this; - network.requestLoading(method, params, function(res) { + network.transfer_request(method, params, function(res) { var array = JSON.parse(res.result); if (array.length <= 0) { wx.showToast({ diff --git a/utils/net.js b/utils/net.js index 4a03b3e..3a2aee4 100644 --- a/utils/net.js +++ b/utils/net.js @@ -1,98 +1,152 @@ //不显示对话框的请求 const app = getApp() -function request(url, params, success, fail) { - this.requestLoading(url, params, "", success, fail) -} +var reconnectMethod = ''; +var reconnectParams = []; +var newReconnectMethod = ''; +var newReconnectParams = []; + -// 请求自己的服务器 -function previousRequestLoading(method, params, successaction) { +function requestLoading(method, params, successaction) { + reconnectMethod = method; + reconnectParams = params; wx.showLoading({ title: "加载中", }) + var data = { 'id': 1, 'method': method, 'params': params }; - var baseUrl = app.globalData.BaseUrl; + wx.request({ - url: baseUrl, + url: app.globalData.baseUrl, data: data, header: { - 'content-type': 'application/json' + 'content-type': 'application/json', + 'cookie': app.globalData.cookie }, - method: 'post', - success: function(res) { - console.log(res) + method: 'POST', + success: function (res) { + // console.log(res) if (res.data.error != null) { - wx.showModal({ - showCancel: false, - title: '执行出错', - content: res.data.error.message, - }) + if (res.data.error.code == 401) { + wx.request({ + url: app.globalData.baseUrl, + data: { + 'id': 1, + 'method': "/MainSystem/MainSystem/Auth/WeixinLogin", + 'params': [app.globalData.appID, app.globalData.openID] + }, + header: { + 'content-type': 'application/json', + 'cookie': app.globalData.cookie + }, + method: 'POST', + success: function (res) { + app.globalData.cookie = res.data.result; + requestLoading(reconnectMethod, reconnectParams, successaction); + } + }) + } else { + wx.showModal({ + showCancel: false, + title: '执行出错', + content: res.data.error.message, + }) + } } else { successaction(res.data) } + }, - fail: function(res) { + fail: function (res) { + console.log(res) wx.showModal({ title: '执行出错', content: res, }) + }, - complete: function(res) { + complete: function (res) { wx.hideLoading() }, }) } -// 中转,请求客户服务器 -function requestLoading(method, params, successaction) { +function transfer_request(method, params, successaction) { + newReconnectMethod = method; + newReconnectParams = params; wx.showLoading({ title: "加载中", }) + var newData = { - "DecryptCookie": "", - "CustomerId": app.globalData.CustomerId, - "AppendUrlString": "?appid=" + app.globalData.AppId + "&phone=" + app.globalData.Phone, + "DecryptCookie": app.globalData.cookie, + "CustomerId": app.globalData.globalCustomerID, "Method": method, "Data": params, + "AppendUrlString": "?appid=" + app.globalData.appID + "&phone=" + app.globalData.phoneNum, }; - var baseUrl = app.globalData.TranferBaseUrl; + + var baseUrl = app.globalData.tranferBaseUrl; wx.request({ url: baseUrl, data: newData, header: { - 'content-type': 'application/json' + 'content-type': 'application/json', + 'cookie': app.globalData.cookie }, - method: 'post', - success: function(res) { - console.log(res) + method: 'POST', + success: function (res) { + // console.log(res) if (res.data.error != null) { - wx.showModal({ - showCancel: false, - title: '执行出错', - content: res.data.error.message, - }) + if (res.data.error.code == 401) { + wx.request({ + url: app.globalData.tranferBaseUrl, + data: { + "DecryptCookie": app.globalData.cookie, + "CustomerId": app.globalData.globalCustomerID, + "Method": "/MainSystem/MainSystem/Auth/WeixinLogin", + "Data": [app.globalData.appID, app.globalData.openID] + }, + header: { + 'content-type': 'application/json', + 'cookie': app.globalData.cookie + }, + method: 'POST', + success: function (res) { + app.globalData.cookie = res.data.result; + transfer_request(newReconnectMethod, newReconnectParams, successaction); + + } + }) + } else { + wx.showModal({ + showCancel: false, + title: '执行出错', + content: res.data.error.message, + }) + } } else { successaction(res.data) } }, - fail: function(res) { + fail: function (res) { + console.log(res) wx.showModal({ title: '执行出错', content: res, - }) + }); }, - complete: function(res) { + complete: function (res) { wx.hideLoading() }, }) } module.exports = { - request: request, requestLoading: requestLoading, - previousRequestLoading: previousRequestLoading -} \ No newline at end of file + transfer_request: transfer_request +}