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 | 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; | ... | ... |