Commit 13c7b4c8d1139acd5ab8eb51ccde1dcbd939edf6
1 parent
2b6759eb
1
Showing
1 changed file
with
7 additions
and
48 deletions
packageE/pages/qy/contactMe/contactMe.js
... | ... | @@ -78,7 +78,7 @@ Page({ |
78 | 78 | }, |
79 | 79 | }, |
80 | 80 | onLoad: function (tt) { |
81 | - // tt.scene="0_0_22" | |
81 | + // tt.scene="0_0_16" | |
82 | 82 | if (tt && tt.scene) { |
83 | 83 | var first_leader_str = decodeURIComponent(tt.scene); |
84 | 84 | var f_arr = first_leader_str.split("_"); |
... | ... | @@ -158,17 +158,14 @@ Page({ |
158 | 158 | openuserid, |
159 | 159 | skip_verify |
160 | 160 | }) |
161 | - // if (this.data.phone) { | |
162 | - // this.getqy() | |
163 | - // } | |
164 | 161 | } |
165 | 162 | }) |
166 | 163 | }, |
167 | 164 | async getqy(){ |
168 | - // wx.showLoading({ | |
169 | - // title: '加载中', | |
170 | - // mask:true | |
171 | - // }) | |
165 | + wx.showLoading({ | |
166 | + title: '加载中', | |
167 | + mask:true | |
168 | + }) | |
172 | 169 | let openuserid=this.data.openuserid |
173 | 170 | let skip_verify=this.data.skip_verify ? true : false |
174 | 171 | let res = await getApp().request.promisePost(`/apib/weshop/admin/qyWeChat/qyWeChatCorpInfo/postAdminQyApi?accdb=${this.data.store.erpid}&url=externalcontact/add_contact_way`, { |
... | ... | @@ -198,7 +195,6 @@ Page({ |
198 | 195 | this.setData({ |
199 | 196 | qr_code:res.data.qr_code |
200 | 197 | }) |
201 | - this.saveqy(res.data.config_id,res.data.qr_code) | |
202 | 198 | }else{ |
203 | 199 | let errcode=res.data.errcode |
204 | 200 | let msg=errcode |
... | ... | @@ -247,56 +243,19 @@ Page({ |
247 | 243 | this.setData({ |
248 | 244 | phone:resdata.phoneNumber |
249 | 245 | }) |
250 | - this.befgetqy() | |
246 | + this.getqy() | |
251 | 247 | // getApp().globalData.zc_dd = dd; |
252 | 248 | // wx.redirectTo({ |
253 | 249 | // url: "/packageA/pages/profile/profile?is_back=1" |
254 | 250 | // }) |
255 | 251 | } |
256 | 252 | }) |
253 | + | |
257 | 254 | // var sessionKey = getApp().globalData.sessionKey; |
258 | 255 | // var openid = getApp().globalData.openid; |
259 | 256 | // var r = getApp().globalData.getu; |
260 | 257 | // this.save_the_data(r, e, sessionKey, openid) |
261 | 258 | }, |
262 | - async befgetqy(){ | |
263 | - wx.showLoading({ | |
264 | - title: '加载中', | |
265 | - mask:true | |
266 | - }) | |
267 | - let openuserid=this.data.openuserid | |
268 | - let res = await getApp().request.promiseGet(`/api/weshop/qyWeChat/qywxConfigList/getMobileInfo/${getApp().globalData.setting.stoid}/${openuserid}/${this.data.phone}`, { data: {} }) | |
269 | - console.log('获取数据库表'); | |
270 | - console.log(res); | |
271 | - if (res.data && res.data.code==0) { | |
272 | - this.setData({ | |
273 | - qr_code:res.data.data.qrcode | |
274 | - }) | |
275 | - wx.hideLoading() | |
276 | - }else{ | |
277 | - this.getqy() | |
278 | - } | |
279 | - | |
280 | - }, | |
281 | - async saveqy(config_id,qrcode){ | |
282 | - let openuserid=this.data.openuserid | |
283 | - let mobile=this.data.phone | |
284 | - let addtime=((Date.now())/1000).toFixed(0) | |
285 | - let req_data = { | |
286 | - store_id: getApp().globalData.setting.stoid, | |
287 | - openuserid, | |
288 | - config_id, | |
289 | - qrcode, | |
290 | - mobile, | |
291 | - addtime | |
292 | - } | |
293 | - let res = await getApp().request.promisePost(`/api/weshop/qyWeChat/qywxConfigList/save`, { | |
294 | - data: req_data, | |
295 | - // is_json: 1 | |
296 | - }) | |
297 | - // wx.hideLoading() | |
298 | - }, | |
299 | - | |
300 | 259 | |
301 | 260 | |
302 | 261 | //-- 会员授权 -- | ... | ... |
-
mentioned in commit b45d9a0be1a85fa935ed75f4c43ded82731724f2