From d98026cf286ea1273028b657d89716c076abaa41 Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Tue, 2 Apr 2024 17:14:46 +0800 Subject: [PATCH] 加载优化 --- packageC/pages/presell/cart/cart.js | 7 ++++++- packageC/pages/presell/cart/cart2.js | 7 ++++++- packageE/pages/cart/cart2/cart2.js | 9 +++++++-- packageE/pages/cart/cart2_pt/cart2_pt.js | 7 ++++++- packageE/pages/cart/cart_wk/cart_wk.js | 11 ++++++++--- 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js index 40e76f2..c3a4c4e 100644 --- a/packageC/pages/presell/cart/cart.js +++ b/packageC/pages/presell/cart/cart.js @@ -1832,11 +1832,16 @@ Page({ // setTimeout(() => { // this.def_coupon_fn_aft() // }, 100); + wx.showLoading({ + title: '加载中', + mask:true + }) try { setTimeout(() => { + wx.hideLoading() this.def_coupon_fn_aft() }, 1000); - } catch (error) { } + } catch (error) {} }, //默认选择优惠券 diff --git a/packageC/pages/presell/cart/cart2.js b/packageC/pages/presell/cart/cart2.js index 2d42d4c..d443549 100644 --- a/packageC/pages/presell/cart/cart2.js +++ b/packageC/pages/presell/cart/cart2.js @@ -1311,7 +1311,7 @@ Page({ //调用默认优惠券方法 th.def_coupon_fn() - wx.hideLoading(); + // wx.hideLoading(); }, @@ -2914,8 +2914,13 @@ Page({ // setTimeout(() => { // this.def_coupon_fn_aft() // }, 100); + wx.showLoading({ + title: '加载中', + mask:true + }) try { setTimeout(() => { + wx.hideLoading() this.def_coupon_fn_aft() }, 1000); } catch (error) { } diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 60e2ef3..ec06322 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -3987,7 +3987,7 @@ Page({ th.set_can_num(); //调用默认优惠券方法 th.def_coupon_fn(); - wx.hideLoading(); + // wx.hideLoading(); //}); }, @@ -4733,7 +4733,7 @@ Page({ //调用默认优惠券方法 th.def_coupon_fn() - wx.hideLoading(); + // wx.hideLoading(); //}); @@ -7338,8 +7338,13 @@ Page({ // setTimeout(() => { // this.def_coupon_fn_aft() // }, 100); + wx.showLoading({ + title: '加载中', + mask:true + }) try { setTimeout(() => { + wx.hideLoading() this.def_coupon_fn_aft() }, 1000); } catch (error) { } diff --git a/packageE/pages/cart/cart2_pt/cart2_pt.js b/packageE/pages/cart/cart2_pt/cart2_pt.js index 5af503d..303aae4 100644 --- a/packageE/pages/cart/cart2_pt/cart2_pt.js +++ b/packageE/pages/cart/cart2_pt/cart2_pt.js @@ -1368,7 +1368,7 @@ Page({ //调用默认优惠券方法 th.def_coupon_fn() - wx.hideLoading(); + // wx.hideLoading(); //}); @@ -2580,8 +2580,13 @@ Page({ // setTimeout(() => { // this.def_coupon_fn_aft() // }, 100); + wx.showLoading({ + title: '加载中', + mask:true + }) try { setTimeout(() => { + wx.hideLoading() this.def_coupon_fn_aft() }, 1000); } catch (error) { } diff --git a/packageE/pages/cart/cart_wk/cart_wk.js b/packageE/pages/cart/cart_wk/cart_wk.js index 878ca24..8d5bf4a 100644 --- a/packageE/pages/cart/cart_wk/cart_wk.js +++ b/packageE/pages/cart/cart_wk/cart_wk.js @@ -621,7 +621,7 @@ Page({ th.setData({exp_price: 0, allpice: allpice, submit: 0, show_submit: 1}) th.def_coupon_fn() - wx.hideLoading(); + // wx.hideLoading(); } }, @@ -1188,7 +1188,7 @@ Page({ th.setData({exp_price: 0, allpice: allpice, submit: 0, show_submit: 1}) } th.def_coupon_fn() - wx.hideLoading(); + // wx.hideLoading(); //}); }, @@ -1356,7 +1356,7 @@ Page({ th.setData({ exp_price: 0, allpice: allpice,submit:0,show_submit:1}) } th.def_coupon_fn() - wx.hideLoading(); + // wx.hideLoading(); }, @@ -2095,8 +2095,13 @@ Page({ // setTimeout(() => { // this.def_coupon_fn_aft() // }, 100); + wx.showLoading({ + title: '加载中', + mask:true + }) try { setTimeout(() => { + wx.hideLoading() this.def_coupon_fn_aft() }, 1000); } catch (error) { } -- libgit2 0.21.4