Commit 4ed0a31dec8adcc44eda3e629bd6d12fdb1407cc
1 parent
4b1e48d0
月包
Showing
4 changed files
with
63 additions
and
39 deletions
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js
@@ -141,25 +141,12 @@ Page({ | @@ -141,25 +141,12 @@ Page({ | ||
141 | onShow: function () { | 141 | onShow: function () { |
142 | var th=this; | 142 | var th=this; |
143 | this.setData({submit:0}) | 143 | this.setData({submit:0}) |
144 | - i.fy_back('',0,function (){ | ||
145 | - | ||
146 | - console.log(getApp().globalData.py_month_bg,'111111'); | ||
147 | - console.log(th.data.back_ord,'22222'); | ||
148 | - | ||
149 | - if(getApp().globalData.py_month_bg && th.data.back_ord){ | ||
150 | - var b_ord=th.data.back_ord; | ||
151 | - com.reduce(b_ord,os.stoid); | ||
152 | - //要进行清空粗粒 | ||
153 | - getApp().globalData.py_month_bg=0; | ||
154 | - th.data.back_ord=null; | ||
155 | - | ||
156 | - } | ||
157 | - }) | 144 | + |
158 | com.set_py_fir(); | 145 | com.set_py_fir(); |
159 | getApp().check_can_share(); | 146 | getApp().check_can_share(); |
160 | var th=this; | 147 | var th=this; |
161 | - //--先判断会员状态-- | ||
162 | - getApp().is_Single_page(this, function () { | 148 | + //--先判断会员状态-- |
149 | + getApp().is_Single_page(this, function () { | ||
163 | var user_info = getApp().globalData.userInfo; | 150 | var user_info = getApp().globalData.userInfo; |
164 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | 151 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
165 | getApp().goto('/packageE/pages/togoin/togoin'); | 152 | getApp().goto('/packageE/pages/togoin/togoin'); |
@@ -173,7 +160,25 @@ Page({ | @@ -173,7 +160,25 @@ Page({ | ||
173 | th.data.is_get_guide=0; | 160 | th.data.is_get_guide=0; |
174 | 161 | ||
175 | }) | 162 | }) |
176 | - this.init(); | 163 | + this.init(); |
164 | + | ||
165 | + setTimeout(()=> { | ||
166 | + i.fy_back('', 0, function () { | ||
167 | + | ||
168 | + console.log(getApp().globalData.py_month_bg, '111111'); | ||
169 | + console.log(th.data.back_ord, '22222'); | ||
170 | + | ||
171 | + if (getApp().globalData.py_month_bg && th.data.back_ord) { | ||
172 | + getApp().globalData.fuyou_clear = 1; | ||
173 | + var b_ord = th.data.back_ord; | ||
174 | + com.reduce(b_ord, os.stoid); | ||
175 | + //要进行清空粗粒 | ||
176 | + getApp().globalData.py_month_bg = 0; | ||
177 | + th.data.back_ord = null; | ||
178 | + | ||
179 | + } | ||
180 | + }) | ||
181 | + },1000) | ||
177 | }, | 182 | }, |
178 | 183 | ||
179 | //购买礼包 | 184 | //购买礼包 |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
@@ -201,16 +201,6 @@ Page({ | @@ -201,16 +201,6 @@ Page({ | ||
201 | onShow: function () { | 201 | onShow: function () { |
202 | var th=this; | 202 | var th=this; |
203 | this.setData({submit:0}) | 203 | this.setData({submit:0}) |
204 | - ut.fy_back('',0,function (){ | ||
205 | - if(getApp().globalData.py_month_bg && th.data.back_ord){ | ||
206 | - var b_ord=th.data.back_ord; | ||
207 | - com.reduce(b_ord,os.stoid); | ||
208 | - //要进行清空粗粒 | ||
209 | - getApp().globalData.py_month_bg=0; | ||
210 | - th.data.back_ord=null; | ||
211 | - | ||
212 | - } | ||
213 | - }) | ||
214 | com.set_py_fir(); | 204 | com.set_py_fir(); |
215 | getApp().check_can_share(); | 205 | getApp().check_can_share(); |
216 | getApp().is_Single_page(this, function () { | 206 | getApp().is_Single_page(this, function () { |
@@ -222,6 +212,21 @@ Page({ | @@ -222,6 +212,21 @@ Page({ | ||
222 | } | 212 | } |
223 | this.init(); | 213 | this.init(); |
224 | }) | 214 | }) |
215 | + | ||
216 | + setTimeout(()=>{ | ||
217 | + ut.fy_back('',0,function (){ | ||
218 | + if(getApp().globalData.py_month_bg && th.data.back_ord){ | ||
219 | + getApp().globalData.fuyou_clear=1; | ||
220 | + var b_ord=th.data.back_ord; | ||
221 | + com.reduce(b_ord,os.stoid); | ||
222 | + //要进行清空粗粒 | ||
223 | + getApp().globalData.py_month_bg=0; | ||
224 | + th.data.back_ord=null; | ||
225 | + | ||
226 | + } | ||
227 | + }) | ||
228 | + },1000) | ||
229 | + | ||
225 | }, | 230 | }, |
226 | GetBuyPrice: function (e) { | 231 | GetBuyPrice: function (e) { |
227 | var that = this.data; | 232 | var that = this.data; |
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js
@@ -175,18 +175,25 @@ Page({ | @@ -175,18 +175,25 @@ Page({ | ||
175 | onShow: function () { | 175 | onShow: function () { |
176 | var th=this; | 176 | var th=this; |
177 | this.setData({submit:0}) | 177 | this.setData({submit:0}) |
178 | - ut.fy_back('',0,function (){ | ||
179 | - if(getApp().globalData.py_month_bg && th.data.back_ord){ | ||
180 | - var b_ord=th.data.back_ord; | ||
181 | - com.reduce(b_ord,os.stoid); | ||
182 | - //要进行清空粗粒 | ||
183 | - getApp().globalData.py_month_bg=0; | ||
184 | - th.data.back_ord=null; | ||
185 | - } | ||
186 | - }); | ||
187 | - | ||
188 | com.set_py_fir(); | 178 | com.set_py_fir(); |
189 | getApp().check_can_share(); | 179 | getApp().check_can_share(); |
180 | + | ||
181 | + setTimeout(()=>{ | ||
182 | + ut.fy_back('',0,function (){ | ||
183 | + if(getApp().globalData.py_month_bg && th.data.back_ord){ | ||
184 | + getApp().globalData.fuyou_clear=1; | ||
185 | + var b_ord=th.data.back_ord; | ||
186 | + | ||
187 | + console.log(b_ord,111) | ||
188 | + | ||
189 | + com.reduce(b_ord,os.stoid); | ||
190 | + //要进行清空粗粒 | ||
191 | + getApp().globalData.py_month_bg=0; | ||
192 | + th.data.back_ord=null; | ||
193 | + } | ||
194 | + }); | ||
195 | + },1000) | ||
196 | + | ||
190 | getApp().is_Single_page(this, function () { | 197 | getApp().is_Single_page(this, function () { |
191 | //--先判断会员状态-- | 198 | //--先判断会员状态-- |
192 | var user_info = getApp().globalData.userInfo; | 199 | var user_info = getApp().globalData.userInfo; |
@@ -196,6 +203,8 @@ Page({ | @@ -196,6 +203,8 @@ Page({ | ||
196 | } | 203 | } |
197 | this.init(); | 204 | this.init(); |
198 | }) | 205 | }) |
206 | + | ||
207 | + | ||
199 | }, | 208 | }, |
200 | GetBuyPrice: function (e) { | 209 | GetBuyPrice: function (e) { |
201 | var that = this.data; | 210 | var that = this.data; |
packageE/pages/user/monthgiftbag/public/buy_com.js
@@ -272,10 +272,15 @@ module.exports = { | @@ -272,10 +272,15 @@ module.exports = { | ||
272 | t_pay.pay_data(res,function (){ | 272 | t_pay.pay_data(res,function (){ |
273 | th.setData({submit:0}) | 273 | th.setData({submit:0}) |
274 | getApp().goto(url); | 274 | getApp().goto(url); |
275 | - },function (){ | 275 | + },function (e){ |
276 | th.setData({submit:0}) | 276 | th.setData({submit:0}) |
277 | getApp().my_warnning("取消支付", 0, th); | 277 | getApp().my_warnning("取消支付", 0, th); |
278 | - then1.reduce(order_sn,that.data.getStorageID) | 278 | + if(!getApp().globalData.fuyou_clear){ |
279 | + then1.reduce(order_sn,that.data.getStorageID) | ||
280 | + console.log(order_sn,222) | ||
281 | + } | ||
282 | + | ||
283 | + getApp().globalData.fuyou_clear=0; | ||
279 | }) | 284 | }) |
280 | 285 | ||
281 | // wx.requestPayment({ | 286 | // wx.requestPayment({ |