Commit 7106d2c4de1d9cfb69bfd64dbcce8ecb2856eedf
Merge branch 'test' into 'qa'
Test See merge request !976
Showing
7 changed files
with
140 additions
and
92 deletions
pages/giftpack/buygiftpack/giftpackbuy.js
| ... | ... | @@ -29,14 +29,20 @@ Page({ |
| 29 | 29 | first_leader: e.globalData.first_leader || 0, // 推荐人ID |
| 30 | 30 | }, |
| 31 | 31 | onLoad: function (options) { |
| 32 | - | |
| 32 | + this.setData({ | |
| 33 | + params: options, | |
| 34 | + }) | |
| 35 | + | |
| 36 | + }, | |
| 37 | + init() { | |
| 33 | 38 | var th = this; |
| 34 | - var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
| 35 | - my_confirm.open_cancel(0); | |
| 36 | - th.setData({ | |
| 39 | + let options = this.data?.params; | |
| 40 | + this.setData({ | |
| 37 | 41 | getStorageID: a.stoid, |
| 38 | 42 | getUserID: d.user_id |
| 39 | 43 | }); |
| 44 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
| 45 | + my_confirm.open_cancel(0); | |
| 40 | 46 | //-- 获取分享人的ID -- |
| 41 | 47 | var first_leader = options.first_leader || getApp().globalData.first_leader; |
| 42 | 48 | if (first_leader) { |
| ... | ... | @@ -52,8 +58,6 @@ Page({ |
| 52 | 58 | } |
| 53 | 59 | }) |
| 54 | 60 | } |
| 55 | - | |
| 56 | - | |
| 57 | 61 | getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, { |
| 58 | 62 | data: { |
| 59 | 63 | enabled: 1 |
| ... | ... | @@ -72,19 +76,18 @@ Page({ |
| 72 | 76 | }); |
| 73 | 77 | } |
| 74 | 78 | }) |
| 75 | - | |
| 76 | - | |
| 79 | + this.getList(); | |
| 77 | 80 | }, |
| 78 | 81 | onShow: function () { |
| 79 | 82 | //--先判断会员状态-- |
| 80 | - getApp().is_Single_page(this,function(){ | |
| 83 | + getApp().is_Single_page(this, function () { | |
| 81 | 84 | var user_info = getApp().globalData.userInfo; |
| 82 | 85 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 83 | - getApp().goto('/pages/togoin/togoin'); | |
| 84 | - return false; | |
| 86 | + getApp().goto('/pages/togoin/togoin'); | |
| 87 | + return false; | |
| 85 | 88 | } |
| 86 | - this.getList(); | |
| 87 | 89 | }) |
| 90 | + this.init(); | |
| 88 | 91 | }, |
| 89 | 92 | |
| 90 | 93 | //购买礼包 |
| ... | ... | @@ -190,7 +193,7 @@ Page({ |
| 190 | 193 | if (getApp().globalData.guide_id) { |
| 191 | 194 | json.guide_id = getApp().globalData.guide_id; |
| 192 | 195 | } |
| 193 | - console.log(json,'json'); | |
| 196 | + console.log(json, 'json'); | |
| 194 | 197 | var data = JSON.stringify(json); |
| 195 | 198 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; |
| 196 | 199 | getApp().request.json_post(url, json, |
| ... | ... | @@ -201,7 +204,7 @@ Page({ |
| 201 | 204 | getApp().my_warnning(res.data.msg, 0, th); |
| 202 | 205 | } |
| 203 | 206 | }, |
| 204 | - function (res) {}) | |
| 207 | + function (res) { }) | |
| 205 | 208 | |
| 206 | 209 | }) |
| 207 | 210 | |
| ... | ... | @@ -245,7 +248,7 @@ Page({ |
| 245 | 248 | getApp().my_warnning(res.data.msg, 0, th); |
| 246 | 249 | } |
| 247 | 250 | }, |
| 248 | - function (res) {}) | |
| 251 | + function (res) { }) | |
| 249 | 252 | }) |
| 250 | 253 | }, |
| 251 | 254 | |
| ... | ... | @@ -271,12 +274,14 @@ Page({ |
| 271 | 274 | wareCard: arr3, |
| 272 | 275 | total: res.data.data.total, |
| 273 | 276 | ismore: ismore, |
| 274 | - is_read: 1 | |
| 277 | + is_read: 1, | |
| 278 | + is_get:1 | |
| 275 | 279 | }), wx.stopPullDownRefresh(); //停止下拉刷新 |
| 276 | 280 | } else { |
| 277 | 281 | th.setData({ |
| 278 | 282 | is_read: 1, |
| 279 | - ismore: 1 | |
| 283 | + ismore: 1, | |
| 284 | + is_get:1 | |
| 280 | 285 | }) |
| 281 | 286 | } |
| 282 | 287 | } |
| ... | ... | @@ -326,7 +331,7 @@ Page({ |
| 326 | 331 | if (pagePath.indexOf('/') != 0) { |
| 327 | 332 | pagePath = '/' + pagePath; |
| 328 | 333 | } |
| 329 | - pagePath += "?first_leader="+this.data.getUserID; | |
| 334 | + pagePath += "?first_leader=" + this.data.getUserID; | |
| 330 | 335 | return { |
| 331 | 336 | title: "专享礼包", |
| 332 | 337 | path: pagePath, |
| ... | ... | @@ -340,7 +345,7 @@ Page({ |
| 340 | 345 | if (pagePath.indexOf('/') != 0) { |
| 341 | 346 | pagePath = '/' + pagePath; |
| 342 | 347 | } |
| 343 | - pagePath += "?first_leader="+this.data.getUserID; | |
| 348 | + pagePath += "?first_leader=" + this.data.getUserID; | |
| 344 | 349 | return { |
| 345 | 350 | title: '专享礼包', |
| 346 | 351 | imageUrl: this.data.ad_data.ad_code, | ... | ... |
pages/giftpack/buygiftpack/giftpackbuy.wxml
| ... | ... | @@ -94,7 +94,7 @@ |
| 94 | 94 | </view> |
| 95 | 95 | </view> |
| 96 | 96 | </block> |
| 97 | - <block wx:if="{{is_read && wareCard.length<1}}"> | |
| 97 | + <block wx:if="{{is_read && wareCard.length<1 && is_get}}"> | |
| 98 | 98 | <view class="foot_empty"> |
| 99 | 99 | <view> |
| 100 | 100 | <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image> | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.js
| ... | ... | @@ -32,14 +32,22 @@ Page({ |
| 32 | 32 | first_leader: e.globalData.first_leader || 0, // 推荐人ID |
| 33 | 33 | }, |
| 34 | 34 | onLoad: function (options) { |
| 35 | + this.setData({ | |
| 36 | + params:options, | |
| 37 | + }) | |
| 38 | + }, | |
| 39 | + init(){ | |
| 40 | + let options = this.data?.params; | |
| 35 | 41 | var th = this; |
| 36 | - th.setData({ | |
| 42 | + this.setData({ | |
| 43 | + getUserID: d.user_id, | |
| 44 | + getStorageID: a.stoid, | |
| 45 | + }) | |
| 46 | + this.setData({ | |
| 37 | 47 | isBuy: options.isBuy, |
| 38 | 48 | getGiftID: options.lbId, |
| 39 | 49 | orderSn: options.orderSn, |
| 40 | - getUserID: d.user_id, | |
| 41 | 50 | }) |
| 42 | - | |
| 43 | 51 | if (options.lbId) th.data.lbId = options.lbId; |
| 44 | 52 | //-- 获取分享人的ID -- |
| 45 | 53 | var first_leader = options.first_leader || getApp().globalData.first_leader; |
| ... | ... | @@ -57,6 +65,11 @@ Page({ |
| 57 | 65 | }) |
| 58 | 66 | } |
| 59 | 67 | th.close(); |
| 68 | + if (this.data.isBuy == 0) { | |
| 69 | + this.GetMyGiftList(); | |
| 70 | + } else { | |
| 71 | + this.GetBuyGiftList(); | |
| 72 | + } | |
| 60 | 73 | }, |
| 61 | 74 | |
| 62 | 75 | onShow: function () { |
| ... | ... | @@ -67,11 +80,7 @@ Page({ |
| 67 | 80 | getApp().goto('/pages/togoin/togoin'); |
| 68 | 81 | return false; |
| 69 | 82 | } |
| 70 | - if (this.data.isBuy == 0) { | |
| 71 | - this.GetMyGiftList(); | |
| 72 | - } else { | |
| 73 | - this.GetBuyGiftList(); | |
| 74 | - } | |
| 83 | + this.init(); | |
| 75 | 84 | }) |
| 76 | 85 | }, |
| 77 | 86 | GetBuyPrice: function (e) { | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.js
| ... | ... | @@ -25,19 +25,24 @@ Page({ |
| 25 | 25 | curpage: 1, //当前分页数 |
| 26 | 26 | pageSize: 10, //页大小 |
| 27 | 27 | total: 0, //总数量 |
| 28 | - ad_data:null, | |
| 28 | + ad_data: null, | |
| 29 | 29 | first_leader: e.globalData.first_leader || 0, // 推荐人ID |
| 30 | 30 | }, |
| 31 | + onLoad: function (options) { | |
| 32 | + this.setData({ | |
| 33 | + params: options, | |
| 34 | + }) | |
| 35 | + }, | |
| 31 | 36 | |
| 32 | - onLoad: function(options) { | |
| 37 | + init() { | |
| 38 | + let options = this.data?.params; | |
| 33 | 39 | var th = this; |
| 34 | - th.setData({ | |
| 40 | + this.setData({ | |
| 35 | 41 | getStorageID: a.stoid, |
| 36 | 42 | getUserID: d.user_id, |
| 37 | 43 | loadingType: 0, |
| 38 | 44 | getDate: i.formatTime(new Date().getTime()) |
| 39 | 45 | }); |
| 40 | - | |
| 41 | 46 | //-- 获取分享人的ID -- |
| 42 | 47 | var first_leader = options.first_leader || getApp().globalData.first_leader; |
| 43 | 48 | if (first_leader) { |
| ... | ... | @@ -53,39 +58,39 @@ Page({ |
| 53 | 58 | } |
| 54 | 59 | }) |
| 55 | 60 | } |
| 56 | - | |
| 57 | - getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, { | |
| 58 | - data: { | |
| 59 | - enabled: 1 | |
| 60 | - } | |
| 61 | - }).then(res => { | |
| 62 | - if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | |
| 63 | - var a = res.data.data.pageData; | |
| 64 | - var tt = { | |
| 65 | - 'ad_code': os.imghost + a[0].ad_code, | |
| 66 | - 'media_link': '', | |
| 67 | - 'ad_weapplink':a[0].ad_weapplink, | |
| 68 | - 'bgcolor':a[0].bgcolor, | |
| 69 | - }; | |
| 70 | - th.setData({ad_data:tt}); | |
| 71 | - } | |
| 72 | - }) | |
| 73 | 61 | |
| 62 | + getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, { | |
| 63 | + data: { | |
| 64 | + enabled: 1 | |
| 65 | + } | |
| 66 | + }).then(res => { | |
| 67 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | |
| 68 | + var a = res.data.data.pageData; | |
| 69 | + var tt = { | |
| 70 | + 'ad_code': os.imghost + a[0].ad_code, | |
| 71 | + 'media_link': '', | |
| 72 | + 'ad_weapplink': a[0].ad_weapplink, | |
| 73 | + 'bgcolor': a[0].bgcolor, | |
| 74 | + }; | |
| 75 | + th.setData({ ad_data: tt }); | |
| 76 | + } | |
| 77 | + }) | |
| 78 | + this.getList(); | |
| 74 | 79 | }, |
| 75 | - onShow: function() { | |
| 80 | + onShow: function () { | |
| 76 | 81 | //--先判断会员状态-- |
| 77 | - getApp().is_Single_page(this,function () { | |
| 82 | + getApp().is_Single_page(this, function () { | |
| 78 | 83 | var user_info = getApp().globalData.userInfo; |
| 79 | 84 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 80 | - getApp().goto('/pages/togoin/togoin'); | |
| 81 | - return false; | |
| 85 | + getApp().goto('/pages/togoin/togoin'); | |
| 86 | + return false; | |
| 82 | 87 | } |
| 83 | - this.getList(); | |
| 88 | + this.init() | |
| 84 | 89 | }) |
| 85 | - | |
| 90 | + | |
| 86 | 91 | |
| 87 | 92 | }, |
| 88 | - getList: function() { | |
| 93 | + getList: function () { | |
| 89 | 94 | var th = this; |
| 90 | 95 | |
| 91 | 96 | getApp().request.get('/api/weshop/marketing/my/giftbag/page', { |
| ... | ... | @@ -96,7 +101,7 @@ Page({ |
| 96 | 101 | page: th.data.curpage, |
| 97 | 102 | pageSize: th.data.pageSize |
| 98 | 103 | }, |
| 99 | - success: function(res) { | |
| 104 | + success: function (res) { | |
| 100 | 105 | if (res.data.code == 0) { |
| 101 | 106 | th.data.curpage++; |
| 102 | 107 | var arr1 = th.data.wareCard; |
| ... | ... | @@ -108,12 +113,14 @@ Page({ |
| 108 | 113 | wareCard: arr3, |
| 109 | 114 | total: res.data.data.total, |
| 110 | 115 | ismore: ismore, |
| 111 | - is_read: 1 | |
| 116 | + is_read: 1, | |
| 117 | + is_get:1, | |
| 112 | 118 | }), wx.stopPullDownRefresh(); //停止下拉刷新 |
| 113 | 119 | } else { |
| 114 | 120 | th.setData({ |
| 115 | 121 | is_read: 1, |
| 116 | - ismore:1 | |
| 122 | + ismore: 1, | |
| 123 | + is_get:1, | |
| 117 | 124 | }) |
| 118 | 125 | } |
| 119 | 126 | |
| ... | ... | @@ -123,7 +130,7 @@ Page({ |
| 123 | 130 | |
| 124 | 131 | }, |
| 125 | 132 | //销毁界面跳转 |
| 126 | - redirectTo: function(e) { | |
| 133 | + redirectTo: function (e) { | |
| 127 | 134 | var th = this; |
| 128 | 135 | var url = e.currentTarget.dataset.url; |
| 129 | 136 | //销毁跳转 |
| ... | ... | @@ -132,13 +139,13 @@ Page({ |
| 132 | 139 | }); |
| 133 | 140 | }, |
| 134 | 141 | //不销毁界面跳转 |
| 135 | - navigateTo: function(e) { | |
| 142 | + navigateTo: function (e) { | |
| 136 | 143 | var th = this; |
| 137 | 144 | var url = e.currentTarget.dataset.url; |
| 138 | 145 | getApp().goto(url); |
| 139 | 146 | }, |
| 140 | 147 | //下拉事件 |
| 141 | - onReachBottom: function() { | |
| 148 | + onReachBottom: function () { | |
| 142 | 149 | var th = this; |
| 143 | 150 | if (th.data.total <= th.data.pageSize) return; |
| 144 | 151 | if (th.data.ismore) return; |
| ... | ... | @@ -146,7 +153,7 @@ Page({ |
| 146 | 153 | }, |
| 147 | 154 | |
| 148 | 155 | //图片失败,默认图片 |
| 149 | - bind_bnerr2: function(e) { | |
| 156 | + bind_bnerr2: function (e) { | |
| 150 | 157 | var _errImg = e.target.dataset.errorimg; |
| 151 | 158 | var _errObj = {}; |
| 152 | 159 | _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; |
| ... | ... | @@ -154,33 +161,33 @@ Page({ |
| 154 | 161 | }, |
| 155 | 162 | |
| 156 | 163 | |
| 157 | -//--- 分享设置 -- | |
| 158 | -onShareAppMessage: function (e) { | |
| 159 | - var curPage=this; | |
| 160 | - var pagePath = curPage.route; //当前页面url | |
| 161 | - if (pagePath.indexOf('/') != 0) { | |
| 162 | - pagePath = '/' + pagePath; | |
| 163 | - } | |
| 164 | - pagePath += "?first_leader="+ this.data.getUserID; | |
| 165 | - return { | |
| 166 | - title: "专享礼包", | |
| 167 | - path:pagePath, | |
| 168 | - } | |
| 169 | -}, | |
| 164 | + //--- 分享设置 -- | |
| 165 | + onShareAppMessage: function (e) { | |
| 166 | + var curPage = this; | |
| 167 | + var pagePath = curPage.route; //当前页面url | |
| 168 | + if (pagePath.indexOf('/') != 0) { | |
| 169 | + pagePath = '/' + pagePath; | |
| 170 | + } | |
| 171 | + pagePath += "?first_leader=" + this.data.getUserID; | |
| 172 | + return { | |
| 173 | + title: "专享礼包", | |
| 174 | + path: pagePath, | |
| 175 | + } | |
| 176 | + }, | |
| 170 | 177 | |
| 171 | - onShareTimeline() { | |
| 172 | - var curPage=this; | |
| 173 | - var pagePath = curPage.route; //当前页面url | |
| 174 | - if (pagePath.indexOf('/') != 0) { | |
| 175 | - pagePath = '/' + pagePath; | |
| 178 | + onShareTimeline() { | |
| 179 | + var curPage = this; | |
| 180 | + var pagePath = curPage.route; //当前页面url | |
| 181 | + if (pagePath.indexOf('/') != 0) { | |
| 182 | + pagePath = '/' + pagePath; | |
| 183 | + } | |
| 184 | + pagePath += "?first_leader=" + this.data.getUserID; | |
| 185 | + return { | |
| 186 | + title: '专享礼包', | |
| 187 | + imageUrl: this.data.ad_data.ad_code, | |
| 188 | + path: pagePath, | |
| 176 | 189 | } |
| 177 | - pagePath += "?first_leader="+ this.data.getUserID; | |
| 178 | - return { | |
| 179 | - title: '专享礼包', | |
| 180 | - imageUrl: this.data.ad_data.ad_code, | |
| 181 | - path: pagePath, | |
| 182 | - } | |
| 183 | - }, | |
| 190 | + }, | |
| 184 | 191 | |
| 185 | 192 | |
| 186 | 193 | }); |
| 187 | 194 | \ No newline at end of file | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.wxml
| ... | ... | @@ -96,7 +96,7 @@ |
| 96 | 96 | </view> |
| 97 | 97 | </view> |
| 98 | 98 | </block> |
| 99 | - <block wx:if="{{is_read && wareCard.length<1}}"> | |
| 99 | + <block wx:if="{{is_read && wareCard.length<1 && is_get}}"> | |
| 100 | 100 | <view class="foot_empty"> |
| 101 | 101 | <view> |
| 102 | 102 | <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image> | ... | ... |
utils/pay.js
| 1 | -var t = getApp(), n = t.request; | |
| 1 | +var t = getApp(), n = t.request,wx_paying=0; | |
| 2 | 2 | |
| 3 | 3 | module.exports = { |
| 4 | 4 | url: "/api/weshop/order/pay/createOrder", |
| ... | ... | @@ -20,6 +20,10 @@ module.exports = { |
| 20 | 20 | }); |
| 21 | 21 | }, |
| 22 | 22 | pay: function(t, e, a,sto,type) { |
| 23 | + | |
| 24 | + if(wx_paying) return false; | |
| 25 | + wx_paying=1; | |
| 26 | + | |
| 23 | 27 | var i = this; |
| 24 | 28 | var dd = { |
| 25 | 29 | parent_sn: t, |
| ... | ... | @@ -28,9 +32,11 @@ module.exports = { |
| 28 | 32 | }; |
| 29 | 33 | if (type == 1) dd.type = 1; |
| 30 | 34 | |
| 35 | + wx.showLoading(); | |
| 31 | 36 | n.post(this.url, { |
| 32 | 37 | data: dd, |
| 33 | 38 | success: function(t) { |
| 39 | + wx.hideLoading(); | |
| 34 | 40 | if(t.data.code==0){ |
| 35 | 41 | i.weixinPay(t.data.data, e, a); |
| 36 | 42 | }else{ |
| ... | ... | @@ -39,14 +45,19 @@ module.exports = { |
| 39 | 45 | wx.redirectTo({ |
| 40 | 46 | url: "/pages/user/order_list/order_list", |
| 41 | 47 | }); |
| 42 | - },1000) | |
| 48 | + },1000) | |
| 49 | + wx_paying=0; | |
| 43 | 50 | } |
| 44 | 51 | return false; |
| 45 | 52 | }, |
| 46 | 53 | fail: function() { |
| 54 | + wx.hideLoading(); | |
| 55 | + wx_paying=0; | |
| 47 | 56 | "function" == typeof a && a(); |
| 48 | 57 | }, |
| 49 | 58 | failStatus: function() { |
| 59 | + wx.hideLoading(); | |
| 60 | + wx_paying=0; | |
| 50 | 61 | "function" == typeof a && a(); |
| 51 | 62 | } |
| 52 | 63 | }); |
| ... | ... | @@ -64,9 +75,11 @@ module.exports = { |
| 64 | 75 | paySign: n.paySign, |
| 65 | 76 | orderInfo: n.orderInfo, // 需要新增的 订单 信息 |
| 66 | 77 | success (n) { |
| 78 | + wx_paying=0; | |
| 67 | 79 | t.showSuccess("支付成功!", e); |
| 68 | 80 | }, |
| 69 | 81 | fail (n) { |
| 82 | + wx_paying=0; | |
| 70 | 83 | if(!n.errMsg ) { |
| 71 | 84 | getApp().showWarning("支付失败"); |
| 72 | 85 | "function" == typeof fail && fail(); |
| ... | ... | @@ -87,9 +100,11 @@ module.exports = { |
| 87 | 100 | signType: n.signType, |
| 88 | 101 | paySign: n.paySign, |
| 89 | 102 | success: function (n) { |
| 103 | + wx_paying=0; | |
| 90 | 104 | console.log(n), t.showSuccess("支付成功!", e); |
| 91 | 105 | }, |
| 92 | 106 | fail: function (n) { |
| 107 | + wx_paying=0; | |
| 93 | 108 | console.log(n), "requestPayment:fail" == n.errMsg ? t.showWarning("支付失败") : "requestPayment:fail cancel" == n.errMsg ? t.showWarning("您已取消支付") : |
| 94 | 109 | t.confirmBox("支付失败:" + n.errMsg.substr("requestPayment:fail ".length)), |
| 95 | 110 | "function" == typeof a && a(); | ... | ... |
utils/pay2.js
| 1 | -var t = getApp(), n = t.request; | |
| 1 | +var t = getApp(), n = t.request,wx_paying=0; | |
| 2 | 2 | |
| 3 | 3 | module.exports = { |
| 4 | 4 | url: "/api/weshop/plus/create/plus/order", |
| 5 | 5 | pay: function(dd, succ,fail) { |
| 6 | + | |
| 7 | + if(wx_paying) return false; | |
| 8 | + wx_paying=1; | |
| 9 | + | |
| 10 | + wx.showLoading(); | |
| 6 | 11 | var i = this; |
| 7 | 12 | n.post(this.url, { |
| 8 | 13 | data: dd, |
| 9 | 14 | success: function(t) { |
| 15 | + wx.hideLoading(); | |
| 10 | 16 | if(t.data.code==0){ |
| 11 | 17 | if(t.data.data=="升级成功"){ |
| 12 | 18 | "function" == typeof succ && succ(1); |
| ... | ... | @@ -19,9 +25,13 @@ module.exports = { |
| 19 | 25 | return false; |
| 20 | 26 | }, |
| 21 | 27 | fail: function() { |
| 28 | + wx.hideLoading(); | |
| 29 | + wx_paying=0; | |
| 22 | 30 | "function" == typeof fail && fail(); |
| 23 | 31 | }, |
| 24 | 32 | failStatus: function() { |
| 33 | + wx.hideLoading(); | |
| 34 | + wx_paying=0; | |
| 25 | 35 | "function" == typeof fail && fail(); |
| 26 | 36 | } |
| 27 | 37 | }); |
| ... | ... | @@ -35,9 +45,11 @@ module.exports = { |
| 35 | 45 | signType: n.signType, |
| 36 | 46 | paySign: n.paySign, |
| 37 | 47 | success: function(n) { |
| 48 | + wx_paying=0; | |
| 38 | 49 | "function" == typeof succ && succ(); |
| 39 | 50 | }, |
| 40 | 51 | fail: function(n) { |
| 52 | + wx_paying=0; | |
| 41 | 53 | "function" == typeof fail && fail(); |
| 42 | 54 | } |
| 43 | 55 | }); | ... | ... |