Commit 045cc559ee9ebeb037cb40d31eb0ad502f6ee6dc
1 parent
25388e8d
测试优化
Showing
14 changed files
with
61 additions
and
20 deletions
packageA/pages/cart2_ser/cart2_ser.js
packageA/pages/chongzhiDetails/chongzhiDetails.js
... | ... | @@ -217,7 +217,10 @@ Page({ |
217 | 217 | |
218 | 218 | //------调起支付框-------- |
219 | 219 | weixinPay: function (n, success, fail) { |
220 | - if(!n) return false; | |
220 | + if(!n) return false; | |
221 | + | |
222 | + getApp().globalData.no_clear=1; | |
223 | + | |
221 | 224 | wx.requestPayment({ |
222 | 225 | timeStamp: String(n.timeStamp), |
223 | 226 | nonceStr: n.nonceStr, | ... | ... |
packageA/pages/details_serviceCard/details_serviceCard.js
... | ... | @@ -530,6 +530,9 @@ Page({ |
530 | 530 | weixinPay: function(n, success, fail) { |
531 | 531 | if (!n) return false; |
532 | 532 | let order_id = this.data.details.order_id; |
533 | + | |
534 | + getApp().globalData.no_clear=1; | |
535 | + | |
533 | 536 | wx.requestPayment({ |
534 | 537 | timeStamp: String(n.timeStamp), |
535 | 538 | nonceStr: n.nonceStr, | ... | ... |
packageA/pages/myGift/myGift.js
... | ... | @@ -295,6 +295,9 @@ Page({ |
295 | 295 | success:function(res) { |
296 | 296 | if (res.data.code == 0 && res.data.data) { |
297 | 297 | res = res.data.data; |
298 | + | |
299 | + getApp().globalData.no_clear=1; | |
300 | + | |
298 | 301 | wx.requestPayment({ |
299 | 302 | timeStamp: String(res.timeStamp), |
300 | 303 | nonceStr: res.nonceStr, | ... | ... |
packageA/pages/myGiftDetails/myGiftDetails.js
... | ... | @@ -235,6 +235,9 @@ Page({ |
235 | 235 | success:function(res) { |
236 | 236 | if (res.data.code == 0 && res.data.data) { |
237 | 237 | res = res.data.data; |
238 | + | |
239 | + getApp().globalData.no_clear=1; | |
240 | + | |
238 | 241 | wx.requestPayment({ |
239 | 242 | timeStamp: String(res.timeStamp), |
240 | 243 | nonceStr: res.nonceStr, | ... | ... |
packageC/pages/presell/cart/cart.js
... | ... | @@ -2391,6 +2391,9 @@ Page({ |
2391 | 2391 | weixinPay: function (n, success, fail) { |
2392 | 2392 | if (!n) return false; |
2393 | 2393 | var th = this; |
2394 | + | |
2395 | + getApp().globalData.no_clear=1; | |
2396 | + | |
2394 | 2397 | wx.requestPayment({ |
2395 | 2398 | timeStamp: String(n.timeStamp), |
2396 | 2399 | nonceStr: n.nonceStr, | ... | ... |
packageD/pages/user/deposit/prepaid/prepaid.js
... | ... | @@ -182,7 +182,9 @@ Page({ |
182 | 182 | |
183 | 183 | //------调起支付框-------- |
184 | 184 | weixinPay: function (n, success, fail) { |
185 | - if(!n) return false; | |
185 | + if(!n) return false; | |
186 | + | |
187 | + getApp().globalData.no_clear=1; | |
186 | 188 | |
187 | 189 | wx.requestPayment({ |
188 | 190 | timeStamp: String(n.timeStamp), | ... | ... |
packageD/pages/user/integral/integral.js
... | ... | @@ -283,7 +283,9 @@ Page({ |
283 | 283 | |
284 | 284 | //------调起支付框-------- |
285 | 285 | weixinPay: function (n, success, fail) { |
286 | - if(!n) return false; | |
286 | + if(!n) return false; | |
287 | + getApp().globalData.no_clear=1; | |
288 | + | |
287 | 289 | wx.requestPayment({ |
288 | 290 | timeStamp: String(n.timeStamp), |
289 | 291 | nonceStr: n.nonceStr, | ... | ... |
pages/cart/cart_wk/cart_wk.js
pages/giftpack/public/buy_com.js
... | ... | @@ -255,6 +255,9 @@ module.exports = { |
255 | 255 | if (!res) return false; |
256 | 256 | var money=that.data.payMoney; |
257 | 257 | var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; |
258 | + | |
259 | + getApp().globalData.no_clear=1; | |
260 | + | |
258 | 261 | wx.requestPayment({ |
259 | 262 | timeStamp: String(res.timeStamp), |
260 | 263 | nonceStr: res.nonceStr, | ... | ... |
pages/user/index/index.js
... | ... | @@ -175,6 +175,9 @@ Page({ |
175 | 175 | |
176 | 176 | /*------会员登录------*/ |
177 | 177 | var e = getApp().globalData.userInfo; |
178 | + | |
179 | + | |
180 | + | |
178 | 181 | if (e != undefined && e != null && e.mobile) { |
179 | 182 | |
180 | 183 | |
... | ... | @@ -186,21 +189,20 @@ Page({ |
186 | 189 | vipid: e.erpvipid, |
187 | 190 | }; |
188 | 191 | |
189 | - | |
190 | - var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid; | |
191 | - getApp().request.promiseGet(url, { | |
192 | - data: portrait_req | |
193 | - }) | |
194 | - .then((res) => { | |
195 | - if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { | |
196 | - this.setData({has_rj:1}) | |
197 | - }else { | |
198 | - this.setData({has_rj:-1}) | |
199 | - } | |
200 | - | |
192 | + getApp().getConfig(()=>{ | |
193 | + var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid; | |
194 | + getApp().request.promiseGet(url, { | |
195 | + data: portrait_req | |
201 | 196 | }) |
197 | + .then((res) => { | |
198 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { | |
199 | + th.setData({has_rj:1}) | |
200 | + }else { | |
201 | + th.setData({has_rj:-1}) | |
202 | + } | |
202 | 203 | |
203 | - | |
204 | + }) | |
205 | + }) | |
204 | 206 | |
205 | 207 | |
206 | 208 | } |
... | ... | @@ -492,12 +494,15 @@ Page({ |
492 | 494 | setTimeout(function () { |
493 | 495 | |
494 | 496 | th.setData({ is_show_recommend:true }) |
495 | - | |
496 | 497 | if (getApp().globalData.user_id) getApp().requestCardNum(th); |
497 | 498 | var goods_list = th.selectComponent("#goods_recommend"); //组件的id |
498 | - goods_list.init(); | |
499 | - goods_list.get_list(); | |
500 | - }, 800) | |
499 | + | |
500 | + if(goods_list){ | |
501 | + goods_list.init(); | |
502 | + goods_list.get_list(); | |
503 | + } | |
504 | + | |
505 | + }, 1000) | |
501 | 506 | } |
502 | 507 | |
503 | 508 | ... | ... |
pages/user/order_list/order_list.js
... | ... | @@ -2537,6 +2537,9 @@ Page({ |
2537 | 2537 | weixinPay: function(n, success, fail) { |
2538 | 2538 | if (!n) return false; |
2539 | 2539 | // let order_id = item.order_id; |
2540 | + | |
2541 | + getApp().globalData.no_clear=1; | |
2542 | + | |
2540 | 2543 | wx.requestPayment({ |
2541 | 2544 | timeStamp: String(n.timeStamp), |
2542 | 2545 | nonceStr: n.nonceStr, | ... | ... |
utils/pay.js
utils/pay2.js