Commit 045cc559ee9ebeb037cb40d31eb0ad502f6ee6dc
1 parent
25388e8d
测试优化
Showing
14 changed files
with
61 additions
and
20 deletions
packageA/pages/cart2_ser/cart2_ser.js
| @@ -685,6 +685,9 @@ Page({ | @@ -685,6 +685,9 @@ Page({ | ||
| 685 | //------调起支付框-------- | 685 | //------调起支付框-------- |
| 686 | weixinPay: function(n, success, fail) { | 686 | weixinPay: function(n, success, fail) { |
| 687 | if (!n) return false; | 687 | if (!n) return false; |
| 688 | + | ||
| 689 | + getApp().globalData.no_clear=1; | ||
| 690 | + | ||
| 688 | wx.requestPayment({ | 691 | wx.requestPayment({ |
| 689 | timeStamp: String(n.timeStamp), | 692 | timeStamp: String(n.timeStamp), |
| 690 | nonceStr: n.nonceStr, | 693 | nonceStr: n.nonceStr, |
packageA/pages/chongzhiDetails/chongzhiDetails.js
| @@ -217,7 +217,10 @@ Page({ | @@ -217,7 +217,10 @@ Page({ | ||
| 217 | 217 | ||
| 218 | //------调起支付框-------- | 218 | //------调起支付框-------- |
| 219 | weixinPay: function (n, success, fail) { | 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 | wx.requestPayment({ | 224 | wx.requestPayment({ |
| 222 | timeStamp: String(n.timeStamp), | 225 | timeStamp: String(n.timeStamp), |
| 223 | nonceStr: n.nonceStr, | 226 | nonceStr: n.nonceStr, |
packageA/pages/details_serviceCard/details_serviceCard.js
| @@ -530,6 +530,9 @@ Page({ | @@ -530,6 +530,9 @@ Page({ | ||
| 530 | weixinPay: function(n, success, fail) { | 530 | weixinPay: function(n, success, fail) { |
| 531 | if (!n) return false; | 531 | if (!n) return false; |
| 532 | let order_id = this.data.details.order_id; | 532 | let order_id = this.data.details.order_id; |
| 533 | + | ||
| 534 | + getApp().globalData.no_clear=1; | ||
| 535 | + | ||
| 533 | wx.requestPayment({ | 536 | wx.requestPayment({ |
| 534 | timeStamp: String(n.timeStamp), | 537 | timeStamp: String(n.timeStamp), |
| 535 | nonceStr: n.nonceStr, | 538 | nonceStr: n.nonceStr, |
packageA/pages/myGift/myGift.js
| @@ -295,6 +295,9 @@ Page({ | @@ -295,6 +295,9 @@ Page({ | ||
| 295 | success:function(res) { | 295 | success:function(res) { |
| 296 | if (res.data.code == 0 && res.data.data) { | 296 | if (res.data.code == 0 && res.data.data) { |
| 297 | res = res.data.data; | 297 | res = res.data.data; |
| 298 | + | ||
| 299 | + getApp().globalData.no_clear=1; | ||
| 300 | + | ||
| 298 | wx.requestPayment({ | 301 | wx.requestPayment({ |
| 299 | timeStamp: String(res.timeStamp), | 302 | timeStamp: String(res.timeStamp), |
| 300 | nonceStr: res.nonceStr, | 303 | nonceStr: res.nonceStr, |
packageA/pages/myGiftDetails/myGiftDetails.js
| @@ -235,6 +235,9 @@ Page({ | @@ -235,6 +235,9 @@ Page({ | ||
| 235 | success:function(res) { | 235 | success:function(res) { |
| 236 | if (res.data.code == 0 && res.data.data) { | 236 | if (res.data.code == 0 && res.data.data) { |
| 237 | res = res.data.data; | 237 | res = res.data.data; |
| 238 | + | ||
| 239 | + getApp().globalData.no_clear=1; | ||
| 240 | + | ||
| 238 | wx.requestPayment({ | 241 | wx.requestPayment({ |
| 239 | timeStamp: String(res.timeStamp), | 242 | timeStamp: String(res.timeStamp), |
| 240 | nonceStr: res.nonceStr, | 243 | nonceStr: res.nonceStr, |
packageC/pages/presell/cart/cart.js
| @@ -2391,6 +2391,9 @@ Page({ | @@ -2391,6 +2391,9 @@ Page({ | ||
| 2391 | weixinPay: function (n, success, fail) { | 2391 | weixinPay: function (n, success, fail) { |
| 2392 | if (!n) return false; | 2392 | if (!n) return false; |
| 2393 | var th = this; | 2393 | var th = this; |
| 2394 | + | ||
| 2395 | + getApp().globalData.no_clear=1; | ||
| 2396 | + | ||
| 2394 | wx.requestPayment({ | 2397 | wx.requestPayment({ |
| 2395 | timeStamp: String(n.timeStamp), | 2398 | timeStamp: String(n.timeStamp), |
| 2396 | nonceStr: n.nonceStr, | 2399 | nonceStr: n.nonceStr, |
packageD/pages/user/deposit/prepaid/prepaid.js
| @@ -182,7 +182,9 @@ Page({ | @@ -182,7 +182,9 @@ Page({ | ||
| 182 | 182 | ||
| 183 | //------调起支付框-------- | 183 | //------调起支付框-------- |
| 184 | weixinPay: function (n, success, fail) { | 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 | wx.requestPayment({ | 189 | wx.requestPayment({ |
| 188 | timeStamp: String(n.timeStamp), | 190 | timeStamp: String(n.timeStamp), |
packageD/pages/user/integral/integral.js
| @@ -283,7 +283,9 @@ Page({ | @@ -283,7 +283,9 @@ Page({ | ||
| 283 | 283 | ||
| 284 | //------调起支付框-------- | 284 | //------调起支付框-------- |
| 285 | weixinPay: function (n, success, fail) { | 285 | weixinPay: function (n, success, fail) { |
| 286 | - if(!n) return false; | 286 | + if(!n) return false; |
| 287 | + getApp().globalData.no_clear=1; | ||
| 288 | + | ||
| 287 | wx.requestPayment({ | 289 | wx.requestPayment({ |
| 288 | timeStamp: String(n.timeStamp), | 290 | timeStamp: String(n.timeStamp), |
| 289 | nonceStr: n.nonceStr, | 291 | nonceStr: n.nonceStr, |
pages/cart/cart_wk/cart_wk.js
| @@ -896,6 +896,9 @@ Page({ | @@ -896,6 +896,9 @@ Page({ | ||
| 896 | weixinPay: function (n, success, fail) { | 896 | weixinPay: function (n, success, fail) { |
| 897 | if (!n) return false; | 897 | if (!n) return false; |
| 898 | var th = this; | 898 | var th = this; |
| 899 | + | ||
| 900 | + getApp().globalData.no_clear=1; | ||
| 901 | + | ||
| 899 | wx.requestPayment({ | 902 | wx.requestPayment({ |
| 900 | timeStamp: String(n.timeStamp), | 903 | timeStamp: String(n.timeStamp), |
| 901 | nonceStr: n.nonceStr, | 904 | nonceStr: n.nonceStr, |
pages/giftpack/public/buy_com.js
| @@ -255,6 +255,9 @@ module.exports = { | @@ -255,6 +255,9 @@ module.exports = { | ||
| 255 | if (!res) return false; | 255 | if (!res) return false; |
| 256 | var money=that.data.payMoney; | 256 | var money=that.data.payMoney; |
| 257 | var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; | 257 | var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; |
| 258 | + | ||
| 259 | + getApp().globalData.no_clear=1; | ||
| 260 | + | ||
| 258 | wx.requestPayment({ | 261 | wx.requestPayment({ |
| 259 | timeStamp: String(res.timeStamp), | 262 | timeStamp: String(res.timeStamp), |
| 260 | nonceStr: res.nonceStr, | 263 | nonceStr: res.nonceStr, |
pages/user/index/index.js
| @@ -175,6 +175,9 @@ Page({ | @@ -175,6 +175,9 @@ Page({ | ||
| 175 | 175 | ||
| 176 | /*------会员登录------*/ | 176 | /*------会员登录------*/ |
| 177 | var e = getApp().globalData.userInfo; | 177 | var e = getApp().globalData.userInfo; |
| 178 | + | ||
| 179 | + | ||
| 180 | + | ||
| 178 | if (e != undefined && e != null && e.mobile) { | 181 | if (e != undefined && e != null && e.mobile) { |
| 179 | 182 | ||
| 180 | 183 | ||
| @@ -186,21 +189,20 @@ Page({ | @@ -186,21 +189,20 @@ Page({ | ||
| 186 | vipid: e.erpvipid, | 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,12 +494,15 @@ Page({ | ||
| 492 | setTimeout(function () { | 494 | setTimeout(function () { |
| 493 | 495 | ||
| 494 | th.setData({ is_show_recommend:true }) | 496 | th.setData({ is_show_recommend:true }) |
| 495 | - | ||
| 496 | if (getApp().globalData.user_id) getApp().requestCardNum(th); | 497 | if (getApp().globalData.user_id) getApp().requestCardNum(th); |
| 497 | var goods_list = th.selectComponent("#goods_recommend"); //组件的id | 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,6 +2537,9 @@ Page({ | ||
| 2537 | weixinPay: function(n, success, fail) { | 2537 | weixinPay: function(n, success, fail) { |
| 2538 | if (!n) return false; | 2538 | if (!n) return false; |
| 2539 | // let order_id = item.order_id; | 2539 | // let order_id = item.order_id; |
| 2540 | + | ||
| 2541 | + getApp().globalData.no_clear=1; | ||
| 2542 | + | ||
| 2540 | wx.requestPayment({ | 2543 | wx.requestPayment({ |
| 2541 | timeStamp: String(n.timeStamp), | 2544 | timeStamp: String(n.timeStamp), |
| 2542 | nonceStr: n.nonceStr, | 2545 | nonceStr: n.nonceStr, |
utils/pay.js
| @@ -70,6 +70,8 @@ module.exports = { | @@ -70,6 +70,8 @@ module.exports = { | ||
| 70 | weixinPay: function(n, e, a) { | 70 | weixinPay: function(n, e, a) { |
| 71 | if(!n) return false; | 71 | if(!n) return false; |
| 72 | 72 | ||
| 73 | + getApp().globalData.no_clear=1; | ||
| 74 | + | ||
| 73 | //有的话用最新的支付方式 | 75 | //有的话用最新的支付方式 |
| 74 | if(n.orderInfo) { | 76 | if(n.orderInfo) { |
| 75 | wx.requestOrderPayment({ | 77 | wx.requestOrderPayment({ |
utils/pay2.js
| @@ -43,6 +43,9 @@ module.exports = { | @@ -43,6 +43,9 @@ module.exports = { | ||
| 43 | }, | 43 | }, |
| 44 | weixinPay: function(n, succ,fail) { | 44 | weixinPay: function(n, succ,fail) { |
| 45 | if(!n) return false; | 45 | if(!n) return false; |
| 46 | + | ||
| 47 | + getApp().globalData.no_clear=1; | ||
| 48 | + | ||
| 46 | wx.requestPayment({ | 49 | wx.requestPayment({ |
| 47 | timeStamp: String(n.timeStamp), | 50 | timeStamp: String(n.timeStamp), |
| 48 | nonceStr: n.nonceStr, | 51 | nonceStr: n.nonceStr, |