Commit 4df2b4fe90b655a43d88e634395741e7d254aaeb
1 parent
8c6d0b2c
评价有礼和生日有礼的代码修改
Showing
7 changed files
with
532 additions
and
495 deletions
pages/giftpack/birthdaygift/birthdaygift.js
1 | -var _default = | |
2 | -{ | |
3 | - data: function data() { | |
4 | - return { | |
5 | - itemShow: false, //项目栏目是否显示 | |
6 | - cardShow: false, //代金券栏目是否显示 | |
7 | - packShow: false, //福利栏目是否显示 | |
8 | - textShow: false, //规则是否显示 | |
9 | - integralShow: true, //积分领取是否显示 | |
10 | - growUpShow: true, //成长值领取是否显示 | |
11 | - itemButton: '', | |
12 | - cardButton: '', | |
13 | - getActId: '', | |
14 | - getActType: '', | |
15 | - giftID: '', | |
16 | - getUserID: '', | |
17 | - getStorageID: '', | |
18 | - receiveState: '已领取', | |
19 | - integralTitle: '已领取', | |
20 | - growUpTitle: '已领取', | |
21 | - textTitle: '', | |
22 | - getUrl: '', | |
23 | - noShow: false, | |
24 | - //判断中间的连接线是否显示 | |
25 | - itemShows: function itemShows() { | |
26 | - if (this.itemShow) { | |
27 | - if (this.cardShow) { | |
28 | - return true; | |
1 | +var i = require("../../../utils/util.js") | |
2 | +var e = getApp(), | |
3 | + a = e.globalData.setting, | |
4 | + os = a, | |
5 | + t = e.request, | |
6 | + d = e.globalData; | |
7 | +Page({ | |
8 | + data: { | |
9 | + url: a.url, //接口网址 | |
10 | + iurl: a.imghost, //图片前缀网址 | |
11 | + itemShow: false, //项目栏目是否显示 | |
12 | + cardShow: false, //代金券栏目是否显示 | |
13 | + packShow: false, //福利栏目是否显示 | |
14 | + textShow: false, //规则是否显示 | |
15 | + integralShow: true, //积分领取是否显示 | |
16 | + growUpShow: true, //成长值领取是否显示 | |
17 | + itemButton: '', | |
18 | + cardButton: '', | |
19 | + getActId: '', | |
20 | + getActType: '', | |
21 | + giftID: '', | |
22 | + receiveState: '一键全部领取', | |
23 | + textTitle: '', | |
24 | + getUrl: '', | |
25 | + noShow: false, | |
26 | + cards: [], //礼包内容--礼券 | |
27 | + itemWare: [], //礼包内容--服务项目 | |
28 | + integralTitle: "", | |
29 | + growUpTitle: "", | |
30 | + is_sub: 0, //是否重复领取 | |
31 | + }, | |
32 | + GetList: function () { | |
33 | + var th = this; | |
34 | + var url = "/api/weshop/marketing/giftbag/bound/get"; | |
35 | + getApp().request.promiseGet(url, { | |
36 | + data: { | |
37 | + "actId": th.data.getActId, //活动id | |
38 | + "actType": th.data.getActType, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | |
39 | + "giftBagId": th.data.giftID, //礼包ID | |
40 | + "storeId": a.stoid, //商家ID | |
41 | + "userId": d.user_id //用户ID | |
42 | + } | |
43 | + }).then(res => { | |
44 | + if (res.data.code == 0) { | |
45 | + if (res.data.data.lbCoupons != null) { | |
46 | + //礼包内容--礼券 | |
47 | + th.setData({ | |
48 | + cardShow: true, | |
49 | + cards: res.data.data.lbCoupons | |
50 | + }) | |
51 | + } | |
52 | + if (res.data.data.lbSM != null) { | |
53 | + //礼包内容--服务项目 | |
54 | + th.setData({ | |
55 | + itemShow: true, | |
56 | + itemWare: res.data.data.lbSM | |
57 | + }) | |
58 | + } | |
59 | + //礼包积分 | |
60 | + if (res.data.data.lbIntegral <= 0) { | |
61 | + if (res.data.data.lbGrowthValue <= 0) { | |
62 | + th.setData({ | |
63 | + packShow: false | |
64 | + }) | |
29 | 65 | } else { |
30 | - return false; | |
66 | + th.setData({ | |
67 | + packShow: false, | |
68 | + integralShow: false, | |
69 | + growUpShow: true | |
70 | + }) | |
31 | 71 | } |
72 | + | |
32 | 73 | } else { |
33 | - if (this.cardShow) { | |
34 | - return false; | |
74 | + if (res.data.data.lbGrowthValue > 0) { | |
75 | + th.setData({ | |
76 | + packShow: true | |
77 | + }) | |
35 | 78 | } else { |
36 | - return false; | |
79 | + th.setData({ | |
80 | + packShow: true, | |
81 | + integralShow: true, | |
82 | + growUpShow: false | |
83 | + }) | |
37 | 84 | } |
38 | - | |
39 | 85 | } |
40 | - }, | |
41 | - //判断中间的连接线是否显示 | |
42 | - cardShows: function cardShows() { | |
43 | - if (this.cardShow) { | |
44 | - if (this.packShow) { | |
45 | - return true; | |
46 | - } else { | |
47 | - return false; | |
48 | - } | |
86 | + th.setData({ | |
87 | + integralTitle: '领取' + res.data.data.lbIntegral + '积分', | |
88 | + growUpTitle: '领取' + res.data.data.lbGrowthValue + '成长值' | |
89 | + }) | |
90 | + if (res.data.data.receiveState == 0) { | |
91 | + th.setData({ | |
92 | + receiveState: '一键全部领取' | |
93 | + }) | |
49 | 94 | } else { |
50 | - if (this.packShow) { | |
51 | - return false; | |
52 | - } else { | |
53 | - return false; | |
54 | - } | |
55 | - | |
95 | + th.setData({ | |
96 | + receiveState: '已领取' | |
97 | + }) | |
56 | 98 | } |
57 | - }, | |
58 | - cards: [], | |
59 | - itemWare: [] | |
60 | - }; | |
61 | - | |
62 | - | |
63 | - | |
64 | - }, | |
65 | - onLoad: function onLoad(options) { | |
66 | - | |
67 | - // 获取url对应的参数 | |
68 | - // this.getActId = this.GetQueryString('actId'); //活动id | |
69 | - // this.getActType = this.GetQueryString('actType'); //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | |
70 | - // this.giftID = this.GetQueryString('giftID'); //礼包ID | |
71 | - // this.getStorageID = this.GetQueryString('storageID'); //商家ID | |
72 | - // this.getUserID = this.GetQueryString('userID'); //用户ID | |
73 | - | |
74 | - this.getActId = options.actId; //活动id | |
75 | - this.getActType = options.actType; //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | |
76 | - this.giftID = options.giftBagId; //礼包ID | |
77 | - this.getStorageID = options.storeId; //商家ID | |
78 | - this.getUserID = options.userId; //用户ID | |
79 | - | |
80 | - this.GetList(); | |
81 | 99 | |
100 | + if (res.data.data.actIntro != '') { | |
101 | + th.setData({ | |
102 | + textShow: true, | |
103 | + textTitle: res.data.data.actIntro | |
104 | + }) | |
105 | + } | |
106 | + } else { | |
107 | + getApp().my_warnning(res.data.msg, 0, th); | |
108 | + return false; | |
109 | + } | |
110 | + }) | |
82 | 111 | }, |
83 | - onShow: function onShow() { | |
84 | - if (this.textTitle == '') { | |
85 | - this.textTitle = '暂无详情......'; | |
112 | + //判断中间的连接线是否显示 | |
113 | + itemShows: function () { | |
114 | + if (this.itemShow) { | |
115 | + if (this.cardShow) { | |
116 | + return true; | |
117 | + } else { | |
118 | + return false; | |
119 | + } | |
86 | 120 | } else { |
87 | - this.textTitle = this.textTitle.replace(/<p><img/gi, "<p class='img'><img"); | |
121 | + if (this.cardShow) { | |
122 | + return false; | |
123 | + } else { | |
124 | + return false; | |
125 | + } | |
126 | + | |
88 | 127 | } |
89 | 128 | }, |
90 | - methods: { | |
91 | - | |
92 | - getQueryString: function getQueryString(name) { | |
93 | - var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); | |
94 | - var r = window.location.search.substr(1).match(reg); | |
95 | - if (r != null) { | |
96 | - return unescape(r[2]); | |
129 | + //判断中间的连接线是否显示 | |
130 | + cardShows: function () { | |
131 | + if (this.cardShow) { | |
132 | + if (this.packShow) { | |
133 | + return true; | |
134 | + } else { | |
135 | + return false; | |
97 | 136 | } |
98 | - return null; | |
99 | - }, | |
100 | - | |
101 | - GetList: function GetList() { | |
102 | - var _this = this; | |
103 | - uni.request({ | |
104 | - url: this.$GetInfo.ApiHttp + '/api/weshop/marketing/giftbag/bound/get', | |
105 | - data: { | |
106 | - "actId": this.getActId, //活动id | |
107 | - "actType": this.getActType, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | |
108 | - "giftBagId": this.giftID, //礼包ID | |
109 | - "storeId": this.getStorageID, //商家ID | |
110 | - "userId": this.getUserID //用户ID | |
111 | - }, | |
112 | - method: 'GET', | |
113 | - header: { | |
114 | - 'Content-Type': 'application/x-www-form-urlencoded' //自定义请求头信息 | |
115 | - }, | |
116 | - success: function success(res) { | |
117 | - console.log(res.data); | |
118 | - if (res.data.code == 0) { | |
119 | - if (res.data.data.lbCoupons != null) { | |
120 | - _this.cardShow = true; | |
121 | - _this.cards = res.data.data.lbCoupons; | |
122 | - } | |
123 | - if (res.data.data.lbSM != null) { | |
124 | - _this.itemShow = true; | |
125 | - _this.itemWare = res.data.data.lbSM; | |
126 | - } | |
127 | - if (res.data.data.lbIntegral <= 0) { | |
128 | - if (res.data.data.lbGrowthValue <= 0) { | |
129 | - _this.packShow = false; | |
130 | - } else { | |
131 | - _this.packShow = true; | |
132 | - _this.integralShow = false; | |
133 | - _this.growUpShow = true; | |
134 | - } | |
135 | - | |
136 | - } else { | |
137 | - if (res.data.data.lbGrowthValue > 0) { | |
138 | - _this.packShow = true; | |
139 | - } else { | |
140 | - _this.packShow = true; | |
141 | - _this.integralShow = true; | |
142 | - _this.growUpShow = false; | |
143 | - } | |
144 | - } | |
145 | - | |
146 | - _this.integralTitle = '领取' + res.data.data.lbIntegral + '积分'; | |
147 | - _this.growUpTitle = '领取' + res.data.data.lbGrowthValue + '积分'; | |
148 | - if (res.data.data.receiveState == 0) { | |
149 | - _this.receiveState = '一键全部领取'; | |
150 | - } else { | |
151 | - _this.receiveState = '已领取'; | |
152 | - } | |
153 | - | |
154 | - | |
155 | - if (res.data.data.actIntro != '') { | |
156 | - _this.textShow = true; | |
157 | - _this.textTitle = res.data.data.actIntro; | |
158 | - } | |
159 | - | |
160 | - } else { | |
161 | - console.log(res.data.msg); | |
162 | - } | |
163 | - } | |
164 | - }); | |
165 | - | |
166 | - }, | |
167 | - GetWebHttp: function GetWebHttp() { | |
168 | - this.getUrl = this.$GetInfo.HtmlHttp + '/mobile/index/index/stoid/' + this.getStorageID + '.html'; | |
169 | - window.location.href = this.getUrl; | |
170 | - }, | |
171 | - GetReceive: function GetReceive() { | |
172 | - var that = this; | |
173 | - if (that.receiveState == '已领取') { | |
137 | + } else { | |
138 | + if (this.packShow) { | |
139 | + return false; | |
140 | + } else { | |
174 | 141 | return false; |
175 | 142 | } |
176 | - uni.request({ | |
177 | - url: that.$GetInfo.ApiHttp + '/api/weshop/marketing/free/receive/gift/record/insert', | |
178 | - data: { | |
179 | - "actId": that.getActId, //活动Id | |
180 | - "actType": '4', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | |
181 | - "lbId": that.giftID, //礼包Id | |
182 | - "storeId": that.getStorageID, //商家Id | |
183 | - "userId": that.getUserID //用户ID | |
184 | - }, | |
185 | - method: 'POST', | |
143 | + | |
144 | + } | |
145 | + }, | |
146 | + | |
147 | + onLoad: function onLoad(options) { | |
148 | + var th = this; | |
149 | + th.setData({ | |
150 | + getActId: options.actId, | |
151 | + getActType: options.actType, | |
152 | + giftID: options.giftBagId | |
153 | + }) | |
154 | + th.GetList(); | |
155 | + }, | |
156 | + onShow: function onShow() { | |
157 | + var th = this; | |
158 | + var textTitle = th.data.textTitle.replace(/<p><img/gi, "<p class='img'><img"); | |
159 | + th.setData({ | |
160 | + textTitle: textTitle | |
161 | + }) | |
162 | + }, | |
163 | + GetReceive: function () { | |
164 | + var th = this; | |
165 | + if (th.data.receiveState == '已领取') { | |
166 | + return false; | |
167 | + } | |
168 | + var is_sub = th.data.is_sub; //判断是否重复提交 | |
169 | + if (is_sub == 0) { | |
170 | + th.setData({ | |
171 | + is_sub: 1 | |
172 | + }) | |
173 | + | |
174 | + var json = { | |
175 | + "actId": th.data.getActId, //活动Id | |
176 | + "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | |
177 | + "lbId": th.data.giftID, //礼包Id | |
178 | + "storeId": a.stoid, //商家Id | |
179 | + "userId": d.user_id //用户ID | |
180 | + }; | |
181 | + var data = JSON.stringify(json); | |
182 | + var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert"; | |
183 | + wx.request({ | |
184 | + url: url, | |
185 | + data: data, | |
186 | + method: 'post', | |
186 | 187 | header: { |
187 | - 'Content-Type': 'application/json' //自定义请求头信息 | |
188 | - }, | |
189 | - success: function success(res) { | |
190 | - console.log(res.data); | |
188 | + 'content-type': 'application/json' | |
189 | + }, // 设置请求的 header | |
190 | + success: function (res) { | |
191 | + th.setData({ | |
192 | + is_sub: 0 | |
193 | + }) | |
191 | 194 | if (res.data.code == 0) { |
192 | - console.log(res.data.msg); | |
193 | - that.receiveState = '已领取'; | |
194 | - uni.showToast({ | |
195 | - icon: 'none', | |
196 | - title: '领取成功!' | |
197 | - }); | |
198 | - | |
195 | + th.setData({ | |
196 | + receiveState: '已领取' | |
197 | + }) | |
198 | + getApp().my_warnning("领取成功", 1, th); | |
199 | 199 | } else { |
200 | - console.log(res.data.msg); | |
201 | - uni.showToast({ | |
202 | - icon: 'none', | |
203 | - title: res.data.msg | |
204 | - }); | |
205 | - | |
200 | + getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | |
206 | 201 | } |
207 | 202 | } |
208 | - }); | |
209 | - | |
203 | + }) | |
210 | 204 | } |
211 | - } | |
212 | -}; | |
213 | 205 | \ No newline at end of file |
206 | + }, | |
207 | + //界面跳转 | |
208 | + goto: function (e) { | |
209 | + var url = e.currentTarget.dataset.url; | |
210 | + getApp().goto(url); | |
211 | + }, | |
212 | + //图片失败,默认图片 | |
213 | + bind_bnerr1: function (e) { | |
214 | + var th = this; | |
215 | + var _errImg = e.target.dataset.errorimg; | |
216 | + var _Img = e.target.dataset.img; | |
217 | + if (_Img != undefined) { | |
218 | + var _errObj = {}; | |
219 | + _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png"; | |
220 | + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
221 | + } | |
222 | + }, | |
223 | +}); | |
214 | 224 | \ No newline at end of file | ... | ... |
pages/giftpack/birthdaygift/birthdaygift.json
pages/giftpack/birthdaygift/birthdaygift.wxml
1 | -<view > | |
2 | - <view class="image_box "> | |
3 | - <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/birth00.png'}}" ></image> | |
1 | +<view> | |
2 | + <view class="image_box"> | |
3 | + <image src="{{iurl+'/miniapp/images/giftbag/vip00.png'}}" lazy-load="true"></image> | |
4 | 4 | </view> |
5 | - <block wx:if="{{this.itemShow}}"> | |
6 | - <view class="top "> | |
7 | - <view class="top_box "> | |
8 | - <view class="top_box_text "> | |
9 | - <text >______</text> | |
5 | + <block wx:if="{{itemShow}}"> | |
6 | + <view class="top"> | |
7 | + <view class="top_box"> | |
8 | + <view class="top_box_text"> | |
9 | + <text>______</text> | |
10 | 10 | </view> |
11 | - <view class="top_box_text "> | |
12 | - <text >新人专享\n你的美丽我来缔造</text> | |
11 | + <view class="top_box_text"> | |
12 | + <text>新人专享\n你的美丽我来缔造</text> | |
13 | 13 | </view> |
14 | - <view class="top_box_text "> | |
14 | + <view class="top_box_text"> | |
15 | 15 | <text >______</text> |
16 | 16 | </view> |
17 | 17 | </view> |
18 | 18 | <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
19 | 19 | <view class="top_item "> |
20 | 20 | <block wx:if="{{item.lbType==3}}"> |
21 | - <view class="top_item_img "> | |
22 | - <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift02.png'}}" ></image> | |
21 | + <view class="top_item_img"> | |
22 | + <image src="{{item.fromImage=='' || item.fromImage==null?iurl+'/miniapp/images/giftbag/gift02.png':iurl+item.fromImage}}" lazy-load="true" data-errorimg="itemWare[{{index}}].fromImage" binderror="bind_bnerr1" data-img="{{item.fromImage}}"></image> | |
23 | 23 | </view> |
24 | 24 | </block> |
25 | 25 | <block wx:if="{{item.lbType==1}}"> |
26 | 26 | <view class="top_item_img "> |
27 | - <image src="{{item.fromImage==''?$GetInfo.imgHttp+'/miniapp/images/giftbag/empty.jpg':$GetInfo.imgHttp+item.fromImage}}" ></image> | |
27 | + <image src="{{item.fromImage==''?iurl+'/miniapp/images/giftbag/empty.jpg':iurl+item.fromImage}}" lazy-load="true"></image> | |
28 | 28 | </view> |
29 | 29 | </block> |
30 | 30 | <view class="top_item_center "> |
31 | - <view class="top_item_center_title "> | |
31 | + <view class="top_item_center_title"> | |
32 | 32 | <block wx:if="{{item.lbType==1}}"> |
33 | - <text >免费领取</text> | |
33 | + <text>免费领取</text> | |
34 | 34 | </block> |
35 | 35 | <block wx:if="{{item.lbType==3}}"> |
36 | - <text >{{item.fromName}}</text> | |
36 | + <text>{{item.fromName}}</text> | |
37 | 37 | </block> |
38 | 38 | </view> |
39 | 39 | <view class="top_item_center_ramke "> |
40 | 40 | <block wx:if="{{item.lbType==1}}"> |
41 | - <text >{{item.fromName}}</text> | |
41 | + <text>{{item.fromName}}</text> | |
42 | 42 | </block> |
43 | 43 | <block wx:if="{{item.lbType==3}}"> |
44 | 44 | <text >{{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text> |
... | ... | @@ -49,13 +49,13 @@ |
49 | 49 | </block> |
50 | 50 | </view> |
51 | 51 | </block> |
52 | - <block wx:if="{{$root.g0}}"> | |
52 | + <block wx:if="{{true}}"> | |
53 | 53 | <view > |
54 | - <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/birth01.png'}}" ></image> | |
55 | - <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/birth01.png'}}" ></image> | |
54 | + <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | |
55 | + <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | |
56 | 56 | </view> |
57 | 57 | </block> |
58 | - <block wx:if="{{this.cardShow}}"> | |
58 | + <block wx:if="{{cardShow}}"> | |
59 | 59 | <view > |
60 | 60 | <view class="top "> |
61 | 61 | <view class="top_box "> |
... | ... | @@ -71,22 +71,23 @@ |
71 | 71 | </view> |
72 | 72 | <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
73 | 73 | <view class="top_card "> |
74 | - <view class="{{['',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}"> | |
74 | + <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}"> | |
75 | + <!-- class="{{['',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}" --> | |
75 | 76 | <view class="top_card_tite_box "> |
76 | 77 | <block wx:if="{{item.useObjectType==0}}"> |
77 | - <view class="top_card_tite_a ">全场通用</view> | |
78 | + <view class="top_card_tite_a">全场通用</view> | |
78 | 79 | </block> |
79 | 80 | <block wx:if="{{item.useObjectType==1}}"> |
80 | - <view class="top_card_tite_b ">品牌限定</view> | |
81 | + <view class="top_card_tite_b">品牌限定</view> | |
81 | 82 | </block> |
82 | 83 | <block wx:if="{{item.useObjectType==2}}"> |
83 | - <view class="top_card_tite_c ">品类限定</view> | |
84 | + <view class="top_card_tite_c">品类限定</view> | |
84 | 85 | </block> |
85 | 86 | <block wx:if="{{item.useObjectType==11}}"> |
86 | - <view class="top_card_tite_a ">用途限定</view> | |
87 | + <view class="top_card_tite_a">用途限定</view> | |
87 | 88 | </block> |
88 | 89 | <block wx:if="{{item.useObjectType==12}}"> |
89 | - <view class="top_card_tite_a ">分类1限定</view> | |
90 | + <view class="top_card_tite_a">分类限定</view> | |
90 | 91 | </block> |
91 | 92 | </view> |
92 | 93 | <view class="top_card_counte ">{{item.sum+"元券"}}</view> |
... | ... | @@ -97,15 +98,15 @@ |
97 | 98 | </view> |
98 | 99 | </view> |
99 | 100 | </block> |
100 | - <block wx:if="{{$root.g1}}"> | |
101 | - <view > | |
102 | - <view > | |
103 | - <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/birth01.png'}}" ></image> | |
104 | - <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/birth01.png'}}" ></image> | |
101 | + <block wx:if="{{true}}"> | |
102 | + <view> | |
103 | + <view> | |
104 | + <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | |
105 | + <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | |
105 | 106 | </view> |
106 | 107 | </view> |
107 | 108 | </block> |
108 | - <block wx:if="{{this.packShow}}"> | |
109 | + <block wx:if="{{packShow}}"> | |
109 | 110 | <view > |
110 | 111 | <view class="top "> |
111 | 112 | <view class="top_box "> |
... | ... | @@ -119,47 +120,50 @@ |
119 | 120 | <text >———</text> |
120 | 121 | </view> |
121 | 122 | </view> |
122 | - <block wx:if="{{this.integralShow}}"> | |
123 | - <view > | |
123 | + <block wx:if="{{integralShow}}"> | |
124 | + <view> | |
124 | 125 | <view class="top_box_image "> |
125 | - <image src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/vip06.jpg'}}" ></image> | |
126 | - <button >{{this.integralTitle}}</button> | |
126 | + <image src="{{iurl+'/miniapp/images/giftbag/vip06.jpg'}}" lazy-load="true"></image> | |
127 | + <button>{{integralTitle}}</button> | |
127 | 128 | </view> |
128 | 129 | </view> |
129 | 130 | </block> |
130 | - <block wx:if="{{this.growUpShow}}"> | |
131 | + <block wx:if="{{growUpShow}}"> | |
131 | 132 | <view > |
132 | - <view class="top_box_image "> | |
133 | - <image src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/vip07.jpg'}}" ></image> | |
134 | - <button >{{this.growUpTitle}}</button> | |
133 | + <view class="top_box_image fs36"> | |
134 | + <image src="{{iurl+'/miniapp/images/giftbag/vip07.jpg'}}" lazy-load="true"></image> | |
135 | + <button>{{growUpTitle}}</button> | |
135 | 136 | </view> |
136 | 137 | </view> |
137 | 138 | </block> |
138 | 139 | </view> |
139 | 140 | </view> |
140 | 141 | </block> |
141 | - <block wx:if="{{this.textShow}}"> | |
142 | - <view class="foot_box "> | |
143 | - <view class="foot_box_title "> | |
144 | - <text >活动规则:</text> | |
142 | + <block wx:if="{{textShow}}"> | |
143 | + <view class="foot_box"> | |
144 | + <view class="foot_box_title fs36"> | |
145 | + <text>活动规则:</text> | |
145 | 146 | </view> |
146 | - <view class="foot_box_text "> | |
147 | - <rich-text nodes="{{this.textTitle}}"></rich-text> | |
147 | + <view class="foot_box_text"> | |
148 | + <rich-text nodes="{{textTitle}}"></rich-text> | |
148 | 149 | </view> |
149 | 150 | </view> |
150 | 151 | </block> |
151 | - <view class="button_box "> | |
152 | + <view class="button_box"> | |
152 | 153 | <view > |
153 | - <button data-event-opts="{{[['tap',[['GetWebHttp',['$event']]]]]}}" class="button " bindtap="__e">进入商城购物</button> | |
154 | + <button class="button" bindtap="goto" data-url="/pages/index/index/index">进入商城购物</button> | |
154 | 155 | </view> |
155 | 156 | <view class="button_text "> |
156 | 157 | <text >本活动最终解释权归公司所有,如果有问题请联系客服</text> |
157 | 158 | </view> |
158 | 159 | </view> |
159 | 160 | <view class="foot_empty "></view> |
160 | - <view class="foot_button "> | |
161 | - <view class="{{['',this.receiveState=='已领取'?'foot_button_notbuy':'foot_button_buy']}}"> | |
162 | - <text data-event-opts="{{[['tap',[['GetReceive',['$event']]]]]}}" bindtap="__e" >{{this.receiveState}}</text> | |
161 | + <view class="foot_button"> | |
162 | + <view class="{{receiveState=='已领取'?'foot_button_notbuy':'foot_button_buy'}}" bindtap="GetReceive"> | |
163 | + <text>{{receiveState}}</text> | |
163 | 164 | </view> |
164 | 165 | </view> |
165 | -</view> | |
166 | 166 | \ No newline at end of file |
167 | +</view> | |
168 | +<!-- 引入提示组件 --> | |
169 | +<warn id="warn"></warn> | |
170 | +<my_confirm id="my_confirm"></my_confirm> | |
167 | 171 | \ No newline at end of file | ... | ... |
pages/giftpack/evaluategift/evaluategift.js
1 | -var _default = | |
2 | -{ | |
3 | - data: function data() { | |
4 | - return { | |
5 | - itemShow: false, //项目栏目是否显示 | |
6 | - cardShow: false, //代金券栏目是否显示 | |
7 | - packShow: false, //福利栏目是否显示 | |
8 | - textShow: false, //规则是否显示 | |
9 | - integralShow: true, //积分领取是否显示 | |
10 | - growUpShow: true, //成长值领取是否显示 | |
11 | - itemButton: '', | |
12 | - cardButton: '', | |
13 | - getActId: '', | |
14 | - getActType: '', | |
15 | - giftID: '', | |
16 | - getUserID: '', | |
17 | - getStorageID: '', | |
18 | - receiveState: '已领取', | |
19 | - integralTitle: '已领取', | |
20 | - growUpTitle: '已领取', | |
21 | - textTitle: '', | |
22 | - getUrl: '', | |
23 | - noShow: false, | |
24 | - //判断中间的连接线是否显示 | |
25 | - itemShows: function itemShows() { | |
26 | - if (this.itemShow) { | |
27 | - if (this.cardShow) { | |
28 | - return true; | |
1 | +var i = require("../../../utils/util.js") | |
2 | +var e = getApp(), | |
3 | + a = e.globalData.setting, | |
4 | + os = a, | |
5 | + t = e.request, | |
6 | + d = e.globalData; | |
7 | +Page({ | |
8 | + data: { | |
9 | + url: a.url, //接口网址 | |
10 | + iurl: a.imghost, //图片前缀网址 | |
11 | + itemShow: false, //项目栏目是否显示 | |
12 | + cardShow: false, //代金券栏目是否显示 | |
13 | + packShow: false, //福利栏目是否显示 | |
14 | + textShow: false, //规则是否显示 | |
15 | + integralShow: true, //积分领取是否显示 | |
16 | + growUpShow: true, //成长值领取是否显示 | |
17 | + itemButton: '', | |
18 | + cardButton: '', | |
19 | + getActId: '', | |
20 | + getActType: '', | |
21 | + giftID: '', | |
22 | + receiveState: '一键全部领取', | |
23 | + textTitle: '', | |
24 | + getUrl: '', | |
25 | + noShow: false, | |
26 | + cards: [], //礼包内容--礼券 | |
27 | + itemWare: [], //礼包内容--服务项目 | |
28 | + integralTitle: "", | |
29 | + growUpTitle: "", | |
30 | + is_sub: 0, //是否重复领取 | |
31 | + }, | |
32 | + GetList: function () { | |
33 | + var th = this; | |
34 | + var url = "/api/weshop/marketing/giftbag/bound/get"; | |
35 | + getApp().request.promiseGet(url, { | |
36 | + data: { | |
37 | + "actId": th.data.getActId, //活动id | |
38 | + "actType": th.data.getActType, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | |
39 | + "giftBagId": th.data.giftID, //礼包ID | |
40 | + "storeId": a.stoid, //商家ID | |
41 | + "userId": d.user_id //用户ID | |
42 | + } | |
43 | + }).then(res => { | |
44 | + if (res.data.code == 0) { | |
45 | + if (res.data.data.lbCoupons != null) { | |
46 | + //礼包内容--礼券 | |
47 | + th.setData({ | |
48 | + cardShow: true, | |
49 | + cards: res.data.data.lbCoupons | |
50 | + }) | |
51 | + } | |
52 | + if (res.data.data.lbSM != null) { | |
53 | + //礼包内容--服务项目 | |
54 | + th.setData({ | |
55 | + itemShow: true, | |
56 | + itemWare: res.data.data.lbSM | |
57 | + }) | |
58 | + } | |
59 | + //礼包积分 | |
60 | + if (res.data.data.lbIntegral <= 0) { | |
61 | + if (res.data.data.lbGrowthValue <= 0) { | |
62 | + th.setData({ | |
63 | + packShow: false | |
64 | + }) | |
29 | 65 | } else { |
30 | - return false; | |
66 | + th.setData({ | |
67 | + packShow: false, | |
68 | + integralShow: false, | |
69 | + growUpShow: true | |
70 | + }) | |
31 | 71 | } |
72 | + | |
32 | 73 | } else { |
33 | - if (this.cardShow) { | |
34 | - return false; | |
74 | + if (res.data.data.lbGrowthValue > 0) { | |
75 | + th.setData({ | |
76 | + packShow: true | |
77 | + }) | |
35 | 78 | } else { |
36 | - return false; | |
79 | + th.setData({ | |
80 | + packShow: true, | |
81 | + integralShow: true, | |
82 | + growUpShow: false | |
83 | + }) | |
37 | 84 | } |
38 | - | |
39 | 85 | } |
40 | - }, | |
41 | - //判断中间的连接线是否显示 | |
42 | - cardShows: function cardShows() { | |
43 | - if (this.cardShow) { | |
44 | - if (this.packShow) { | |
45 | - return true; | |
46 | - } else { | |
47 | - return false; | |
48 | - } | |
86 | + th.setData({ | |
87 | + integralTitle: '领取' + res.data.data.lbIntegral + '积分', | |
88 | + growUpTitle: '领取' + res.data.data.lbGrowthValue + '成长值' | |
89 | + }) | |
90 | + if (res.data.data.receiveState == 0) { | |
91 | + th.setData({ | |
92 | + receiveState: '一键全部领取' | |
93 | + }) | |
49 | 94 | } else { |
50 | - if (this.packShow) { | |
51 | - return false; | |
52 | - } else { | |
53 | - return false; | |
54 | - } | |
55 | - | |
95 | + th.setData({ | |
96 | + receiveState: '已领取' | |
97 | + }) | |
56 | 98 | } |
57 | - }, | |
58 | - cards: [], | |
59 | - itemWare: [] | |
60 | - }; | |
61 | - | |
62 | - | |
63 | 99 | |
100 | + if (res.data.data.actIntro != '') { | |
101 | + th.setData({ | |
102 | + textShow: true, | |
103 | + textTitle: res.data.data.actIntro | |
104 | + }) | |
105 | + } | |
106 | + } else { | |
107 | + getApp().my_warnning(res.data.msg, 0, th); | |
108 | + return false; | |
109 | + } | |
110 | + }) | |
64 | 111 | }, |
65 | - onLoad: function onLoad(options) { | |
66 | - | |
67 | - // 获取url对应的参数 | |
68 | - // this.getActId = this.GetQueryString('actId'); //活动id | |
69 | - // this.getActType = this.GetQueryString('actType'); //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | |
70 | - // this.giftID = this.GetQueryString('giftID'); //礼包ID | |
71 | - // this.getStorageID = this.GetQueryString('storageID'); //商家ID | |
72 | - // this.getUserID = this.GetQueryString('userID'); //用户ID | |
112 | + //判断中间的连接线是否显示 | |
113 | + itemShows: function () { | |
114 | + if (this.itemShow) { | |
115 | + if (this.cardShow) { | |
116 | + return true; | |
117 | + } else { | |
118 | + return false; | |
119 | + } | |
120 | + } else { | |
121 | + if (this.cardShow) { | |
122 | + return false; | |
123 | + } else { | |
124 | + return false; | |
125 | + } | |
73 | 126 | |
74 | - this.getActId = options.actId; //活动id | |
75 | - this.getActType = options.actType; //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | |
76 | - this.giftID = options.giftBagId; //礼包ID | |
77 | - this.getStorageID = options.storeId; //商家ID | |
78 | - this.getUserID = options.userId; //用户ID | |
127 | + } | |
128 | + }, | |
129 | + //判断中间的连接线是否显示 | |
130 | + cardShows: function () { | |
131 | + if (this.cardShow) { | |
132 | + if (this.packShow) { | |
133 | + return true; | |
134 | + } else { | |
135 | + return false; | |
136 | + } | |
137 | + } else { | |
138 | + if (this.packShow) { | |
139 | + return false; | |
140 | + } else { | |
141 | + return false; | |
142 | + } | |
79 | 143 | |
80 | - this.GetList(); | |
144 | + } | |
145 | + }, | |
81 | 146 | |
147 | + onLoad: function onLoad(options) { | |
148 | + var th = this; | |
149 | + th.setData({ | |
150 | + getActId: options.actId, | |
151 | + getActType: options.actType, | |
152 | + giftID: options.giftBagId | |
153 | + }) | |
154 | + th.GetList(); | |
82 | 155 | }, |
83 | 156 | onShow: function onShow() { |
84 | - this.textTitle = this.textTitle.replace(/<p><img/gi, "<p class='img'><img"); | |
157 | + var th = this; | |
158 | + var textTitle = th.data.textTitle.replace(/<p><img/gi, "<p class='img'><img"); | |
159 | + th.setData({ | |
160 | + textTitle: textTitle | |
161 | + }) | |
85 | 162 | }, |
86 | - methods: { | |
87 | - | |
88 | - getQueryString: function getQueryString(name) { | |
89 | - var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); | |
90 | - var r = window.location.search.substr(1).match(reg); | |
91 | - if (r != null) { | |
92 | - return unescape(r[2]); | |
93 | - } | |
94 | - return null; | |
95 | - }, | |
96 | - | |
97 | - GetList: function GetList() { | |
98 | - var _this = this; | |
99 | - uni.request({ | |
100 | - url: this.$GetInfo.ApiHttp + '/api/weshop/marketing/giftbag/bound/get', | |
101 | - data: { | |
102 | - "actId": this.getActId, //活动id | |
103 | - "actType": this.getActType, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | |
104 | - "giftBagId": this.giftID, //礼包ID | |
105 | - "storeId": this.getStorageID, //商家ID | |
106 | - "userId": this.getUserID //用户ID | |
107 | - }, | |
108 | - method: 'GET', | |
109 | - header: { | |
110 | - 'Content-Type': 'application/x-www-form-urlencoded' //自定义请求头信息 | |
111 | - }, | |
112 | - success: function success(res) { | |
113 | - console.log(res.data); | |
114 | - if (res.data.code == 0) { | |
115 | - if (res.data.data.lbCoupons != null) { | |
116 | - _this.cardShow = true; | |
117 | - _this.cards = res.data.data.lbCoupons; | |
118 | - } | |
119 | - if (res.data.data.lbSM != null) { | |
120 | - _this.itemShow = true; | |
121 | - _this.itemWare = res.data.data.lbSM; | |
122 | - } | |
123 | - if (res.data.data.lbIntegral <= 0) { | |
124 | - if (res.data.data.lbGrowthValue <= 0) { | |
125 | - _this.packShow = false; | |
126 | - } else { | |
127 | - _this.packShow = true; | |
128 | - _this.integralShow = false; | |
129 | - _this.growUpShow = true; | |
130 | - } | |
131 | - | |
132 | - } else { | |
133 | - if (res.data.data.lbGrowthValue > 0) { | |
134 | - _this.packShow = true; | |
135 | - } else { | |
136 | - _this.packShow = true; | |
137 | - _this.integralShow = true; | |
138 | - _this.growUpShow = false; | |
139 | - } | |
140 | - } | |
141 | - | |
142 | - _this.integralTitle = '领取' + res.data.data.lbIntegral + '积分'; | |
143 | - _this.growUpTitle = '领取' + res.data.data.lbGrowthValue + '积分'; | |
144 | - if (res.data.data.receiveState == 0) { | |
145 | - _this.receiveState = '一键全部领取'; | |
146 | - } else { | |
147 | - _this.receiveState = '已领取'; | |
148 | - } | |
149 | - | |
150 | - | |
151 | - if (res.data.data.actIntro != '') { | |
152 | - _this.textShow = true; | |
153 | - _this.textTitle = res.data.data.actIntro; | |
154 | - } | |
155 | - | |
156 | - } else { | |
157 | - console.log(res.data.msg); | |
158 | - } | |
159 | - } | |
160 | - }); | |
161 | - | |
162 | - }, | |
163 | - GetWebHttp: function GetWebHttp() { | |
164 | - this.getUrl = this.$GetInfo.HtmlHttp + '/mobile/index/index/stoid/' + this.getStorageID + '.html'; | |
165 | - window.location.href = this.getUrl; | |
166 | - }, | |
167 | - GetReceive: function GetReceive() { | |
168 | - var that = this; | |
169 | - if (that.receiveState == '已领取') { | |
170 | - return false; | |
171 | - } | |
172 | - uni.request({ | |
173 | - url: that.$GetInfo.ApiHttp + '/api/weshop/marketing/free/receive/gift/record/insert', | |
174 | - data: { | |
175 | - "actId": that.getActId, //活动Id | |
176 | - "actType": '2', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | |
177 | - "lbId": that.giftID, //礼包Id | |
178 | - "storeId": that.getStorageID, //商家Id | |
179 | - "userId": that.getUserID //用户ID | |
180 | - }, | |
181 | - method: 'POST', | |
163 | + GetReceive: function () { | |
164 | + var th = this; | |
165 | + if (th.data.receiveState == '已领取') { | |
166 | + return false; | |
167 | + } | |
168 | + var is_sub = th.data.is_sub; //判断是否重复提交 | |
169 | + if (is_sub == 0) { | |
170 | + th.setData({ | |
171 | + is_sub: 1 | |
172 | + }) | |
173 | + | |
174 | + var json = { | |
175 | + "actId": th.data.getActId, //活动Id | |
176 | + "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | |
177 | + "lbId": th.data.giftID, //礼包Id | |
178 | + "storeId": a.stoid, //商家Id | |
179 | + "userId": d.user_id //用户ID | |
180 | + }; | |
181 | + var data = JSON.stringify(json); | |
182 | + var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert"; | |
183 | + wx.request({ | |
184 | + url: url, | |
185 | + data: data, | |
186 | + method: 'post', | |
182 | 187 | header: { |
183 | - 'Content-Type': 'application/json' //自定义请求头信息 | |
184 | - }, | |
185 | - success: function success(res) { | |
186 | - console.log(res.data); | |
188 | + 'content-type': 'application/json' | |
189 | + }, // 设置请求的 header | |
190 | + success: function (res) { | |
191 | + th.setData({ | |
192 | + is_sub: 0 | |
193 | + }) | |
187 | 194 | if (res.data.code == 0) { |
188 | - console.log(res.data.msg); | |
189 | - that.receiveState = '已领取'; | |
190 | - uni.showToast({ | |
191 | - icon: 'none', | |
192 | - title: '领取成功!' | |
193 | - }); | |
194 | - | |
195 | + th.setData({ | |
196 | + receiveState: '已领取' | |
197 | + }) | |
198 | + getApp().my_warnning("领取成功", 1, th); | |
195 | 199 | } else { |
196 | - console.log(res.data.msg); | |
197 | - uni.showToast({ | |
198 | - icon: 'none', | |
199 | - title: res.data.msg | |
200 | - }); | |
201 | - | |
200 | + getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | |
202 | 201 | } |
203 | 202 | } |
204 | - }); | |
205 | - | |
203 | + }) | |
206 | 204 | } |
207 | - } | |
208 | -}; | |
209 | 205 | \ No newline at end of file |
206 | + }, | |
207 | + //界面跳转 | |
208 | + goto: function (e) { | |
209 | + var url = e.currentTarget.dataset.url; | |
210 | + getApp().goto(url); | |
211 | + }, | |
212 | + //图片失败,默认图片 | |
213 | + bind_bnerr1: function (e) { | |
214 | + var th = this; | |
215 | + var _errImg = e.target.dataset.errorimg; | |
216 | + var _Img = e.target.dataset.img; | |
217 | + if (_Img != undefined) { | |
218 | + var _errObj = {}; | |
219 | + _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png"; | |
220 | + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
221 | + } | |
222 | + }, | |
223 | +}); | |
210 | 224 | \ No newline at end of file | ... | ... |
pages/giftpack/evaluategift/evaluategift.json
pages/giftpack/evaluategift/evaluategift.wxml
1 | -<view > | |
1 | +<view> | |
2 | 2 | <view class="image_box"> |
3 | - <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/eval00.png'}}" ></image> | |
3 | + <image src="{{iurl+'/miniapp/images/giftbag/vip00.png'}}" lazy-load="true"></image> | |
4 | 4 | </view> |
5 | - <block wx:if="{{this.itemShow}}"> | |
5 | + <block wx:if="{{itemShow}}"> | |
6 | 6 | <view class="top"> |
7 | 7 | <view class="top_box"> |
8 | 8 | <view class="top_box_text"> |
9 | - <text >______</text> | |
9 | + <text>______</text> | |
10 | 10 | </view> |
11 | 11 | <view class="top_box_text"> |
12 | - <text >新人专享\n你的美丽我来缔造</text> | |
12 | + <text>新人专享\n你的美丽我来缔造</text> | |
13 | 13 | </view> |
14 | 14 | <view class="top_box_text"> |
15 | 15 | <text >______</text> |
16 | 16 | </view> |
17 | 17 | </view> |
18 | 18 | <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
19 | - <view class="top_item"> | |
19 | + <view class="top_item "> | |
20 | 20 | <block wx:if="{{item.lbType==3}}"> |
21 | 21 | <view class="top_item_img"> |
22 | - <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift02.png'}}" ></image> | |
22 | + <image src="{{item.fromImage=='' || item.fromImage==null?iurl+'/miniapp/images/giftbag/gift02.png':iurl+item.fromImage}}" lazy-load="true" data-errorimg="itemWare[{{index}}].fromImage" binderror="bind_bnerr1" data-img="{{item.fromImage}}"></image> | |
23 | 23 | </view> |
24 | 24 | </block> |
25 | 25 | <block wx:if="{{item.lbType==1}}"> |
26 | - <view class="top_item_img"> | |
27 | - <image src="{{item.fromImage==''?$GetInfo.imgHttp+'/miniapp/images/giftbag/empty.jpg':$GetInfo.imgHttp+item.fromImage}}" ></image> | |
26 | + <view class="top_item_img "> | |
27 | + <image src="{{item.fromImage==''?iurl+'/miniapp/images/giftbag/empty.jpg':iurl+item.fromImage}}" lazy-load="true"></image> | |
28 | 28 | </view> |
29 | 29 | </block> |
30 | - <view class="top_item_center"> | |
30 | + <view class="top_item_center "> | |
31 | 31 | <view class="top_item_center_title"> |
32 | 32 | <block wx:if="{{item.lbType==1}}"> |
33 | - <text >免费领取</text> | |
33 | + <text>免费领取</text> | |
34 | 34 | </block> |
35 | 35 | <block wx:if="{{item.lbType==3}}"> |
36 | - <text >{{item.fromName}}</text> | |
36 | + <text>{{item.fromName}}</text> | |
37 | 37 | </block> |
38 | 38 | </view> |
39 | - <view class="top_item_center_ramke"> | |
39 | + <view class="top_item_center_ramke "> | |
40 | 40 | <block wx:if="{{item.lbType==1}}"> |
41 | - <text >{{item.fromName}}</text> | |
41 | + <text>{{item.fromName}}</text> | |
42 | 42 | </block> |
43 | 43 | <block wx:if="{{item.lbType==3}}"> |
44 | 44 | <text >{{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text> |
... | ... | @@ -49,30 +49,31 @@ |
49 | 49 | </block> |
50 | 50 | </view> |
51 | 51 | </block> |
52 | - <block wx:if="{{$root.g0}}"> | |
52 | + <block wx:if="{{true}}"> | |
53 | 53 | <view > |
54 | - <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/eval01.png'}}" ></image> | |
55 | - <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/eval01.png'}}" ></image> | |
54 | + <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | |
55 | + <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | |
56 | 56 | </view> |
57 | 57 | </block> |
58 | - <block wx:if="{{this.cardShow}}"> | |
58 | + <block wx:if="{{cardShow}}"> | |
59 | 59 | <view > |
60 | - <view class="top"> | |
61 | - <view class="top_box"> | |
62 | - <view class="top_box_text"> | |
60 | + <view class="top "> | |
61 | + <view class="top_box "> | |
62 | + <view class="top_box_text "> | |
63 | 63 | <text >———</text> |
64 | 64 | </view> |
65 | - <view class="top_box_text"> | |
65 | + <view class="top_box_text "> | |
66 | 66 | <text >新人专享优惠券</text> |
67 | 67 | </view> |
68 | - <view class="top_box_text"> | |
68 | + <view class="top_box_text "> | |
69 | 69 | <text >———</text> |
70 | 70 | </view> |
71 | 71 | </view> |
72 | 72 | <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
73 | - <view class="top_card"> | |
74 | - <view class="{{['data-v-903fed06',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}"> | |
75 | - <view class="top_card_tite_box"> | |
73 | + <view class="top_card "> | |
74 | + <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}"> | |
75 | + <!-- class="{{['',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}" --> | |
76 | + <view class="top_card_tite_box "> | |
76 | 77 | <block wx:if="{{item.useObjectType==0}}"> |
77 | 78 | <view class="top_card_tite_a">全场通用</view> |
78 | 79 | </block> |
... | ... | @@ -86,80 +87,83 @@ |
86 | 87 | <view class="top_card_tite_a">用途限定</view> |
87 | 88 | </block> |
88 | 89 | <block wx:if="{{item.useObjectType==12}}"> |
89 | - <view class="top_card_tite_a">分类1限定</view> | |
90 | + <view class="top_card_tite_a">分类限定</view> | |
90 | 91 | </block> |
91 | 92 | </view> |
92 | - <view class="top_card_counte">{{item.sum+"元券"}}</view> | |
93 | - <view class="top_card_remak">{{"满"+item.buySum+"元可以用"}}</view> | |
93 | + <view class="top_card_counte ">{{item.sum+"元券"}}</view> | |
94 | + <view class="top_card_remak ">{{"满"+item.buySum+"元可以用"}}</view> | |
94 | 95 | </view> |
95 | 96 | </view> |
96 | 97 | </block> |
97 | 98 | </view> |
98 | 99 | </view> |
99 | 100 | </block> |
100 | - <block wx:if="{{$root.g1}}"> | |
101 | - <view > | |
102 | - <view > | |
103 | - <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/eval01.png'}}" ></image> | |
104 | - <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/eval01.png'}}" ></image> | |
101 | + <block wx:if="{{true}}"> | |
102 | + <view> | |
103 | + <view> | |
104 | + <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | |
105 | + <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | |
105 | 106 | </view> |
106 | 107 | </view> |
107 | 108 | </block> |
108 | - <block wx:if="{{this.packShow}}"> | |
109 | + <block wx:if="{{packShow}}"> | |
109 | 110 | <view > |
110 | - <view class="top"> | |
111 | - <view class="top_box"> | |
112 | - <view class="top_box_text"> | |
111 | + <view class="top "> | |
112 | + <view class="top_box "> | |
113 | + <view class="top_box_text "> | |
113 | 114 | <text >———</text> |
114 | 115 | </view> |
115 | - <view class="top_box_text"> | |
116 | + <view class="top_box_text "> | |
116 | 117 | <text >新人专享福利</text> |
117 | 118 | </view> |
118 | - <view class="top_box_text"> | |
119 | + <view class="top_box_text "> | |
119 | 120 | <text >———</text> |
120 | 121 | </view> |
121 | 122 | </view> |
122 | - <block wx:if="{{this.integralShow}}"> | |
123 | - <view > | |
124 | - <view class="top_box_image"> | |
125 | - <image src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/vip06.jpg'}}" ></image> | |
126 | - <button >{{this.integralTitle}}</button> | |
123 | + <block wx:if="{{integralShow}}"> | |
124 | + <view> | |
125 | + <view class="top_box_image "> | |
126 | + <image src="{{iurl+'/miniapp/images/giftbag/vip06.jpg'}}" lazy-load="true"></image> | |
127 | + <button>{{integralTitle}}</button> | |
127 | 128 | </view> |
128 | 129 | </view> |
129 | 130 | </block> |
130 | - <block wx:if="{{this.growUpShow}}"> | |
131 | + <block wx:if="{{growUpShow}}"> | |
131 | 132 | <view > |
132 | - <view class="top_box_image"> | |
133 | - <image src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/vip07.jpg'}}" ></image> | |
134 | - <button >{{this.growUpTitle}}</button> | |
133 | + <view class="top_box_image fs36"> | |
134 | + <image src="{{iurl+'/miniapp/images/giftbag/vip07.jpg'}}" lazy-load="true"></image> | |
135 | + <button>{{growUpTitle}}</button> | |
135 | 136 | </view> |
136 | 137 | </view> |
137 | 138 | </block> |
138 | 139 | </view> |
139 | 140 | </view> |
140 | 141 | </block> |
141 | - <block wx:if="{{this.textShow}}"> | |
142 | + <block wx:if="{{textShow}}"> | |
142 | 143 | <view class="foot_box"> |
143 | - <view class="foot_box_title"> | |
144 | - <text >活动规则:</text> | |
144 | + <view class="foot_box_title fs36"> | |
145 | + <text>活动规则:</text> | |
145 | 146 | </view> |
146 | 147 | <view class="foot_box_text"> |
147 | - <rich-text nodes="{{this.textTitle}}"></rich-text> | |
148 | + <rich-text nodes="{{textTitle}}"></rich-text> | |
148 | 149 | </view> |
149 | 150 | </view> |
150 | 151 | </block> |
151 | 152 | <view class="button_box"> |
152 | 153 | <view > |
153 | - <button data-event-opts="{{[['tap',[['GetWebHttp',['$event']]]]]}}" class="button" bindtap="__e">进入商城购物</button> | |
154 | + <button class="button" bindtap="goto" data-url="/pages/index/index/index">进入商城购物</button> | |
154 | 155 | </view> |
155 | - <view class="button_text"> | |
156 | + <view class="button_text "> | |
156 | 157 | <text >本活动最终解释权归公司所有,如果有问题请联系客服</text> |
157 | 158 | </view> |
158 | 159 | </view> |
159 | - <view class="foot_empty"></view> | |
160 | + <view class="foot_empty "></view> | |
160 | 161 | <view class="foot_button"> |
161 | - <view class="{{['data-v-903fed06',this.receiveState=='已领取'?'foot_button_notbuy':'foot_button_buy']}}"> | |
162 | - <text data-event-opts="{{[['tap',[['GetReceive',['$event']]]]]}}" bindtap="__e" >{{this.receiveState}}</text> | |
162 | + <view class="{{receiveState=='已领取'?'foot_button_notbuy':'foot_button_buy'}}" bindtap="GetReceive"> | |
163 | + <text>{{receiveState}}</text> | |
163 | 164 | </view> |
164 | 165 | </view> |
165 | -</view> | |
166 | 166 | \ No newline at end of file |
167 | +</view> | |
168 | +<!-- 引入提示组件 --> | |
169 | +<warn id="warn"></warn> | |
170 | +<my_confirm id="my_confirm"></my_confirm> | |
167 | 171 | \ No newline at end of file | ... | ... |
pages/giftpack/evaluategift/evaluategift.wxss
... | ... | @@ -258,7 +258,6 @@ |
258 | 258 | border-radius: 20rpx; |
259 | 259 | } |
260 | 260 | .foot_box_title { |
261 | - font-size: 43rpx; | |
262 | 261 | color: #000000; |
263 | 262 | padding: 20rpx 30rpx 20rpx 30rpx; |
264 | 263 | } |
... | ... | @@ -274,7 +273,7 @@ |
274 | 273 | } |
275 | 274 | .button { |
276 | 275 | margin: 0 30rpx; |
277 | - background: #5d93f5; | |
276 | + background: #ff9a8c; | |
278 | 277 | border-radius: 50rpx; |
279 | 278 | line-height: 80rpx; |
280 | 279 | height: 80rpx; |
... | ... | @@ -313,7 +312,7 @@ |
313 | 312 | height: 70rpx; |
314 | 313 | font-size: 28rpx; |
315 | 314 | line-height: 70rpx; |
316 | - border-radius: 30rpx 30rpx 30rpx 30rpx; | |
315 | + border-radius: 30rpx; | |
317 | 316 | } |
318 | 317 | .foot_button_notbuy{ |
319 | 318 | background: #999999; |
... | ... | @@ -325,7 +324,7 @@ |
325 | 324 | border-radius: 30rpx 30rpx 30rpx 30rpx; |
326 | 325 | } |
327 | 326 | page { |
328 | - background-color: #4784ef; | |
327 | + background-color: #fb6451; | |
329 | 328 | } |
330 | 329 | button::after { |
331 | 330 | border: none; | ... | ... |