diff --git a/packageE/pages/qy/contactMe/contactMe.js b/packageE/pages/qy/contactMe/contactMe.js index 9c12f7c..63d8f63 100644 --- a/packageE/pages/qy/contactMe/contactMe.js +++ b/packageE/pages/qy/contactMe/contactMe.js @@ -171,7 +171,7 @@ Page({ // }) let openuserid = this.data.openuserid let skip_verify = this.data.skip_verify ? true : false - let res = await getApp().request.promisePost(`/apib/weshop/admin/qyWeChat/qyWeChatCorpInfo/postAdminQyApi?accdb=${this.data.store.erpid}&url=externalcontact/add_contact_way`, { + let res = await getApp().request.promisePost(`/apib/weshop/admin/qyWeChat/qyWeChatCorpInfo/postAdminQyApi?accdb=${this.data.store.erpid}&url=externalcontact/add_contact_way&qyid=4`, { data: { // accdb: getApp().globalData.config.erpid, // ApiName: 'api.pos.shop.advancesum.seek', @@ -232,66 +232,77 @@ Page({ return app.my_warnning("登录需要授权手机号码!", 0, this); return false; } + let that =this; + let req_data = { + js_code:e.code, + store_id:getApp().globalData.setting.stoid, + } + getApp().request.promiseGet('/api/weshop/users/getCodeMobile',{data:req_data}).then(res=>{ - var that =this; - app.request.get("/api/weshop/manager/managerConfig/get", { - data: { - storeId: getApp().globalData.setting.stoid - }, - success: function (res2) { - if (res2.data.code == 0) { - var sessionKey = getApp().globalData.sessionKey; - if (res2.data.data.is_newphone == 1) { - - var req_data = { - sessionKey: sessionKey, - code: e.code, - isNewPhone: 1, - store_id: getApp().globalData.setting.stoid, - } - }else{ - var req_data = { - sessionKey: sessionKey, - encryptedData: e.encryptedData, - iv: e.iv, - store_id: getApp().globalData.setting.stoid, - } - } - - - //-- 获取一下手机 --/api/weshop/users/getCodeMobile?store_id=1&js_code=b8451556dd98b2eebec5aa6775625bce192a68fc1a4b15b0c6bf3ed046f90da4 - getApp().request.promiseGet("/api/weshop/users/getmobile", { data: req_data }).then(res => { - // console.log('手机号码'); - // console.log(res); - if (res.data.code == 0) { - let resdata = res.data.data; - that.setData({ - phone: resdata - }) - that.befgetqy() - // getApp().globalData.zc_dd = dd; - // wx.redirectTo({ - // url: "/packageA/pages/profile/profile?is_back=1" - // }) - } + if (res.data.code==0) { + this.setData({ + phone:res.data.data }) - // var sessionKey = getApp().globalData.sessionKey; - // var openid = getApp().globalData.openid; - // var r = getApp().globalData.getu; - // this.save_the_data(r, e, sessionKey, openid) - - - } else { + this.befgetqy() + }else { return app.my_warnning("授权登入失败,请稍后再试!", 0, that); } }, - failStatus: function (t) { - return app.my_warnning("授权登入失败,请稍后再试!", 0, that); - }, - fail: function (t) { - return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; - } - }); + ); + + // app.request.get("/api/weshop/manager/managerConfig/get", { + // data: { + // storeId: getApp().globalData.setting.stoid + // }, + // success: function (res2) { + // if (res2.data.code == 0) { + // var sessionKey = getApp().globalData.sessionKey; + // if (res2.data.data.is_newphone == 1) { + + // var req_data = { + // sessionKey: sessionKey, + // code: e.code, + // isNewPhone: 1, + // store_id: getApp().globalData.setting.stoid, + // } + // }else{ + // var req_data = { + // sessionKey: sessionKey, + // encryptedData: e.encryptedData, + // iv: e.iv, + // store_id: getApp().globalData.setting.stoid, + // } + // } + + // debugger + // //-- 获取一下手机 --/api/weshop/users/getCodeMobile?store_id=1&js_code=b8451556dd98b2eebec5aa6775625bce192a68fc1a4b15b0c6bf3ed046f90da4 + // getApp().request.promiseGet("/api/weshop/users/getmobile", { data: req_data }).then(res => { + // debugger + // if (res.data.code == 0) { + // let resdata = res.data.data; + // that.setData({ + // phone: resdata + // }) + // that.befgetqy() + // } + // }) + // // var sessionKey = getApp().globalData.sessionKey; + // // var openid = getApp().globalData.openid; + // // var r = getApp().globalData.getu; + // // this.save_the_data(r, e, sessionKey, openid) + + + // } else { + // return app.my_warnning("授权登入失败,请稍后再试!", 0, that); + // } + // }, + // failStatus: function (t) { + // return app.my_warnning("授权登入失败,请稍后再试!", 0, that); + // }, + // fail: function (t) { + // return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; + // } + // }); }, async befgetqy() {