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,7 +37,7 @@ Page({ | ||
| 37 | th.getList(); | 37 | th.getList(); |
| 38 | }, | 38 | }, |
| 39 | onShow: function() { | 39 | onShow: function() { |
| 40 | - | 40 | + |
| 41 | }, | 41 | }, |
| 42 | 42 | ||
| 43 | GetBuyPrice: function(e) { | 43 | GetBuyPrice: function(e) { |
| @@ -57,6 +57,9 @@ Page({ | @@ -57,6 +57,9 @@ Page({ | ||
| 57 | }, | 57 | }, |
| 58 | function() { | 58 | function() { |
| 59 | my_confirm.open_cancel(0); | 59 | my_confirm.open_cancel(0); |
| 60 | + wx.showLoading({ | ||
| 61 | + title: '加载中', | ||
| 62 | + }) | ||
| 60 | var json = { | 63 | var json = { |
| 61 | "actId": '', //活动Id | 64 | "actId": '', //活动Id |
| 62 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 65 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 |
| @@ -76,6 +79,7 @@ Page({ | @@ -76,6 +79,7 @@ Page({ | ||
| 76 | 'content-type': 'application/json' | 79 | 'content-type': 'application/json' |
| 77 | }, // 设置请求的 header | 80 | }, // 设置请求的 header |
| 78 | success: function(res) { | 81 | success: function(res) { |
| 82 | + wx.hideLoading(); | ||
| 79 | if (res.data.code == 0) { | 83 | if (res.data.code == 0) { |
| 80 | var order_sn = res.data.data.orderSn; | 84 | var order_sn = res.data.data.orderSn; |
| 81 | res = res.data.data.result; | 85 | res = res.data.data.result; |
| @@ -89,7 +93,9 @@ Page({ | @@ -89,7 +93,9 @@ Page({ | ||
| 89 | success: function(res) { | 93 | success: function(res) { |
| 90 | getApp().goto(url); | 94 | getApp().goto(url); |
| 91 | }, | 95 | }, |
| 92 | - fail: function(res) {} | 96 | + fail: function(res) { |
| 97 | + getApp().my_confirm("取消支付", 0, th); | ||
| 98 | + } | ||
| 93 | }); | 99 | }); |
| 94 | } else { | 100 | } else { |
| 95 | getApp().my_warnning(res.data.msg, 0, th); | 101 | getApp().my_warnning(res.data.msg, 0, th); |
| @@ -99,7 +105,6 @@ Page({ | @@ -99,7 +105,6 @@ Page({ | ||
| 99 | 105 | ||
| 100 | } | 106 | } |
| 101 | 107 | ||
| 102 | - | ||
| 103 | ) | 108 | ) |
| 104 | 109 | ||
| 105 | 110 | ||
| @@ -118,6 +123,9 @@ Page({ | @@ -118,6 +123,9 @@ Page({ | ||
| 118 | }, | 123 | }, |
| 119 | function() { | 124 | function() { |
| 120 | my_confirm.open_cancel(0); | 125 | my_confirm.open_cancel(0); |
| 126 | + wx.showLoading({ | ||
| 127 | + title: '加载中', | ||
| 128 | + }) | ||
| 121 | var json = { | 129 | var json = { |
| 122 | "actId": '', //活动Id | 130 | "actId": '', //活动Id |
| 123 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 131 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 |
| @@ -136,6 +144,7 @@ Page({ | @@ -136,6 +144,7 @@ Page({ | ||
| 136 | 'content-type': 'application/json' | 144 | 'content-type': 'application/json' |
| 137 | }, // 设置请求的 header | 145 | }, // 设置请求的 header |
| 138 | success: function(res) { | 146 | success: function(res) { |
| 147 | + wx.hideLoading(); | ||
| 139 | if (res.data.code == 0) { | 148 | if (res.data.code == 0) { |
| 140 | getApp().my_warnning("兑换成功!", 1, th); | 149 | getApp().my_warnning("兑换成功!", 1, th); |
| 141 | } else { | 150 | } else { |
| @@ -197,7 +206,7 @@ Page({ | @@ -197,7 +206,7 @@ Page({ | ||
| 197 | var th = this; | 206 | var th = this; |
| 198 | var url = e.currentTarget.dataset.url; | 207 | var url = e.currentTarget.dataset.url; |
| 199 | getApp().goto(url); | 208 | getApp().goto(url); |
| 200 | - | 209 | + |
| 201 | }, | 210 | }, |
| 202 | //下拉事件 | 211 | //下拉事件 |
| 203 | onReachBottom: function() { | 212 | onReachBottom: function() { |
pages/giftpack/giftpacklist/giftpacklist.js
| @@ -61,6 +61,9 @@ Page({ | @@ -61,6 +61,9 @@ Page({ | ||
| 61 | }, | 61 | }, |
| 62 | function() { | 62 | function() { |
| 63 | my_confirm.open_cancel(0); | 63 | my_confirm.open_cancel(0); |
| 64 | + wx.showLoading({ | ||
| 65 | + title: '加载中', | ||
| 66 | + }) | ||
| 64 | var json = { | 67 | var json = { |
| 65 | "actId": '', //活动Id | 68 | "actId": '', //活动Id |
| 66 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 69 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 |
| @@ -80,6 +83,7 @@ Page({ | @@ -80,6 +83,7 @@ Page({ | ||
| 80 | 'content-type': 'application/json' | 83 | 'content-type': 'application/json' |
| 81 | }, // 设置请求的 header | 84 | }, // 设置请求的 header |
| 82 | success: function(res) { | 85 | success: function(res) { |
| 86 | + wx.hideLoading(); | ||
| 83 | if (res.data.code == 0) { | 87 | if (res.data.code == 0) { |
| 84 | var res = res.data.data; | 88 | var res = res.data.data; |
| 85 | var order_sn = res.orderSn; | 89 | var order_sn = res.orderSn; |
| @@ -124,6 +128,9 @@ Page({ | @@ -124,6 +128,9 @@ Page({ | ||
| 124 | }, | 128 | }, |
| 125 | function() { | 129 | function() { |
| 126 | my_confirm.open_cancel(0); | 130 | my_confirm.open_cancel(0); |
| 131 | + wx.showLoading({ | ||
| 132 | + title: '加载中', | ||
| 133 | + }) | ||
| 127 | var json = { | 134 | var json = { |
| 128 | "actId": '', //活动Id | 135 | "actId": '', //活动Id |
| 129 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 136 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 |
| @@ -142,6 +149,7 @@ Page({ | @@ -142,6 +149,7 @@ Page({ | ||
| 142 | 'content-type': 'application/json' | 149 | 'content-type': 'application/json' |
| 143 | }, // 设置请求的 header | 150 | }, // 设置请求的 header |
| 144 | success: function(res) { | 151 | success: function(res) { |
| 152 | + wx.hideLoading(); | ||
| 145 | if (res.data.code == 0) { | 153 | if (res.data.code == 0) { |
| 146 | getApp().my_warnning("兑换成功!", 1, th); | 154 | getApp().my_warnning("兑换成功!", 1, th); |
| 147 | } else { | 155 | } else { |
| @@ -157,6 +165,9 @@ Page({ | @@ -157,6 +165,9 @@ Page({ | ||
| 157 | GetMyGiftList: function() { | 165 | GetMyGiftList: function() { |
| 158 | var _this = this; | 166 | var _this = this; |
| 159 | var th = this; | 167 | var th = this; |
| 168 | + wx.showLoading({ | ||
| 169 | + title: '加载中', | ||
| 170 | + }) | ||
| 160 | getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', { | 171 | getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', { |
| 161 | data: { | 172 | data: { |
| 162 | "storeId": a.stoid, //商家ID | 173 | "storeId": a.stoid, //商家ID |
| @@ -164,6 +175,7 @@ Page({ | @@ -164,6 +175,7 @@ Page({ | ||
| 164 | "orderSn": th.data.orderSn | 175 | "orderSn": th.data.orderSn |
| 165 | }, | 176 | }, |
| 166 | success: function success(res) { | 177 | success: function success(res) { |
| 178 | + wx.hideLoading(); | ||
| 167 | if (res.data.code == 0) { | 179 | if (res.data.code == 0) { |
| 168 | th.setData({ | 180 | th.setData({ |
| 169 | giftImage: th.data.iurl + res.data.data.lbUrl, | 181 | giftImage: th.data.iurl + res.data.data.lbUrl, |
| @@ -279,6 +291,9 @@ Page({ | @@ -279,6 +291,9 @@ Page({ | ||
| 279 | //获取核销码 | 291 | //获取核销码 |
| 280 | getcode: function() { | 292 | getcode: function() { |
| 281 | var th = this; | 293 | var th = this; |
| 294 | + wx.showLoading({ | ||
| 295 | + title: '加载中', | ||
| 296 | + }) | ||
| 282 | var orderSn = th.data.orderSn; //订单号 | 297 | var orderSn = th.data.orderSn; //订单号 |
| 283 | var json = { | 298 | var json = { |
| 284 | "storeId": a.stoid, | 299 | "storeId": a.stoid, |
| @@ -294,6 +309,7 @@ Page({ | @@ -294,6 +309,7 @@ Page({ | ||
| 294 | 'content-type': 'application/json' | 309 | 'content-type': 'application/json' |
| 295 | }, // 设置请求的 header | 310 | }, // 设置请求的 header |
| 296 | success: function(res) { | 311 | success: function(res) { |
| 312 | + wx.hideLoading(); | ||
| 297 | if (res.data.code == 0) { | 313 | if (res.data.code == 0) { |
| 298 | th.setData({ | 314 | th.setData({ |
| 299 | code: res.data.data | 315 | code: res.data.data |
pages/giftpack/mygiftpack/mygiftpack.js
| @@ -28,8 +28,6 @@ Page({ | @@ -28,8 +28,6 @@ Page({ | ||
| 28 | }, | 28 | }, |
| 29 | 29 | ||
| 30 | onLoad: function(options) { | 30 | onLoad: function(options) { |
| 31 | - // this.getStorageID = options.stoid; | ||
| 32 | - // this.getUserID = options.userid; | ||
| 33 | var th = this; | 31 | var th = this; |
| 34 | th.setData({ | 32 | th.setData({ |
| 35 | getStorageID: a.stoid, | 33 | getStorageID: a.stoid, |
| @@ -40,49 +38,15 @@ Page({ | @@ -40,49 +38,15 @@ Page({ | ||
| 40 | th.getList(); | 38 | th.getList(); |
| 41 | }, | 39 | }, |
| 42 | onShow: function() { | 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 | getList: function() { | 43 | getList: function() { |
| 72 | var th = this; | 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 | getApp().request.get('/api/weshop/marketing/my/giftbag/page', { | 48 | getApp().request.get('/api/weshop/marketing/my/giftbag/page', { |
| 81 | data: { | 49 | data: { |
| 82 | - // "storeId": this.getStorageID, //商家ID | ||
| 83 | - // "userId": this.getUserID, //用户ID | ||
| 84 | - // "page": this.pages, | ||
| 85 | - // "pageSize": this.pageSize | ||
| 86 | storeId: th.data.getStorageID, //商家ID | 50 | storeId: th.data.getStorageID, //商家ID |
| 87 | userId: th.data.getUserID, //用户ID | 51 | userId: th.data.getUserID, //用户ID |
| 88 | page: th.data.curpage, | 52 | page: th.data.curpage, |
| @@ -108,47 +72,7 @@ Page({ | @@ -108,47 +72,7 @@ Page({ | ||
| 108 | is_read: 1 | 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,7 +28,7 @@ Page({ | ||
| 28 | integralTitle: "", | 28 | integralTitle: "", |
| 29 | growUpTitle: "", | 29 | growUpTitle: "", |
| 30 | is_sub: 0, //是否重复领取 | 30 | is_sub: 0, //是否重复领取 |
| 31 | - | 31 | + |
| 32 | }, | 32 | }, |
| 33 | GetList: function() { | 33 | GetList: function() { |
| 34 | var th = this; | 34 | var th = this; |
| @@ -39,7 +39,7 @@ Page({ | @@ -39,7 +39,7 @@ Page({ | ||
| 39 | getApp().request.promiseGet(url, { | 39 | getApp().request.promiseGet(url, { |
| 40 | data: { | 40 | data: { |
| 41 | "actId": th.data.getActId, //活动id | 41 | "actId": th.data.getActId, //活动id |
| 42 | - "actType":1, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | 42 | + "actType": 1, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 |
| 43 | "giftBagId": th.data.giftID, //礼包ID | 43 | "giftBagId": th.data.giftID, //礼包ID |
| 44 | "storeId": a.stoid, //商家ID | 44 | "storeId": a.stoid, //商家ID |
| 45 | "userId": d.user_id //用户ID | 45 | "userId": d.user_id //用户ID |
| @@ -47,14 +47,14 @@ Page({ | @@ -47,14 +47,14 @@ Page({ | ||
| 47 | }).then(res => { | 47 | }).then(res => { |
| 48 | wx.hideLoading(); | 48 | wx.hideLoading(); |
| 49 | if (res.data.code == 0) { | 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 | th.setData({ | 52 | th.setData({ |
| 53 | cardShow: true, | 53 | cardShow: true, |
| 54 | cards: res.data.data.lbCoupons | 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 | th.setData({ | 59 | th.setData({ |
| 60 | itemShow: true, | 60 | itemShow: true, |
| @@ -125,7 +125,7 @@ Page({ | @@ -125,7 +125,7 @@ Page({ | ||
| 125 | th.GetList(); | 125 | th.GetList(); |
| 126 | }, | 126 | }, |
| 127 | onShow: function() { | 127 | onShow: function() { |
| 128 | - | 128 | + |
| 129 | }, | 129 | }, |
| 130 | GetReceive: function() { | 130 | GetReceive: function() { |
| 131 | var th = this; | 131 | var th = this; |
| @@ -137,7 +137,9 @@ Page({ | @@ -137,7 +137,9 @@ Page({ | ||
| 137 | th.setData({ | 137 | th.setData({ |
| 138 | is_sub: 1 | 138 | is_sub: 1 |
| 139 | }) | 139 | }) |
| 140 | - | 140 | + wx.showLoading({ |
| 141 | + title: '加载中', | ||
| 142 | + }) | ||
| 141 | var json = { | 143 | var json = { |
| 142 | "actId": th.data.getActId, //活动Id | 144 | "actId": th.data.getActId, //活动Id |
| 143 | "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 145 | "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 |
| @@ -155,6 +157,7 @@ Page({ | @@ -155,6 +157,7 @@ Page({ | ||
| 155 | 'content-type': 'application/json' | 157 | 'content-type': 'application/json' |
| 156 | }, // 设置请求的 header | 158 | }, // 设置请求的 header |
| 157 | success: function(res) { | 159 | success: function(res) { |
| 160 | + wx.hideLoading(); | ||
| 158 | th.setData({ | 161 | th.setData({ |
| 159 | is_sub: 0 | 162 | is_sub: 0 |
| 160 | }) | 163 | }) |
| @@ -164,19 +167,19 @@ Page({ | @@ -164,19 +167,19 @@ Page({ | ||
| 164 | }) | 167 | }) |
| 165 | getApp().my_warnning("领取成功", 1, th); | 168 | getApp().my_warnning("领取成功", 1, th); |
| 166 | } else { | 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 | var url = e.currentTarget.dataset.url; | 178 | var url = e.currentTarget.dataset.url; |
| 176 | getApp().goto(url); | 179 | getApp().goto(url); |
| 177 | }, | 180 | }, |
| 178 | //图片失败,默认图片 | 181 | //图片失败,默认图片 |
| 179 | - bind_bnerr1: function (e) { | 182 | + bind_bnerr1: function(e) { |
| 180 | var th = this; | 183 | var th = this; |
| 181 | var _errImg = e.target.dataset.errorimg; | 184 | var _errImg = e.target.dataset.errorimg; |
| 182 | var _Img = e.target.dataset.img; | 185 | var _Img = e.target.dataset.img; |