Commit 0e3442cc1632d29e1bc73740ae786e79071e193a
Merge branch 'dev' into 'test'
Dev See merge request !240
Showing
4 changed files
with
46 additions
and
94 deletions
pages/giftpack/buygiftpack/giftpackbuy.js
| ... | ... | @@ -37,7 +37,7 @@ Page({ | 
| 37 | 37 | th.getList(); | 
| 38 | 38 | }, | 
| 39 | 39 | onShow: function() { | 
| 40 | - | |
| 40 | + | |
| 41 | 41 | }, | 
| 42 | 42 | |
| 43 | 43 | GetBuyPrice: function(e) { | 
| ... | ... | @@ -57,6 +57,9 @@ Page({ | 
| 57 | 57 | }, | 
| 58 | 58 | function() { | 
| 59 | 59 | my_confirm.open_cancel(0); | 
| 60 | + wx.showLoading({ | |
| 61 | + title: '加载中', | |
| 62 | + }) | |
| 60 | 63 | var json = { | 
| 61 | 64 | "actId": '', //活动Id | 
| 62 | 65 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 
| ... | ... | @@ -76,6 +79,7 @@ Page({ | 
| 76 | 79 | 'content-type': 'application/json' | 
| 77 | 80 | }, // 设置请求的 header | 
| 78 | 81 | success: function(res) { | 
| 82 | + wx.hideLoading(); | |
| 79 | 83 | if (res.data.code == 0) { | 
| 80 | 84 | var order_sn = res.data.data.orderSn; | 
| 81 | 85 | res = res.data.data.result; | 
| ... | ... | @@ -89,7 +93,9 @@ Page({ | 
| 89 | 93 | success: function(res) { | 
| 90 | 94 | getApp().goto(url); | 
| 91 | 95 | }, | 
| 92 | - fail: function(res) {} | |
| 96 | + fail: function(res) { | |
| 97 | + getApp().my_confirm("取消支付", 0, th); | |
| 98 | + } | |
| 93 | 99 | }); | 
| 94 | 100 | } else { | 
| 95 | 101 | getApp().my_warnning(res.data.msg, 0, th); | 
| ... | ... | @@ -99,7 +105,6 @@ Page({ | 
| 99 | 105 | |
| 100 | 106 | } | 
| 101 | 107 | |
| 102 | - | |
| 103 | 108 | ) | 
| 104 | 109 | |
| 105 | 110 | |
| ... | ... | @@ -118,6 +123,9 @@ Page({ | 
| 118 | 123 | }, | 
| 119 | 124 | function() { | 
| 120 | 125 | my_confirm.open_cancel(0); | 
| 126 | + wx.showLoading({ | |
| 127 | + title: '加载中', | |
| 128 | + }) | |
| 121 | 129 | var json = { | 
| 122 | 130 | "actId": '', //活动Id | 
| 123 | 131 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 
| ... | ... | @@ -136,6 +144,7 @@ Page({ | 
| 136 | 144 | 'content-type': 'application/json' | 
| 137 | 145 | }, // 设置请求的 header | 
| 138 | 146 | success: function(res) { | 
| 147 | + wx.hideLoading(); | |
| 139 | 148 | if (res.data.code == 0) { | 
| 140 | 149 | getApp().my_warnning("兑换成功!", 1, th); | 
| 141 | 150 | } else { | 
| ... | ... | @@ -197,7 +206,7 @@ Page({ | 
| 197 | 206 | var th = this; | 
| 198 | 207 | var url = e.currentTarget.dataset.url; | 
| 199 | 208 | getApp().goto(url); | 
| 200 | - | |
| 209 | + | |
| 201 | 210 | }, | 
| 202 | 211 | //下拉事件 | 
| 203 | 212 | onReachBottom: function() { | ... | ... | 
pages/giftpack/giftpacklist/giftpacklist.js
| ... | ... | @@ -61,6 +61,9 @@ Page({ | 
| 61 | 61 | }, | 
| 62 | 62 | function() { | 
| 63 | 63 | my_confirm.open_cancel(0); | 
| 64 | + wx.showLoading({ | |
| 65 | + title: '加载中', | |
| 66 | + }) | |
| 64 | 67 | var json = { | 
| 65 | 68 | "actId": '', //活动Id | 
| 66 | 69 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 
| ... | ... | @@ -80,6 +83,7 @@ Page({ | 
| 80 | 83 | 'content-type': 'application/json' | 
| 81 | 84 | }, // 设置请求的 header | 
| 82 | 85 | success: function(res) { | 
| 86 | + wx.hideLoading(); | |
| 83 | 87 | if (res.data.code == 0) { | 
| 84 | 88 | var res = res.data.data; | 
| 85 | 89 | var order_sn = res.orderSn; | 
| ... | ... | @@ -124,6 +128,9 @@ Page({ | 
| 124 | 128 | }, | 
| 125 | 129 | function() { | 
| 126 | 130 | my_confirm.open_cancel(0); | 
| 131 | + wx.showLoading({ | |
| 132 | + title: '加载中', | |
| 133 | + }) | |
| 127 | 134 | var json = { | 
| 128 | 135 | "actId": '', //活动Id | 
| 129 | 136 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 
| ... | ... | @@ -142,6 +149,7 @@ Page({ | 
| 142 | 149 | 'content-type': 'application/json' | 
| 143 | 150 | }, // 设置请求的 header | 
| 144 | 151 | success: function(res) { | 
| 152 | + wx.hideLoading(); | |
| 145 | 153 | if (res.data.code == 0) { | 
| 146 | 154 | getApp().my_warnning("兑换成功!", 1, th); | 
| 147 | 155 | } else { | 
| ... | ... | @@ -157,6 +165,9 @@ Page({ | 
| 157 | 165 | GetMyGiftList: function() { | 
| 158 | 166 | var _this = this; | 
| 159 | 167 | var th = this; | 
| 168 | + wx.showLoading({ | |
| 169 | + title: '加载中', | |
| 170 | + }) | |
| 160 | 171 | getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', { | 
| 161 | 172 | data: { | 
| 162 | 173 | "storeId": a.stoid, //商家ID | 
| ... | ... | @@ -164,6 +175,7 @@ Page({ | 
| 164 | 175 | "orderSn": th.data.orderSn | 
| 165 | 176 | }, | 
| 166 | 177 | success: function success(res) { | 
| 178 | + wx.hideLoading(); | |
| 167 | 179 | if (res.data.code == 0) { | 
| 168 | 180 | th.setData({ | 
| 169 | 181 | giftImage: th.data.iurl + res.data.data.lbUrl, | 
| ... | ... | @@ -279,6 +291,9 @@ Page({ | 
| 279 | 291 | //获取核销码 | 
| 280 | 292 | getcode: function() { | 
| 281 | 293 | var th = this; | 
| 294 | + wx.showLoading({ | |
| 295 | + title: '加载中', | |
| 296 | + }) | |
| 282 | 297 | var orderSn = th.data.orderSn; //订单号 | 
| 283 | 298 | var json = { | 
| 284 | 299 | "storeId": a.stoid, | 
| ... | ... | @@ -294,6 +309,7 @@ Page({ | 
| 294 | 309 | 'content-type': 'application/json' | 
| 295 | 310 | }, // 设置请求的 header | 
| 296 | 311 | success: function(res) { | 
| 312 | + wx.hideLoading(); | |
| 297 | 313 | if (res.data.code == 0) { | 
| 298 | 314 | th.setData({ | 
| 299 | 315 | code: res.data.data | ... | ... | 
pages/giftpack/mygiftpack/mygiftpack.js
| ... | ... | @@ -28,8 +28,6 @@ Page({ | 
| 28 | 28 | }, | 
| 29 | 29 | |
| 30 | 30 | onLoad: function(options) { | 
| 31 | - // this.getStorageID = options.stoid; | |
| 32 | - // this.getUserID = options.userid; | |
| 33 | 31 | var th = this; | 
| 34 | 32 | th.setData({ | 
| 35 | 33 | getStorageID: a.stoid, | 
| ... | ... | @@ -40,49 +38,15 @@ Page({ | 
| 40 | 38 | th.getList(); | 
| 41 | 39 | }, | 
| 42 | 40 | onShow: function() { | 
| 43 | - // this.pages = 1; | |
| 44 | - // this.pageSize = 10; | |
| 45 | - // this.loadingType = 0; | |
| 46 | - // this.getList(); | |
| 47 | - // var th = this; | |
| 48 | - // th.setData({ | |
| 49 | - // pages: 1, | |
| 50 | - // pageSize: 10, | |
| 51 | - // loadingType: 0 | |
| 52 | - // }) | |
| 53 | - // th.getList(); | |
| 54 | - }, | |
| 55 | - // methods: { | |
| 56 | - // BuyGift: function BuyGift() { | |
| 57 | - // /*销毁跳转*/ | |
| 58 | - // uni.reLaunch({ | |
| 59 | - // url: 'pages/giftpack/buygiftpack/giftpackbuy?stoid=' + this.getStorageID + '&userid=' + this.getUserID | |
| 60 | - // }); | |
| 61 | - | |
| 62 | - // }, | |
| 63 | - // GetGiftPackList: function(getId, ojb) { | |
| 64 | - // //不销毁调整 | |
| 65 | - // uni.navigateTo({ | |
| 66 | - // url: 'pages/giftpack/giftpacklist/giftpacklist?isBuy=0&stoid=' + this.getStorageID + '&userid=' + this.getUserID + '&id=' + | |
| 67 | - // getId | |
| 68 | - // }); | |
| 69 | 41 | |
| 70 | - // }, | |
| 42 | + }, | |
| 71 | 43 | getList: function() { | 
| 72 | 44 | var th = this; | 
| 73 | - // if (th.data.loadingType) { | |
| 74 | - // return false; | |
| 75 | - // } | |
| 76 | - // // that.loadingType = 1; | |
| 77 | - // th.setData({ | |
| 78 | - // loadingType: 1 | |
| 79 | - // }) | |
| 45 | + wx.showLoading({ | |
| 46 | + title: '加载中', | |
| 47 | + }) | |
| 80 | 48 | getApp().request.get('/api/weshop/marketing/my/giftbag/page', { | 
| 81 | 49 | data: { | 
| 82 | - // "storeId": this.getStorageID, //商家ID | |
| 83 | - // "userId": this.getUserID, //用户ID | |
| 84 | - // "page": this.pages, | |
| 85 | - // "pageSize": this.pageSize | |
| 86 | 50 | storeId: th.data.getStorageID, //商家ID | 
| 87 | 51 | userId: th.data.getUserID, //用户ID | 
| 88 | 52 | page: th.data.curpage, | 
| ... | ... | @@ -108,47 +72,7 @@ Page({ | 
| 108 | 72 | is_read: 1 | 
| 109 | 73 | }) | 
| 110 | 74 | } | 
| 111 | - // if (res.data.code == 0) { | |
| 112 | - // if (res.data.data.total > 0) { | |
| 113 | - // // _this.isEmpty = false; | |
| 114 | - // _this.setData({ | |
| 115 | - // isEmpty: false | |
| 116 | - // }) | |
| 117 | - // } else { | |
| 118 | - // // _this.isEmpty = true; | |
| 119 | - // _this.setData({ | |
| 120 | - // isEmpty: true | |
| 121 | - // }) | |
| 122 | - // } | |
| 123 | - // if (res.data.data.pageData.length == 0) { | |
| 124 | - // // _this.loadingType = 2; | |
| 125 | - // _this.setData({ | |
| 126 | - // loadingType: 2 | |
| 127 | - // }) | |
| 128 | - // } else { | |
| 129 | - // var wareCard = that.wareCard; | |
| 130 | - // var is_resad = 0; | |
| 131 | - // // if (_this.wareCard.length < res.data.data.pageData.length) { | |
| 132 | - // if (wareCard.length < res.data.data.total) { | |
| 133 | - // for (var i = 0; i < res.data.data.pageData.length; i++) { | |
| 134 | - // wareCard.push(res.data.data.pageData[i]); | |
| 135 | - // } | |
| 136 | - // }else{ | |
| 137 | - // is_resad=1 | |
| 138 | - // } | |
| 139 | - // _this.setData({ | |
| 140 | - // wareCard: wareCard, | |
| 141 | - // is_resad: is_resad | |
| 142 | - // }) | |
| 143 | - | |
| 144 | - // // _this.loadingType = 0; | |
| 145 | - // _this.setData({ | |
| 146 | - // loadingType: 0 | |
| 147 | - // }) | |
| 148 | - // } | |
| 149 | - // } else { | |
| 150 | - | |
| 151 | - // } | |
| 75 | + | |
| 152 | 76 | } | 
| 153 | 77 | |
| 154 | 78 | }); | ... | ... | 
pages/giftpack/newvipgift/newvipgift.js
| ... | ... | @@ -28,7 +28,7 @@ Page({ | 
| 28 | 28 | integralTitle: "", | 
| 29 | 29 | growUpTitle: "", | 
| 30 | 30 | is_sub: 0, //是否重复领取 | 
| 31 | - | |
| 31 | + | |
| 32 | 32 | }, | 
| 33 | 33 | GetList: function() { | 
| 34 | 34 | var th = this; | 
| ... | ... | @@ -39,7 +39,7 @@ Page({ | 
| 39 | 39 | getApp().request.promiseGet(url, { | 
| 40 | 40 | data: { | 
| 41 | 41 | "actId": th.data.getActId, //活动id | 
| 42 | - "actType":1, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | |
| 42 | + "actType": 1, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | |
| 43 | 43 | "giftBagId": th.data.giftID, //礼包ID | 
| 44 | 44 | "storeId": a.stoid, //商家ID | 
| 45 | 45 | "userId": d.user_id //用户ID | 
| ... | ... | @@ -47,14 +47,14 @@ Page({ | 
| 47 | 47 | }).then(res => { | 
| 48 | 48 | wx.hideLoading(); | 
| 49 | 49 | if (res.data.code == 0) { | 
| 50 | - if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length>0) { | |
| 50 | + if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length > 0) { | |
| 51 | 51 | //礼包内容--礼券 | 
| 52 | 52 | th.setData({ | 
| 53 | 53 | cardShow: true, | 
| 54 | 54 | cards: res.data.data.lbCoupons | 
| 55 | 55 | }) | 
| 56 | 56 | } | 
| 57 | - if (res.data.data.lbSM != null && res.data.data.lbSM.length>0) { | |
| 57 | + if (res.data.data.lbSM != null && res.data.data.lbSM.length > 0) { | |
| 58 | 58 | //礼包内容--服务项目 | 
| 59 | 59 | th.setData({ | 
| 60 | 60 | itemShow: true, | 
| ... | ... | @@ -125,7 +125,7 @@ Page({ | 
| 125 | 125 | th.GetList(); | 
| 126 | 126 | }, | 
| 127 | 127 | onShow: function() { | 
| 128 | - | |
| 128 | + | |
| 129 | 129 | }, | 
| 130 | 130 | GetReceive: function() { | 
| 131 | 131 | var th = this; | 
| ... | ... | @@ -137,7 +137,9 @@ Page({ | 
| 137 | 137 | th.setData({ | 
| 138 | 138 | is_sub: 1 | 
| 139 | 139 | }) | 
| 140 | - | |
| 140 | + wx.showLoading({ | |
| 141 | + title: '加载中', | |
| 142 | + }) | |
| 141 | 143 | var json = { | 
| 142 | 144 | "actId": th.data.getActId, //活动Id | 
| 143 | 145 | "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 
| ... | ... | @@ -155,6 +157,7 @@ Page({ | 
| 155 | 157 | 'content-type': 'application/json' | 
| 156 | 158 | }, // 设置请求的 header | 
| 157 | 159 | success: function(res) { | 
| 160 | + wx.hideLoading(); | |
| 158 | 161 | th.setData({ | 
| 159 | 162 | is_sub: 0 | 
| 160 | 163 | }) | 
| ... | ... | @@ -164,19 +167,19 @@ Page({ | 
| 164 | 167 | }) | 
| 165 | 168 | getApp().my_warnning("领取成功", 1, th); | 
| 166 | 169 | } else { | 
| 167 | - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | |
| 170 | + getApp().my_warnning(res.data.msg, 0, th); | |
| 168 | 171 | } | 
| 169 | 172 | } | 
| 170 | 173 | }) | 
| 171 | 174 | } | 
| 172 | 175 | }, | 
| 173 | 176 | //界面跳转 | 
| 174 | - goto:function(e){ | |
| 177 | + goto: function(e) { | |
| 175 | 178 | var url = e.currentTarget.dataset.url; | 
| 176 | 179 | getApp().goto(url); | 
| 177 | 180 | }, | 
| 178 | 181 | //图片失败,默认图片 | 
| 179 | - bind_bnerr1: function (e) { | |
| 182 | + bind_bnerr1: function(e) { | |
| 180 | 183 | var th = this; | 
| 181 | 184 | var _errImg = e.target.dataset.errorimg; | 
| 182 | 185 | var _Img = e.target.dataset.img; | ... | ... | 
