Commit 774042f5b0795d6e80d0508a7c6c4402b7346bb2
1 parent
53aab7fd
新人有礼提示语修改
Showing
1 changed file
with
12 additions
and
9 deletions
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; |