Commit 0655bf5a559d608839d4839a1492dd6138591386
1 parent
312af5a3
新人礼、评价礼、生日礼界面的添加
Showing
12 changed files
with
2156 additions
and
0 deletions
pages/giftpack/birthdaygift/birthdaygift.js
0 → 100644
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; | ||
29 | + } else { | ||
30 | + return false; | ||
31 | + } | ||
32 | + } else { | ||
33 | + if (this.cardShow) { | ||
34 | + return false; | ||
35 | + } else { | ||
36 | + return false; | ||
37 | + } | ||
38 | + | ||
39 | + } | ||
40 | + }, | ||
41 | + //判断中间的连接线是否显示 | ||
42 | + cardShows: function cardShows() { | ||
43 | + if (this.cardShow) { | ||
44 | + if (this.packShow) { | ||
45 | + return true; | ||
46 | + } else { | ||
47 | + return false; | ||
48 | + } | ||
49 | + } else { | ||
50 | + if (this.packShow) { | ||
51 | + return false; | ||
52 | + } else { | ||
53 | + return false; | ||
54 | + } | ||
55 | + | ||
56 | + } | ||
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 | + | ||
82 | + }, | ||
83 | + onShow: function onShow() { | ||
84 | + if (this.textTitle == '') { | ||
85 | + this.textTitle = '暂无详情......'; | ||
86 | + } else { | ||
87 | + this.textTitle = this.textTitle.replace(/<p><img/gi, "<p class='img'><img"); | ||
88 | + } | ||
89 | + }, | ||
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]); | ||
97 | + } | ||
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 == '已领取') { | ||
174 | + return false; | ||
175 | + } | ||
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', | ||
186 | + header: { | ||
187 | + 'Content-Type': 'application/json' //自定义请求头信息 | ||
188 | + }, | ||
189 | + success: function success(res) { | ||
190 | + console.log(res.data); | ||
191 | + if (res.data.code == 0) { | ||
192 | + console.log(res.data.msg); | ||
193 | + that.receiveState = '已领取'; | ||
194 | + uni.showToast({ | ||
195 | + icon: 'none', | ||
196 | + title: '领取成功!' | ||
197 | + }); | ||
198 | + | ||
199 | + } else { | ||
200 | + console.log(res.data.msg); | ||
201 | + uni.showToast({ | ||
202 | + icon: 'none', | ||
203 | + title: res.data.msg | ||
204 | + }); | ||
205 | + | ||
206 | + } | ||
207 | + } | ||
208 | + }); | ||
209 | + | ||
210 | + } | ||
211 | + } | ||
212 | +}; | ||
0 | \ No newline at end of file | 213 | \ No newline at end of file |
pages/giftpack/birthdaygift/birthdaygift.json
0 → 100644
pages/giftpack/birthdaygift/birthdaygift.wxml
0 → 100644
1 | +<view > | ||
2 | + <view class="image_box "> | ||
3 | + <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/birth00.png'}}" ></image> | ||
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> | ||
10 | + </view> | ||
11 | + <view class="top_box_text "> | ||
12 | + <text >新人专享\n你的美丽我来缔造</text> | ||
13 | + </view> | ||
14 | + <view class="top_box_text "> | ||
15 | + <text >______</text> | ||
16 | + </view> | ||
17 | + </view> | ||
18 | + <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
19 | + <view class="top_item "> | ||
20 | + <block wx:if="{{item.lbType==3}}"> | ||
21 | + <view class="top_item_img "> | ||
22 | + <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift02.png'}}" ></image> | ||
23 | + </view> | ||
24 | + </block> | ||
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> | ||
28 | + </view> | ||
29 | + </block> | ||
30 | + <view class="top_item_center "> | ||
31 | + <view class="top_item_center_title "> | ||
32 | + <block wx:if="{{item.lbType==1}}"> | ||
33 | + <text >免费领取</text> | ||
34 | + </block> | ||
35 | + <block wx:if="{{item.lbType==3}}"> | ||
36 | + <text >{{item.fromName}}</text> | ||
37 | + </block> | ||
38 | + </view> | ||
39 | + <view class="top_item_center_ramke "> | ||
40 | + <block wx:if="{{item.lbType==1}}"> | ||
41 | + <text >{{item.fromName}}</text> | ||
42 | + </block> | ||
43 | + <block wx:if="{{item.lbType==3}}"> | ||
44 | + <text >{{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text> | ||
45 | + </block> | ||
46 | + </view> | ||
47 | + </view> | ||
48 | + </view> | ||
49 | + </block> | ||
50 | + </view> | ||
51 | + </block> | ||
52 | + <block wx:if="{{$root.g0}}"> | ||
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> | ||
56 | + </view> | ||
57 | + </block> | ||
58 | + <block wx:if="{{this.cardShow}}"> | ||
59 | + <view > | ||
60 | + <view class="top "> | ||
61 | + <view class="top_box "> | ||
62 | + <view class="top_box_text "> | ||
63 | + <text >———</text> | ||
64 | + </view> | ||
65 | + <view class="top_box_text "> | ||
66 | + <text >新人专享优惠券</text> | ||
67 | + </view> | ||
68 | + <view class="top_box_text "> | ||
69 | + <text >———</text> | ||
70 | + </view> | ||
71 | + </view> | ||
72 | + <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
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 | + <view class="top_card_tite_box "> | ||
76 | + <block wx:if="{{item.useObjectType==0}}"> | ||
77 | + <view class="top_card_tite_a ">全场通用</view> | ||
78 | + </block> | ||
79 | + <block wx:if="{{item.useObjectType==1}}"> | ||
80 | + <view class="top_card_tite_b ">品牌限定</view> | ||
81 | + </block> | ||
82 | + <block wx:if="{{item.useObjectType==2}}"> | ||
83 | + <view class="top_card_tite_c ">品类限定</view> | ||
84 | + </block> | ||
85 | + <block wx:if="{{item.useObjectType==11}}"> | ||
86 | + <view class="top_card_tite_a ">用途限定</view> | ||
87 | + </block> | ||
88 | + <block wx:if="{{item.useObjectType==12}}"> | ||
89 | + <view class="top_card_tite_a ">分类1限定</view> | ||
90 | + </block> | ||
91 | + </view> | ||
92 | + <view class="top_card_counte ">{{item.sum+"元券"}}</view> | ||
93 | + <view class="top_card_remak ">{{"满"+item.buySum+"元可以用"}}</view> | ||
94 | + </view> | ||
95 | + </view> | ||
96 | + </block> | ||
97 | + </view> | ||
98 | + </view> | ||
99 | + </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> | ||
105 | + </view> | ||
106 | + </view> | ||
107 | + </block> | ||
108 | + <block wx:if="{{this.packShow}}"> | ||
109 | + <view > | ||
110 | + <view class="top "> | ||
111 | + <view class="top_box "> | ||
112 | + <view class="top_box_text "> | ||
113 | + <text >———</text> | ||
114 | + </view> | ||
115 | + <view class="top_box_text "> | ||
116 | + <text >新人专享福利</text> | ||
117 | + </view> | ||
118 | + <view class="top_box_text "> | ||
119 | + <text >———</text> | ||
120 | + </view> | ||
121 | + </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> | ||
127 | + </view> | ||
128 | + </view> | ||
129 | + </block> | ||
130 | + <block wx:if="{{this.growUpShow}}"> | ||
131 | + <view > | ||
132 | + <view class="top_box_image "> | ||
133 | + <image src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/vip07.jpg'}}" ></image> | ||
134 | + <button >{{this.growUpTitle}}</button> | ||
135 | + </view> | ||
136 | + </view> | ||
137 | + </block> | ||
138 | + </view> | ||
139 | + </view> | ||
140 | + </block> | ||
141 | + <block wx:if="{{this.textShow}}"> | ||
142 | + <view class="foot_box "> | ||
143 | + <view class="foot_box_title "> | ||
144 | + <text >活动规则:</text> | ||
145 | + </view> | ||
146 | + <view class="foot_box_text "> | ||
147 | + <rich-text nodes="{{this.textTitle}}"></rich-text> | ||
148 | + </view> | ||
149 | + </view> | ||
150 | + </block> | ||
151 | + <view class="button_box "> | ||
152 | + <view > | ||
153 | + <button data-event-opts="{{[['tap',[['GetWebHttp',['$event']]]]]}}" class="button " bindtap="__e">进入商城购物</button> | ||
154 | + </view> | ||
155 | + <view class="button_text "> | ||
156 | + <text >本活动最终解释权归公司所有,如果有问题请联系客服</text> | ||
157 | + </view> | ||
158 | + </view> | ||
159 | + <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> | ||
163 | + </view> | ||
164 | + </view> | ||
165 | +</view> | ||
0 | \ No newline at end of file | 166 | \ No newline at end of file |
pages/giftpack/birthdaygift/birthdaygift.wxss
0 → 100644
1 | +@charset "UTF-8"; | ||
2 | +/* Author XGQ | ||
3 | + * 2019-10-27 | ||
4 | + */ | ||
5 | +.image_box { | ||
6 | + -webkit-box-pack: center; | ||
7 | + -webkit-justify-content: center; | ||
8 | + justify-content: center; | ||
9 | +} | ||
10 | +.image_box image { | ||
11 | + width: 100%; | ||
12 | + height: 690rpx; | ||
13 | +} | ||
14 | +.top { | ||
15 | + margin: -20rpx 28rpx 45rpx 28rpx; | ||
16 | + padding: 10rpx 10rpx 70rpx 10rpx; | ||
17 | + background-color: #FFFFFF; | ||
18 | + border-radius: 0rpx 0rpx 15rpx 15rpx; | ||
19 | +} | ||
20 | +.top_box { | ||
21 | + display: -webkit-box; | ||
22 | + display: -webkit-flex; | ||
23 | + display: flex; | ||
24 | + text-align: center; | ||
25 | + -webkit-box-pack: center; | ||
26 | + -webkit-justify-content: center; | ||
27 | + justify-content: center; | ||
28 | +} | ||
29 | +.top_box_text { | ||
30 | + -webkit-box-pack: center; | ||
31 | + -webkit-justify-content: center; | ||
32 | + justify-content: center; | ||
33 | + margin: 50rpx 15rpx 20rpx 15rpx; | ||
34 | +} | ||
35 | +.top_box_text text { | ||
36 | + color: #FB6451; | ||
37 | + font-size: 40rpx; | ||
38 | +} | ||
39 | +.top_item { | ||
40 | + display: -webkit-box; | ||
41 | + display: -webkit-flex; | ||
42 | + display: flex; | ||
43 | + width: 100%; | ||
44 | + margin: 60rpx 0 0 0; | ||
45 | +} | ||
46 | +.top_item_img { | ||
47 | + float: left; | ||
48 | + width: 28%; | ||
49 | + margin: 0rpx 10rpx 0rpx 20rpx; | ||
50 | +} | ||
51 | +.top_item_img image { | ||
52 | + width: 150rpx; | ||
53 | + height: 150rpx; | ||
54 | + border-radius: 50%; | ||
55 | + border: #F96865 solid 3rpx; | ||
56 | +} | ||
57 | +.top_item_center { | ||
58 | + float: left; | ||
59 | + width: 50%; | ||
60 | +} | ||
61 | +.top_item_center_title { | ||
62 | + font-size: 35rpx; | ||
63 | + color: #FB6451; | ||
64 | + -webkit-box-pack: start; | ||
65 | + -webkit-justify-content: flex-start; | ||
66 | + justify-content: flex-start; | ||
67 | + padding: 0 10rpx 15rpx 0rpx; | ||
68 | + word-break: break-all; | ||
69 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
70 | + text-overflow: ellipsis; | ||
71 | + display: -webkit-box; | ||
72 | + /** 对象作为伸缩盒子模型显示 **/ | ||
73 | + -webkit-box-orient: vertical; | ||
74 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
75 | + -webkit-line-clamp: 2; | ||
76 | + /** 显示的行数 **/ | ||
77 | + overflow: hidden; | ||
78 | + /** 隐藏超出的内容 **/ | ||
79 | +} | ||
80 | +.top_item_center_ramke { | ||
81 | + font-size: 25rpx; | ||
82 | + -webkit-box-pack: start; | ||
83 | + -webkit-justify-content: flex-start; | ||
84 | + justify-content: flex-start; | ||
85 | + line-height: 35rpx; | ||
86 | + letter-spacing: 0.5rpx; | ||
87 | + word-break: break-all; | ||
88 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
89 | + text-overflow: ellipsis; | ||
90 | + display: -webkit-box; | ||
91 | + /** 对象作为伸缩盒子模型显示 **/ | ||
92 | + -webkit-box-orient: vertical; | ||
93 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
94 | + -webkit-line-clamp: 2; | ||
95 | + /** 显示的行数 **/ | ||
96 | + overflow: hidden; | ||
97 | + /** 隐藏超出的内容 **/ | ||
98 | +} | ||
99 | +.top_item_button { | ||
100 | + float: right; | ||
101 | + width: 22%; | ||
102 | + padding: 65rpx 20rpx 0 1rpx; | ||
103 | +} | ||
104 | +.top_item_button button { | ||
105 | + font-size: 25rpx; | ||
106 | + background: #fd6969; | ||
107 | + color: #FFFFFF; | ||
108 | + border-radius: 50rpx; | ||
109 | + height: 45rpx; | ||
110 | + line-height: 45rpx; | ||
111 | +} | ||
112 | +.top_card { | ||
113 | + width: calc(50% - 30rpx); | ||
114 | + display: inline-block; | ||
115 | + margin: 15rpx; | ||
116 | +} | ||
117 | +.top_card_box { | ||
118 | + background-size: cover; | ||
119 | + background-position: center; | ||
120 | + background-repeat: no-repeat; | ||
121 | + border-radius: 20rpx; | ||
122 | + height: 250rpx; | ||
123 | + margin: 5rpx; | ||
124 | +} | ||
125 | +.img1 { | ||
126 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); | ||
127 | +} | ||
128 | +.img2 { | ||
129 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); | ||
130 | +} | ||
131 | +.img3 { | ||
132 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); | ||
133 | +} | ||
134 | +.top_card_tite_box { | ||
135 | + width: 100%; | ||
136 | + display: -webkit-box; | ||
137 | + display: -webkit-flex; | ||
138 | + display: flex; | ||
139 | + -webkit-box-pack: end; | ||
140 | + -webkit-justify-content: flex-end; | ||
141 | + justify-content: flex-end; | ||
142 | +} | ||
143 | +.top_card_tite_a { | ||
144 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
145 | + line-height: 29rpx; | ||
146 | + font-size: 25rpx; | ||
147 | + color: #FFFFFF; | ||
148 | + background: #ffa7c0; | ||
149 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
150 | +} | ||
151 | +.top_card_tite_b { | ||
152 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
153 | + line-height: 29rpx; | ||
154 | + font-size: 25rpx; | ||
155 | + color: #FFFFFF; | ||
156 | + background: #50dfdb; | ||
157 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
158 | +} | ||
159 | +.top_card_tite_c { | ||
160 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
161 | + line-height: 29rpx; | ||
162 | + font-size: 25rpx; | ||
163 | + color: #FFFFFF; | ||
164 | + background: #92cbff; | ||
165 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
166 | +} | ||
167 | +.top_card_tite_d { | ||
168 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
169 | + line-height: 29rpx; | ||
170 | + font-size: 25rpx; | ||
171 | + color: #FFFFFF; | ||
172 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
173 | +} | ||
174 | +.top_card_counte { | ||
175 | + padding: 40rpx 20rpx 0 0; | ||
176 | + text-align: center; | ||
177 | + display: -webkit-box; | ||
178 | + display: -webkit-flex; | ||
179 | + display: flex; | ||
180 | + -webkit-box-pack: center; | ||
181 | + -webkit-justify-content: center; | ||
182 | + justify-content: center; | ||
183 | + -webkit-box-align: center; | ||
184 | + -webkit-align-items: center; | ||
185 | + align-items: center; | ||
186 | + color: #FFFFFF; | ||
187 | + font-size: 40rpx; | ||
188 | +} | ||
189 | +.top_card_remak { | ||
190 | + padding: 20rpx 0 40rpx 0; | ||
191 | + text-align: center; | ||
192 | + display: -webkit-box; | ||
193 | + display: -webkit-flex; | ||
194 | + display: flex; | ||
195 | + -webkit-box-pack: center; | ||
196 | + -webkit-justify-content: center; | ||
197 | + justify-content: center; | ||
198 | + -webkit-box-align: center; | ||
199 | + -webkit-align-items: center; | ||
200 | + align-items: center; | ||
201 | + font-size: 20rpx; | ||
202 | + color: #FFFFFF; | ||
203 | +} | ||
204 | +.top_card_button_a button { | ||
205 | + margin: 0 85rpx; | ||
206 | + background: #ffa6bc; | ||
207 | + border-radius: 50rpx; | ||
208 | + line-height: 40rpx; | ||
209 | + height: 40rpx; | ||
210 | + color: white; | ||
211 | + font-size: 25rpx; | ||
212 | +} | ||
213 | +.top_card_button_b button { | ||
214 | + margin: 0 85rpx; | ||
215 | + background: #50dfdb; | ||
216 | + border-radius: 50rpx; | ||
217 | + line-height: 40rpx; | ||
218 | + height: 40rpx; | ||
219 | + color: white; | ||
220 | + font-size: 25rpx; | ||
221 | +} | ||
222 | +.top_card_button_c button { | ||
223 | + margin: 0 85rpx; | ||
224 | + background: #75bcfc; | ||
225 | + border-radius: 50rpx; | ||
226 | + line-height: 40rpx; | ||
227 | + height: 40rpx; | ||
228 | + color: white; | ||
229 | + font-size: 25rpx; | ||
230 | +} | ||
231 | +.top_card_button_d button { | ||
232 | + margin: 0 85rpx; | ||
233 | + border-radius: 50rpx; | ||
234 | + line-height: 40rpx; | ||
235 | + height: 40rpx; | ||
236 | + color: white; | ||
237 | + font-size: 25rpx; | ||
238 | +} | ||
239 | +.top_box_image { | ||
240 | + padding: 20rpx 20rpx 20rpx 20rpx; | ||
241 | +} | ||
242 | +.top_box_image image { | ||
243 | + height: 216rpx; | ||
244 | + width: 100%; | ||
245 | +} | ||
246 | +.top_box_image button { | ||
247 | + margin: 15rpx 95rpx 0rpx 95rpx; | ||
248 | + background: #fe6a6a; | ||
249 | + border-radius: 50rpx; | ||
250 | + line-height: 60rpx; | ||
251 | + height: 60rpx; | ||
252 | + color: white; | ||
253 | + font-size: 30rpx; | ||
254 | +} | ||
255 | +.foot_box { | ||
256 | + margin: 0 30rpx 40rpx 30rpx; | ||
257 | + background: #FFFFFF; | ||
258 | + border-radius: 20rpx; | ||
259 | +} | ||
260 | +.foot_box_title { | ||
261 | + font-size: 43rpx; | ||
262 | + color: #000000; | ||
263 | + padding: 20rpx 30rpx 20rpx 30rpx; | ||
264 | +} | ||
265 | +.foot_box_text { | ||
266 | + font-size: 30rpx; | ||
267 | + color: #000000; | ||
268 | + line-height: 48rpx; | ||
269 | + padding: 20rpx 35rpx 50rpx 30rpx; | ||
270 | +} | ||
271 | +.button_box { | ||
272 | + margin: 50rpx 50rpx 50rpx 50rpx; | ||
273 | + text-align: center; | ||
274 | +} | ||
275 | +.button { | ||
276 | + margin: 0 30rpx; | ||
277 | + background: #61d3dd; | ||
278 | + border-radius: 50rpx; | ||
279 | + line-height: 80rpx; | ||
280 | + height: 80rpx; | ||
281 | + color: white; | ||
282 | + font-size: 35rpx; | ||
283 | +} | ||
284 | +.button_text { | ||
285 | + padding-top: 20rpx; | ||
286 | + font-size: 20rpx; | ||
287 | + color: white; | ||
288 | + height: 100rpx; | ||
289 | +} | ||
290 | +.foot_empty { | ||
291 | + height: 90rpx; | ||
292 | +} | ||
293 | +.foot_button { | ||
294 | + display: -webkit-box; | ||
295 | + display: -webkit-flex; | ||
296 | + display: flex; | ||
297 | + margin: 20rpx 0rpx 0rpx 0rpx; | ||
298 | + padding: 25rpx 0rpx; | ||
299 | + background: #FFFFFF; | ||
300 | + text-align: center; | ||
301 | + -webkit-box-pack: center; | ||
302 | + -webkit-justify-content: center; | ||
303 | + justify-content: center; | ||
304 | + position: fixed; | ||
305 | + bottom: 0; | ||
306 | + left: 0; | ||
307 | + width: 100%; | ||
308 | +} | ||
309 | +.foot_button_buy { | ||
310 | + background: #e4010c; | ||
311 | + color: #FFFFFF; | ||
312 | + width: 400rpx; | ||
313 | + height: 70rpx; | ||
314 | + font-size: 28rpx; | ||
315 | + line-height: 70rpx; | ||
316 | + border-radius: 30rpx 30rpx 30rpx 30rpx; | ||
317 | +} | ||
318 | +.foot_button_notbuy{ | ||
319 | + background: #999999; | ||
320 | + color: #FFFFFF; | ||
321 | + width: 400rpx; | ||
322 | + height: 70rpx; | ||
323 | + font-size: 28rpx; | ||
324 | + line-height: 70rpx; | ||
325 | + border-radius: 30rpx 30rpx 30rpx 30rpx; | ||
326 | +} | ||
327 | +page { | ||
328 | + background-color: #9be0e5; | ||
329 | +} | ||
330 | +button::after { | ||
331 | + border: none; | ||
332 | +} | ||
333 | +.foot_box_text ._img { | ||
334 | + width: 100%; | ||
335 | +} | ||
336 | +.foot_box_text .img { | ||
337 | + line-height: 0; | ||
338 | +} | ||
339 | + |
pages/giftpack/evaluategift/evaluategift.js
0 → 100644
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; | ||
29 | + } else { | ||
30 | + return false; | ||
31 | + } | ||
32 | + } else { | ||
33 | + if (this.cardShow) { | ||
34 | + return false; | ||
35 | + } else { | ||
36 | + return false; | ||
37 | + } | ||
38 | + | ||
39 | + } | ||
40 | + }, | ||
41 | + //判断中间的连接线是否显示 | ||
42 | + cardShows: function cardShows() { | ||
43 | + if (this.cardShow) { | ||
44 | + if (this.packShow) { | ||
45 | + return true; | ||
46 | + } else { | ||
47 | + return false; | ||
48 | + } | ||
49 | + } else { | ||
50 | + if (this.packShow) { | ||
51 | + return false; | ||
52 | + } else { | ||
53 | + return false; | ||
54 | + } | ||
55 | + | ||
56 | + } | ||
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 | + | ||
82 | + }, | ||
83 | + onShow: function onShow() { | ||
84 | + this.textTitle = this.textTitle.replace(/<p><img/gi, "<p class='img'><img"); | ||
85 | + }, | ||
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', | ||
182 | + header: { | ||
183 | + 'Content-Type': 'application/json' //自定义请求头信息 | ||
184 | + }, | ||
185 | + success: function success(res) { | ||
186 | + console.log(res.data); | ||
187 | + 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 | + } else { | ||
196 | + console.log(res.data.msg); | ||
197 | + uni.showToast({ | ||
198 | + icon: 'none', | ||
199 | + title: res.data.msg | ||
200 | + }); | ||
201 | + | ||
202 | + } | ||
203 | + } | ||
204 | + }); | ||
205 | + | ||
206 | + } | ||
207 | + } | ||
208 | +}; | ||
0 | \ No newline at end of file | 209 | \ No newline at end of file |
pages/giftpack/evaluategift/evaluategift.json
0 → 100644
pages/giftpack/evaluategift/evaluategift.wxml
0 → 100644
1 | +<view > | ||
2 | + <view class="image_box"> | ||
3 | + <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/eval00.png'}}" ></image> | ||
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> | ||
10 | + </view> | ||
11 | + <view class="top_box_text"> | ||
12 | + <text >新人专享\n你的美丽我来缔造</text> | ||
13 | + </view> | ||
14 | + <view class="top_box_text"> | ||
15 | + <text >______</text> | ||
16 | + </view> | ||
17 | + </view> | ||
18 | + <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
19 | + <view class="top_item"> | ||
20 | + <block wx:if="{{item.lbType==3}}"> | ||
21 | + <view class="top_item_img"> | ||
22 | + <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift02.png'}}" ></image> | ||
23 | + </view> | ||
24 | + </block> | ||
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> | ||
28 | + </view> | ||
29 | + </block> | ||
30 | + <view class="top_item_center"> | ||
31 | + <view class="top_item_center_title"> | ||
32 | + <block wx:if="{{item.lbType==1}}"> | ||
33 | + <text >免费领取</text> | ||
34 | + </block> | ||
35 | + <block wx:if="{{item.lbType==3}}"> | ||
36 | + <text >{{item.fromName}}</text> | ||
37 | + </block> | ||
38 | + </view> | ||
39 | + <view class="top_item_center_ramke"> | ||
40 | + <block wx:if="{{item.lbType==1}}"> | ||
41 | + <text >{{item.fromName}}</text> | ||
42 | + </block> | ||
43 | + <block wx:if="{{item.lbType==3}}"> | ||
44 | + <text >{{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text> | ||
45 | + </block> | ||
46 | + </view> | ||
47 | + </view> | ||
48 | + </view> | ||
49 | + </block> | ||
50 | + </view> | ||
51 | + </block> | ||
52 | + <block wx:if="{{$root.g0}}"> | ||
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> | ||
56 | + </view> | ||
57 | + </block> | ||
58 | + <block wx:if="{{this.cardShow}}"> | ||
59 | + <view > | ||
60 | + <view class="top"> | ||
61 | + <view class="top_box"> | ||
62 | + <view class="top_box_text"> | ||
63 | + <text >———</text> | ||
64 | + </view> | ||
65 | + <view class="top_box_text"> | ||
66 | + <text >新人专享优惠券</text> | ||
67 | + </view> | ||
68 | + <view class="top_box_text"> | ||
69 | + <text >———</text> | ||
70 | + </view> | ||
71 | + </view> | ||
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"> | ||
76 | + <block wx:if="{{item.useObjectType==0}}"> | ||
77 | + <view class="top_card_tite_a">全场通用</view> | ||
78 | + </block> | ||
79 | + <block wx:if="{{item.useObjectType==1}}"> | ||
80 | + <view class="top_card_tite_b">品牌限定</view> | ||
81 | + </block> | ||
82 | + <block wx:if="{{item.useObjectType==2}}"> | ||
83 | + <view class="top_card_tite_c">品类限定</view> | ||
84 | + </block> | ||
85 | + <block wx:if="{{item.useObjectType==11}}"> | ||
86 | + <view class="top_card_tite_a">用途限定</view> | ||
87 | + </block> | ||
88 | + <block wx:if="{{item.useObjectType==12}}"> | ||
89 | + <view class="top_card_tite_a">分类1限定</view> | ||
90 | + </block> | ||
91 | + </view> | ||
92 | + <view class="top_card_counte">{{item.sum+"元券"}}</view> | ||
93 | + <view class="top_card_remak">{{"满"+item.buySum+"元可以用"}}</view> | ||
94 | + </view> | ||
95 | + </view> | ||
96 | + </block> | ||
97 | + </view> | ||
98 | + </view> | ||
99 | + </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> | ||
105 | + </view> | ||
106 | + </view> | ||
107 | + </block> | ||
108 | + <block wx:if="{{this.packShow}}"> | ||
109 | + <view > | ||
110 | + <view class="top"> | ||
111 | + <view class="top_box"> | ||
112 | + <view class="top_box_text"> | ||
113 | + <text >———</text> | ||
114 | + </view> | ||
115 | + <view class="top_box_text"> | ||
116 | + <text >新人专享福利</text> | ||
117 | + </view> | ||
118 | + <view class="top_box_text"> | ||
119 | + <text >———</text> | ||
120 | + </view> | ||
121 | + </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> | ||
127 | + </view> | ||
128 | + </view> | ||
129 | + </block> | ||
130 | + <block wx:if="{{this.growUpShow}}"> | ||
131 | + <view > | ||
132 | + <view class="top_box_image"> | ||
133 | + <image src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/vip07.jpg'}}" ></image> | ||
134 | + <button >{{this.growUpTitle}}</button> | ||
135 | + </view> | ||
136 | + </view> | ||
137 | + </block> | ||
138 | + </view> | ||
139 | + </view> | ||
140 | + </block> | ||
141 | + <block wx:if="{{this.textShow}}"> | ||
142 | + <view class="foot_box"> | ||
143 | + <view class="foot_box_title"> | ||
144 | + <text >活动规则:</text> | ||
145 | + </view> | ||
146 | + <view class="foot_box_text"> | ||
147 | + <rich-text nodes="{{this.textTitle}}"></rich-text> | ||
148 | + </view> | ||
149 | + </view> | ||
150 | + </block> | ||
151 | + <view class="button_box"> | ||
152 | + <view > | ||
153 | + <button data-event-opts="{{[['tap',[['GetWebHttp',['$event']]]]]}}" class="button" bindtap="__e">进入商城购物</button> | ||
154 | + </view> | ||
155 | + <view class="button_text"> | ||
156 | + <text >本活动最终解释权归公司所有,如果有问题请联系客服</text> | ||
157 | + </view> | ||
158 | + </view> | ||
159 | + <view class="foot_empty"></view> | ||
160 | + <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> | ||
163 | + </view> | ||
164 | + </view> | ||
165 | +</view> | ||
0 | \ No newline at end of file | 166 | \ No newline at end of file |
pages/giftpack/evaluategift/evaluategift.wxss
0 → 100644
1 | +@charset "UTF-8"; | ||
2 | +/* Author XGQ | ||
3 | + * 2019-10-27 | ||
4 | + */ | ||
5 | +.image_box { | ||
6 | + -webkit-box-pack: center; | ||
7 | + -webkit-justify-content: center; | ||
8 | + justify-content: center; | ||
9 | +} | ||
10 | +.image_box image { | ||
11 | + width: 100%; | ||
12 | + height: 690rpx; | ||
13 | +} | ||
14 | +.top { | ||
15 | + margin: -20rpx 28rpx 45rpx 28rpx; | ||
16 | + padding: 10rpx 10rpx 70rpx 10rpx; | ||
17 | + background-color: #FFFFFF; | ||
18 | + border-radius: 0rpx 0rpx 15rpx 15rpx; | ||
19 | +} | ||
20 | +.top_box { | ||
21 | + display: -webkit-box; | ||
22 | + display: -webkit-flex; | ||
23 | + display: flex; | ||
24 | + text-align: center; | ||
25 | + -webkit-box-pack: center; | ||
26 | + -webkit-justify-content: center; | ||
27 | + justify-content: center; | ||
28 | +} | ||
29 | +.top_box_text { | ||
30 | + -webkit-box-pack: center; | ||
31 | + -webkit-justify-content: center; | ||
32 | + justify-content: center; | ||
33 | + margin: 50rpx 15rpx 20rpx 15rpx; | ||
34 | +} | ||
35 | +.top_box_text text { | ||
36 | + color: #FB6451; | ||
37 | + font-size: 40rpx; | ||
38 | +} | ||
39 | +.top_item { | ||
40 | + display: -webkit-box; | ||
41 | + display: -webkit-flex; | ||
42 | + display: flex; | ||
43 | + width: 100%; | ||
44 | + margin: 60rpx 0 0 0; | ||
45 | +} | ||
46 | +.top_item_img { | ||
47 | + float: left; | ||
48 | + width: 28%; | ||
49 | + margin: 0rpx 10rpx 0rpx 20rpx; | ||
50 | +} | ||
51 | +.top_item_img image { | ||
52 | + width: 150rpx; | ||
53 | + height: 150rpx; | ||
54 | + border-radius: 50%; | ||
55 | + border: #F96865 solid 3rpx; | ||
56 | +} | ||
57 | +.top_item_center { | ||
58 | + float: left; | ||
59 | + width: 50%; | ||
60 | +} | ||
61 | +.top_item_center_title { | ||
62 | + font-size: 35rpx; | ||
63 | + color: #FB6451; | ||
64 | + -webkit-box-pack: start; | ||
65 | + -webkit-justify-content: flex-start; | ||
66 | + justify-content: flex-start; | ||
67 | + padding: 0 10rpx 15rpx 0rpx; | ||
68 | + word-break: break-all; | ||
69 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
70 | + text-overflow: ellipsis; | ||
71 | + display: -webkit-box; | ||
72 | + /** 对象作为伸缩盒子模型显示 **/ | ||
73 | + -webkit-box-orient: vertical; | ||
74 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
75 | + -webkit-line-clamp: 2; | ||
76 | + /** 显示的行数 **/ | ||
77 | + overflow: hidden; | ||
78 | + /** 隐藏超出的内容 **/ | ||
79 | +} | ||
80 | +.top_item_center_ramke { | ||
81 | + font-size: 25rpx; | ||
82 | + -webkit-box-pack: start; | ||
83 | + -webkit-justify-content: flex-start; | ||
84 | + justify-content: flex-start; | ||
85 | + line-height: 35rpx; | ||
86 | + letter-spacing: 0.5rpx; | ||
87 | + word-break: break-all; | ||
88 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
89 | + text-overflow: ellipsis; | ||
90 | + display: -webkit-box; | ||
91 | + /** 对象作为伸缩盒子模型显示 **/ | ||
92 | + -webkit-box-orient: vertical; | ||
93 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
94 | + -webkit-line-clamp: 2; | ||
95 | + /** 显示的行数 **/ | ||
96 | + overflow: hidden; | ||
97 | + /** 隐藏超出的内容 **/ | ||
98 | +} | ||
99 | +.top_item_button { | ||
100 | + float: right; | ||
101 | + width: 22%; | ||
102 | + padding: 65rpx 20rpx 0 1rpx; | ||
103 | +} | ||
104 | +.top_item_button button { | ||
105 | + font-size: 25rpx; | ||
106 | + background: #fd6969; | ||
107 | + color: #FFFFFF; | ||
108 | + border-radius: 50rpx; | ||
109 | + height: 45rpx; | ||
110 | + line-height: 45rpx; | ||
111 | +} | ||
112 | +.top_card { | ||
113 | + width: calc(50% - 30rpx); | ||
114 | + display: inline-block; | ||
115 | + margin: 15rpx; | ||
116 | +} | ||
117 | +.top_card_box { | ||
118 | + background-size: cover; | ||
119 | + background-position: center; | ||
120 | + background-repeat: no-repeat; | ||
121 | + border-radius: 20rpx; | ||
122 | + height: 250rpx; | ||
123 | + margin: 5rpx; | ||
124 | +} | ||
125 | +.img1 { | ||
126 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); | ||
127 | +} | ||
128 | +.img2 { | ||
129 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); | ||
130 | +} | ||
131 | +.img3 { | ||
132 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); | ||
133 | +} | ||
134 | +.top_card_tite_box { | ||
135 | + width: 100%; | ||
136 | + display: -webkit-box; | ||
137 | + display: -webkit-flex; | ||
138 | + display: flex; | ||
139 | + -webkit-box-pack: end; | ||
140 | + -webkit-justify-content: flex-end; | ||
141 | + justify-content: flex-end; | ||
142 | +} | ||
143 | +.top_card_tite_a { | ||
144 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
145 | + line-height: 29rpx; | ||
146 | + font-size: 25rpx; | ||
147 | + color: #FFFFFF; | ||
148 | + background: #ffa7c0; | ||
149 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
150 | +} | ||
151 | +.top_card_tite_b { | ||
152 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
153 | + line-height: 29rpx; | ||
154 | + font-size: 25rpx; | ||
155 | + color: #FFFFFF; | ||
156 | + background: #50dfdb; | ||
157 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
158 | +} | ||
159 | +.top_card_tite_c { | ||
160 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
161 | + line-height: 29rpx; | ||
162 | + font-size: 25rpx; | ||
163 | + color: #FFFFFF; | ||
164 | + background: #92cbff; | ||
165 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
166 | +} | ||
167 | +.top_card_tite_d { | ||
168 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
169 | + line-height: 29rpx; | ||
170 | + font-size: 25rpx; | ||
171 | + color: #FFFFFF; | ||
172 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
173 | +} | ||
174 | +.top_card_counte { | ||
175 | + padding: 40rpx 20rpx 0 0; | ||
176 | + text-align: center; | ||
177 | + display: -webkit-box; | ||
178 | + display: -webkit-flex; | ||
179 | + display: flex; | ||
180 | + -webkit-box-pack: center; | ||
181 | + -webkit-justify-content: center; | ||
182 | + justify-content: center; | ||
183 | + -webkit-box-align: center; | ||
184 | + -webkit-align-items: center; | ||
185 | + align-items: center; | ||
186 | + color: #FFFFFF; | ||
187 | + font-size: 40rpx; | ||
188 | +} | ||
189 | +.top_card_remak { | ||
190 | + padding: 20rpx 0 40rpx 0; | ||
191 | + text-align: center; | ||
192 | + display: -webkit-box; | ||
193 | + display: -webkit-flex; | ||
194 | + display: flex; | ||
195 | + -webkit-box-pack: center; | ||
196 | + -webkit-justify-content: center; | ||
197 | + justify-content: center; | ||
198 | + -webkit-box-align: center; | ||
199 | + -webkit-align-items: center; | ||
200 | + align-items: center; | ||
201 | + font-size: 20rpx; | ||
202 | + color: #FFFFFF; | ||
203 | +} | ||
204 | +.top_card_button_a button { | ||
205 | + margin: 0 85rpx; | ||
206 | + background: #ffa6bc; | ||
207 | + border-radius: 50rpx; | ||
208 | + line-height: 40rpx; | ||
209 | + height: 40rpx; | ||
210 | + color: white; | ||
211 | + font-size: 25rpx; | ||
212 | +} | ||
213 | +.top_card_button_b button { | ||
214 | + margin: 0 85rpx; | ||
215 | + background: #50dfdb; | ||
216 | + border-radius: 50rpx; | ||
217 | + line-height: 40rpx; | ||
218 | + height: 40rpx; | ||
219 | + color: white; | ||
220 | + font-size: 25rpx; | ||
221 | +} | ||
222 | +.top_card_button_c button { | ||
223 | + margin: 0 85rpx; | ||
224 | + background: #75bcfc; | ||
225 | + border-radius: 50rpx; | ||
226 | + line-height: 40rpx; | ||
227 | + height: 40rpx; | ||
228 | + color: white; | ||
229 | + font-size: 25rpx; | ||
230 | +} | ||
231 | +.top_card_button_d button { | ||
232 | + margin: 0 85rpx; | ||
233 | + border-radius: 50rpx; | ||
234 | + line-height: 40rpx; | ||
235 | + height: 40rpx; | ||
236 | + color: white; | ||
237 | + font-size: 25rpx; | ||
238 | +} | ||
239 | +.top_box_image { | ||
240 | + padding: 20rpx 20rpx 20rpx 20rpx; | ||
241 | +} | ||
242 | +.top_box_image image { | ||
243 | + height: 216rpx; | ||
244 | + width: 100%; | ||
245 | +} | ||
246 | +.top_box_image button { | ||
247 | + margin: 15rpx 95rpx 0rpx 95rpx; | ||
248 | + background: #fe6a6a; | ||
249 | + border-radius: 50rpx; | ||
250 | + line-height: 60rpx; | ||
251 | + height: 60rpx; | ||
252 | + color: white; | ||
253 | + font-size: 30rpx; | ||
254 | +} | ||
255 | +.foot_box { | ||
256 | + margin: 0 30rpx 40rpx 30rpx; | ||
257 | + background: #FFFFFF; | ||
258 | + border-radius: 20rpx; | ||
259 | +} | ||
260 | +.foot_box_title { | ||
261 | + font-size: 43rpx; | ||
262 | + color: #000000; | ||
263 | + padding: 20rpx 30rpx 20rpx 30rpx; | ||
264 | +} | ||
265 | +.foot_box_text { | ||
266 | + font-size: 30rpx; | ||
267 | + color: #000000; | ||
268 | + line-height: 48rpx; | ||
269 | + padding: 20rpx 35rpx 50rpx 30rpx; | ||
270 | +} | ||
271 | +.button_box { | ||
272 | + margin: 50rpx 50rpx 50rpx 50rpx; | ||
273 | + text-align: center; | ||
274 | +} | ||
275 | +.button { | ||
276 | + margin: 0 30rpx; | ||
277 | + background: #5d93f5; | ||
278 | + border-radius: 50rpx; | ||
279 | + line-height: 80rpx; | ||
280 | + height: 80rpx; | ||
281 | + color: white; | ||
282 | + font-size: 35rpx; | ||
283 | +} | ||
284 | +.button_text { | ||
285 | + padding-top: 20rpx; | ||
286 | + font-size: 20rpx; | ||
287 | + color: white; | ||
288 | + height: 100rpx; | ||
289 | +} | ||
290 | +.foot_empty { | ||
291 | + height: 90rpx; | ||
292 | +} | ||
293 | +.foot_button { | ||
294 | + display: -webkit-box; | ||
295 | + display: -webkit-flex; | ||
296 | + display: flex; | ||
297 | + margin: 20rpx 0rpx 0rpx 0rpx; | ||
298 | + padding: 25rpx 0rpx; | ||
299 | + background: #FFFFFF; | ||
300 | + text-align: center; | ||
301 | + -webkit-box-pack: center; | ||
302 | + -webkit-justify-content: center; | ||
303 | + justify-content: center; | ||
304 | + position: fixed; | ||
305 | + bottom: 0; | ||
306 | + left: 0; | ||
307 | + width: 100%; | ||
308 | +} | ||
309 | +.foot_button_buy { | ||
310 | + background: #e4010c; | ||
311 | + color: #FFFFFF; | ||
312 | + width: 400rpx; | ||
313 | + height: 70rpx; | ||
314 | + font-size: 28rpx; | ||
315 | + line-height: 70rpx; | ||
316 | + border-radius: 30rpx 30rpx 30rpx 30rpx; | ||
317 | +} | ||
318 | +.foot_button_notbuy{ | ||
319 | + background: #999999; | ||
320 | + color: #FFFFFF; | ||
321 | + width: 400rpx; | ||
322 | + height: 70rpx; | ||
323 | + font-size: 28rpx; | ||
324 | + line-height: 70rpx; | ||
325 | + border-radius: 30rpx 30rpx 30rpx 30rpx; | ||
326 | +} | ||
327 | +page { | ||
328 | + background-color: #4784ef; | ||
329 | +} | ||
330 | +button::after { | ||
331 | + border: none; | ||
332 | +} | ||
333 | +.foot_box_text ._img { | ||
334 | + width: 100%; | ||
335 | +} | ||
336 | +.foot_box_text .img { | ||
337 | + line-height: 0; | ||
338 | +} | ||
339 | + |
pages/giftpack/newvipgift/newvipgift.js
0 → 100644
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; | ||
29 | + } else { | ||
30 | + return false; | ||
31 | + } | ||
32 | + } else { | ||
33 | + if (this.cardShow) { | ||
34 | + return false; | ||
35 | + } else { | ||
36 | + return false; | ||
37 | + } | ||
38 | + | ||
39 | + } | ||
40 | + }, | ||
41 | + //判断中间的连接线是否显示 | ||
42 | + cardShows: function cardShows() { | ||
43 | + if (this.cardShow) { | ||
44 | + if (this.packShow) { | ||
45 | + return true; | ||
46 | + } else { | ||
47 | + return false; | ||
48 | + } | ||
49 | + } else { | ||
50 | + if (this.packShow) { | ||
51 | + return false; | ||
52 | + } else { | ||
53 | + return false; | ||
54 | + } | ||
55 | + | ||
56 | + } | ||
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 | + | ||
82 | + }, | ||
83 | + onShow: function onShow() { | ||
84 | + this.textTitle = this.textTitle.replace(/<p><img/gi, "<p class='img'><img"); | ||
85 | + }, | ||
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 | + console.log(res.data.data.actIntro); | ||
154 | + _this.textTitle = res.data.data.actIntro; | ||
155 | + } | ||
156 | + | ||
157 | + } else { | ||
158 | + console.log(res.data.msg); | ||
159 | + } | ||
160 | + } | ||
161 | + }); | ||
162 | + | ||
163 | + }, | ||
164 | + GetWebHttp: function GetWebHttp() { | ||
165 | + this.getUrl = this.$GetInfo.HtmlHttp + '/mobile/index/index/stoid/' + this.getStorageID + '.html'; | ||
166 | + window.location.href = this.getUrl; | ||
167 | + }, | ||
168 | + GetReceive: function GetReceive() { | ||
169 | + var that = this; | ||
170 | + if (that.receiveState == '已领取') { | ||
171 | + return false; | ||
172 | + } | ||
173 | + uni.request({ | ||
174 | + url: that.$GetInfo.ApiHttp + '/api/weshop/marketing/free/receive/gift/record/insert', | ||
175 | + data: { | ||
176 | + "actId": that.getActId, //活动Id | ||
177 | + "actType": '1', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | ||
178 | + "lbId": that.giftID, //礼包Id | ||
179 | + "storeId": that.getStorageID, //商家Id | ||
180 | + "userId": that.getUserID //用户ID | ||
181 | + }, | ||
182 | + method: 'POST', | ||
183 | + header: { | ||
184 | + 'Content-Type': 'application/json' //自定义请求头信息 | ||
185 | + }, | ||
186 | + success: function success(res) { | ||
187 | + console.log(res.data); | ||
188 | + if (res.data.code == 0) { | ||
189 | + console.log(res.data.msg); | ||
190 | + that.receiveState = '已领取'; | ||
191 | + uni.showToast({ | ||
192 | + icon: 'none', | ||
193 | + title: '领取成功!' | ||
194 | + }); | ||
195 | + | ||
196 | + } else { | ||
197 | + console.log(res.data.msg); | ||
198 | + uni.showToast({ | ||
199 | + icon: 'none', | ||
200 | + title: res.data.msg | ||
201 | + }); | ||
202 | + | ||
203 | + } | ||
204 | + } | ||
205 | + }); | ||
206 | + | ||
207 | + } | ||
208 | + } | ||
209 | +}; | ||
0 | \ No newline at end of file | 210 | \ No newline at end of file |
pages/giftpack/newvipgift/newvipgift.json
0 → 100644
pages/giftpack/newvipgift/newvipgift.wxml
0 → 100644
1 | +<view> | ||
2 | + <view class="image_box"> | ||
3 | + <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/vip00.png'}}" ></image> | ||
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> | ||
10 | + </view> | ||
11 | + <view class="top_box_text"> | ||
12 | + <text >新人专享\n你的美丽我来缔造</text> | ||
13 | + </view> | ||
14 | + <view class="top_box_text"> | ||
15 | + <text >______</text> | ||
16 | + </view> | ||
17 | + </view> | ||
18 | + <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
19 | + <view class="top_item "> | ||
20 | + <block wx:if="{{item.lbType==3}}"> | ||
21 | + <view class="top_item_img "> | ||
22 | + <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift02.png'}}" ></image> | ||
23 | + </view> | ||
24 | + </block> | ||
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> | ||
28 | + </view> | ||
29 | + </block> | ||
30 | + <view class="top_item_center "> | ||
31 | + <view class="top_item_center_title "> | ||
32 | + <block wx:if="{{item.lbType==1}}"> | ||
33 | + <text >免费领取</text> | ||
34 | + </block> | ||
35 | + <block wx:if="{{item.lbType==3}}"> | ||
36 | + <text >{{item.fromName}}</text> | ||
37 | + </block> | ||
38 | + </view> | ||
39 | + <view class="top_item_center_ramke "> | ||
40 | + <block wx:if="{{item.lbType==1}}"> | ||
41 | + <text >{{item.fromName}}</text> | ||
42 | + </block> | ||
43 | + <block wx:if="{{item.lbType==3}}"> | ||
44 | + <text >{{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text> | ||
45 | + </block> | ||
46 | + </view> | ||
47 | + </view> | ||
48 | + </view> | ||
49 | + </block> | ||
50 | + </view> | ||
51 | + </block> | ||
52 | + <block wx:if="{{$root.g0}}"> | ||
53 | + <view > | ||
54 | + <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/vip05.png'}}" ></image> | ||
55 | + <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/vip05.png'}}" ></image> | ||
56 | + </view> | ||
57 | + </block> | ||
58 | + <block wx:if="{{this.cardShow}}"> | ||
59 | + <view > | ||
60 | + <view class="top "> | ||
61 | + <view class="top_box "> | ||
62 | + <view class="top_box_text "> | ||
63 | + <text >———</text> | ||
64 | + </view> | ||
65 | + <view class="top_box_text "> | ||
66 | + <text >新人专享优惠券</text> | ||
67 | + </view> | ||
68 | + <view class="top_box_text "> | ||
69 | + <text >———</text> | ||
70 | + </view> | ||
71 | + </view> | ||
72 | + <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
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 | + <view class="top_card_tite_box "> | ||
76 | + <block wx:if="{{item.useObjectType==0}}"> | ||
77 | + <view class="top_card_tite_a ">全场通用</view> | ||
78 | + </block> | ||
79 | + <block wx:if="{{item.useObjectType==1}}"> | ||
80 | + <view class="top_card_tite_b ">品牌限定</view> | ||
81 | + </block> | ||
82 | + <block wx:if="{{item.useObjectType==2}}"> | ||
83 | + <view class="top_card_tite_c ">品类限定</view> | ||
84 | + </block> | ||
85 | + <block wx:if="{{item.useObjectType==11}}"> | ||
86 | + <view class="top_card_tite_a ">用途限定</view> | ||
87 | + </block> | ||
88 | + <block wx:if="{{item.useObjectType==12}}"> | ||
89 | + <view class="top_card_tite_a ">分类1限定</view> | ||
90 | + </block> | ||
91 | + </view> | ||
92 | + <view class="top_card_counte ">{{item.sum+"元券"}}</view> | ||
93 | + <view class="top_card_remak ">{{"满"+item.buySum+"元可以用"}}</view> | ||
94 | + </view> | ||
95 | + </view> | ||
96 | + </block> | ||
97 | + </view> | ||
98 | + </view> | ||
99 | + </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/vip05.png'}}" ></image> | ||
104 | + <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/vip05.png'}}" ></image> | ||
105 | + </view> | ||
106 | + </view> | ||
107 | + </block> | ||
108 | + <block wx:if="{{this.packShow}}"> | ||
109 | + <view > | ||
110 | + <view class="top "> | ||
111 | + <view class="top_box "> | ||
112 | + <view class="top_box_text "> | ||
113 | + <text >———</text> | ||
114 | + </view> | ||
115 | + <view class="top_box_text "> | ||
116 | + <text >新人专享福利</text> | ||
117 | + </view> | ||
118 | + <view class="top_box_text "> | ||
119 | + <text >———</text> | ||
120 | + </view> | ||
121 | + </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> | ||
127 | + </view> | ||
128 | + </view> | ||
129 | + </block> | ||
130 | + <block wx:if="{{this.growUpShow}}"> | ||
131 | + <view > | ||
132 | + <view class="top_box_image "> | ||
133 | + <image src="{{this.$GetInfo.imgHttp+'/miniapp/images/giftbag/vip07.jpg'}}" ></image> | ||
134 | + <button >{{this.growUpTitle}}</button> | ||
135 | + </view> | ||
136 | + </view> | ||
137 | + </block> | ||
138 | + </view> | ||
139 | + </view> | ||
140 | + </block> | ||
141 | + <block wx:if="{{this.textShow}}"> | ||
142 | + <view class="foot_box "> | ||
143 | + <view class="foot_box_title "> | ||
144 | + <text >活动规则:</text> | ||
145 | + </view> | ||
146 | + <view class="foot_box_text "> | ||
147 | + <rich-text nodes="{{this.textTitle}}"></rich-text> | ||
148 | + </view> | ||
149 | + </view> | ||
150 | + </block> | ||
151 | + <view class="button_box "> | ||
152 | + <view > | ||
153 | + <button data-event-opts="{{[['tap',[['GetWebHttp',['$event']]]]]}}" class="button " bindtap="__e">进入商城购物</button> | ||
154 | + </view> | ||
155 | + <view class="button_text "> | ||
156 | + <text >本活动最终解释权归公司所有,如果有问题请联系客服</text> | ||
157 | + </view> | ||
158 | + </view> | ||
159 | + <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> | ||
163 | + </view> | ||
164 | + </view> | ||
165 | +</view> | ||
0 | \ No newline at end of file | 166 | \ No newline at end of file |
pages/giftpack/newvipgift/newvipgift.wxss
0 → 100644
1 | +@charset "UTF-8"; | ||
2 | +/* Author XGQ | ||
3 | + * 2019-10-27 | ||
4 | + */ | ||
5 | +.image_box { | ||
6 | + -webkit-box-pack: center; | ||
7 | + -webkit-justify-content: center; | ||
8 | + justify-content: center; | ||
9 | +} | ||
10 | +.image_box image { | ||
11 | + width: 100%; | ||
12 | + height: 690rpx; | ||
13 | +} | ||
14 | +.top { | ||
15 | + margin: -20rpx 28rpx 45rpx 28rpx; | ||
16 | + padding: 10rpx 10rpx 70rpx 10rpx; | ||
17 | + background-color: #FFFFFF; | ||
18 | + border-radius: 0rpx 0rpx 15rpx 15rpx; | ||
19 | +} | ||
20 | +.top_box { | ||
21 | + display: -webkit-box; | ||
22 | + display: -webkit-flex; | ||
23 | + display: flex; | ||
24 | + text-align: center; | ||
25 | + -webkit-box-pack: center; | ||
26 | + -webkit-justify-content: center; | ||
27 | + justify-content: center; | ||
28 | +} | ||
29 | +.top_box_text { | ||
30 | + -webkit-box-pack: center; | ||
31 | + -webkit-justify-content: center; | ||
32 | + justify-content: center; | ||
33 | + margin: 50rpx 15rpx 20rpx 15rpx; | ||
34 | +} | ||
35 | +.top_box_text text { | ||
36 | + color: #FB6451; | ||
37 | + font-size: 40rpx; | ||
38 | +} | ||
39 | +.top_item { | ||
40 | + display: -webkit-box; | ||
41 | + display: -webkit-flex; | ||
42 | + display: flex; | ||
43 | + width: 100%; | ||
44 | + margin: 60rpx 0 0 0; | ||
45 | +} | ||
46 | +.top_item_img { | ||
47 | + float: left; | ||
48 | + width: 28%; | ||
49 | + margin: 0rpx 10rpx 0rpx 20rpx; | ||
50 | +} | ||
51 | +.top_item_img image { | ||
52 | + width: 150rpx; | ||
53 | + height: 150rpx; | ||
54 | + border-radius: 50%; | ||
55 | + border: #F96865 solid 3rpx; | ||
56 | +} | ||
57 | +.top_item_center { | ||
58 | + float: left; | ||
59 | + width: 50%; | ||
60 | +} | ||
61 | +.top_item_center_title { | ||
62 | + font-size: 35rpx; | ||
63 | + color: #FB6451; | ||
64 | + -webkit-box-pack: start; | ||
65 | + -webkit-justify-content: flex-start; | ||
66 | + justify-content: flex-start; | ||
67 | + padding: 0 10rpx 15rpx 0rpx; | ||
68 | + word-break: break-all; | ||
69 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
70 | + text-overflow: ellipsis; | ||
71 | + display: -webkit-box; | ||
72 | + /** 对象作为伸缩盒子模型显示 **/ | ||
73 | + -webkit-box-orient: vertical; | ||
74 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
75 | + -webkit-line-clamp: 2; | ||
76 | + /** 显示的行数 **/ | ||
77 | + overflow: hidden; | ||
78 | + /** 隐藏超出的内容 **/ | ||
79 | +} | ||
80 | +.top_item_center_ramke { | ||
81 | + font-size: 25rpx; | ||
82 | + -webkit-box-pack: start; | ||
83 | + -webkit-justify-content: flex-start; | ||
84 | + justify-content: flex-start; | ||
85 | + line-height: 35rpx; | ||
86 | + letter-spacing: 0.5rpx; | ||
87 | + word-break: break-all; | ||
88 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
89 | + text-overflow: ellipsis; | ||
90 | + display: -webkit-box; | ||
91 | + /** 对象作为伸缩盒子模型显示 **/ | ||
92 | + -webkit-box-orient: vertical; | ||
93 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
94 | + -webkit-line-clamp: 2; | ||
95 | + /** 显示的行数 **/ | ||
96 | + overflow: hidden; | ||
97 | + /** 隐藏超出的内容 **/ | ||
98 | +} | ||
99 | +.top_item_button { | ||
100 | + float: right; | ||
101 | + width: 22%; | ||
102 | + padding: 65rpx 20rpx 0 1rpx; | ||
103 | +} | ||
104 | +.top_item_button button { | ||
105 | + font-size: 25rpx; | ||
106 | + background: #fd6969; | ||
107 | + color: #FFFFFF; | ||
108 | + border-radius: 50rpx; | ||
109 | + height: 45rpx; | ||
110 | + line-height: 45rpx; | ||
111 | +} | ||
112 | +.top_card { | ||
113 | + width: calc(50% - 30rpx); | ||
114 | + display: inline-block; | ||
115 | + margin: 15rpx; | ||
116 | +} | ||
117 | +.top_card_box { | ||
118 | + background-size: cover; | ||
119 | + background-position: center; | ||
120 | + background-repeat: no-repeat; | ||
121 | + border-radius: 20rpx; | ||
122 | + height: 250rpx; | ||
123 | + margin: 5rpx; | ||
124 | +} | ||
125 | +.img1 { | ||
126 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); | ||
127 | +} | ||
128 | +.img2 { | ||
129 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); | ||
130 | +} | ||
131 | +.img3 { | ||
132 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); | ||
133 | +} | ||
134 | +.top_card_tite_box { | ||
135 | + width: 100%; | ||
136 | + display: -webkit-box; | ||
137 | + display: -webkit-flex; | ||
138 | + display: flex; | ||
139 | + -webkit-box-pack: end; | ||
140 | + -webkit-justify-content: flex-end; | ||
141 | + justify-content: flex-end; | ||
142 | +} | ||
143 | +.top_card_tite_a { | ||
144 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
145 | + line-height: 29rpx; | ||
146 | + font-size: 25rpx; | ||
147 | + color: #FFFFFF; | ||
148 | + background: #ffa7c0; | ||
149 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
150 | +} | ||
151 | +.top_card_tite_b { | ||
152 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
153 | + line-height: 29rpx; | ||
154 | + font-size: 25rpx; | ||
155 | + color: #FFFFFF; | ||
156 | + background: #50dfdb; | ||
157 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
158 | +} | ||
159 | +.top_card_tite_c { | ||
160 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
161 | + line-height: 29rpx; | ||
162 | + font-size: 25rpx; | ||
163 | + color: #FFFFFF; | ||
164 | + background: #92cbff; | ||
165 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
166 | +} | ||
167 | +.top_card_tite_d { | ||
168 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
169 | + line-height: 29rpx; | ||
170 | + font-size: 25rpx; | ||
171 | + color: #FFFFFF; | ||
172 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
173 | +} | ||
174 | +.top_card_counte { | ||
175 | + padding: 40rpx 20rpx 0 0; | ||
176 | + text-align: center; | ||
177 | + display: -webkit-box; | ||
178 | + display: -webkit-flex; | ||
179 | + display: flex; | ||
180 | + -webkit-box-pack: center; | ||
181 | + -webkit-justify-content: center; | ||
182 | + justify-content: center; | ||
183 | + -webkit-box-align: center; | ||
184 | + -webkit-align-items: center; | ||
185 | + align-items: center; | ||
186 | + color: #FFFFFF; | ||
187 | + font-size: 40rpx; | ||
188 | +} | ||
189 | +.top_card_remak { | ||
190 | + padding: 20rpx 0 40rpx 0; | ||
191 | + text-align: center; | ||
192 | + display: -webkit-box; | ||
193 | + display: -webkit-flex; | ||
194 | + display: flex; | ||
195 | + -webkit-box-pack: center; | ||
196 | + -webkit-justify-content: center; | ||
197 | + justify-content: center; | ||
198 | + -webkit-box-align: center; | ||
199 | + -webkit-align-items: center; | ||
200 | + align-items: center; | ||
201 | + font-size: 20rpx; | ||
202 | + color: #FFFFFF; | ||
203 | +} | ||
204 | +.top_card_button_a button { | ||
205 | + margin: 0 85rpx; | ||
206 | + background: #ffa6bc; | ||
207 | + border-radius: 50rpx; | ||
208 | + line-height: 40rpx; | ||
209 | + height: 40rpx; | ||
210 | + color: white; | ||
211 | + font-size: 25rpx; | ||
212 | +} | ||
213 | +.top_card_button_b button { | ||
214 | + margin: 0 85rpx; | ||
215 | + background: #50dfdb; | ||
216 | + border-radius: 50rpx; | ||
217 | + line-height: 40rpx; | ||
218 | + height: 40rpx; | ||
219 | + color: white; | ||
220 | + font-size: 25rpx; | ||
221 | +} | ||
222 | +.top_card_button_c button { | ||
223 | + margin: 0 85rpx; | ||
224 | + background: #75bcfc; | ||
225 | + border-radius: 50rpx; | ||
226 | + line-height: 40rpx; | ||
227 | + height: 40rpx; | ||
228 | + color: white; | ||
229 | + font-size: 25rpx; | ||
230 | +} | ||
231 | +.top_card_button_d button { | ||
232 | + margin: 0 85rpx; | ||
233 | + border-radius: 50rpx; | ||
234 | + line-height: 40rpx; | ||
235 | + height: 40rpx; | ||
236 | + color: white; | ||
237 | + font-size: 25rpx; | ||
238 | +} | ||
239 | +.top_box_image { | ||
240 | + padding: 20rpx 20rpx 20rpx 20rpx; | ||
241 | +} | ||
242 | +.top_box_image image { | ||
243 | + height: 216rpx; | ||
244 | + width: 100%; | ||
245 | +} | ||
246 | +.top_box_image button { | ||
247 | + margin: 15rpx 95rpx 0rpx 95rpx; | ||
248 | + background: #fe6a6a; | ||
249 | + border-radius: 50rpx; | ||
250 | + line-height: 60rpx; | ||
251 | + height: 60rpx; | ||
252 | + color: white; | ||
253 | + font-size: 30rpx; | ||
254 | +} | ||
255 | +.foot_box { | ||
256 | + margin: 0 30rpx 40rpx 30rpx; | ||
257 | + background: #FFFFFF; | ||
258 | + border-radius: 20rpx; | ||
259 | +} | ||
260 | +.foot_box_title { | ||
261 | + font-size: 43rpx; | ||
262 | + color: #000000; | ||
263 | + padding: 20rpx 30rpx 20rpx 30rpx; | ||
264 | +} | ||
265 | +.foot_box_text { | ||
266 | + font-size: 30rpx; | ||
267 | + color: #000000; | ||
268 | + line-height: 48rpx; | ||
269 | + padding: 20rpx 35rpx 50rpx 30rpx; | ||
270 | +} | ||
271 | +.button_box { | ||
272 | + margin: 50rpx 50rpx 50rpx 50rpx; | ||
273 | + text-align: center; | ||
274 | +} | ||
275 | +.button { | ||
276 | + margin: 0 30rpx; | ||
277 | + background: #ff9a8c; | ||
278 | + border-radius: 50rpx; | ||
279 | + line-height: 80rpx; | ||
280 | + height: 80rpx; | ||
281 | + color: white; | ||
282 | + font-size: 35rpx; | ||
283 | +} | ||
284 | +.button_text { | ||
285 | + padding-top: 20rpx; | ||
286 | + font-size: 20rpx; | ||
287 | + color: white; | ||
288 | + height: 100rpx; | ||
289 | +} | ||
290 | +.foot_empty { | ||
291 | + height: 90rpx; | ||
292 | +} | ||
293 | +.foot_button { | ||
294 | + display: -webkit-box; | ||
295 | + display: -webkit-flex; | ||
296 | + display: flex; | ||
297 | + margin: 20rpx 0rpx 0rpx 0rpx; | ||
298 | + padding: 25rpx 0rpx; | ||
299 | + background: #FFFFFF; | ||
300 | + text-align: center; | ||
301 | + -webkit-box-pack: center; | ||
302 | + -webkit-justify-content: center; | ||
303 | + justify-content: center; | ||
304 | + position: fixed; | ||
305 | + bottom: 0; | ||
306 | + left: 0; | ||
307 | + width: 100%; | ||
308 | +} | ||
309 | +.foot_button_buy { | ||
310 | + background: #e4010c; | ||
311 | + color: #FFFFFF; | ||
312 | + width: 400rpx; | ||
313 | + height: 70rpx; | ||
314 | + font-size: 28rpx; | ||
315 | + line-height: 70rpx; | ||
316 | + border-radius: 30rpx 30rpx 30rpx 30rpx; | ||
317 | +} | ||
318 | +.foot_button_notbuy{ | ||
319 | + background: #999999; | ||
320 | + color: #FFFFFF; | ||
321 | + width: 400rpx; | ||
322 | + height: 70rpx; | ||
323 | + font-size: 28rpx; | ||
324 | + line-height: 70rpx; | ||
325 | + border-radius: 30rpx 30rpx 30rpx 30rpx; | ||
326 | +} | ||
327 | +page { | ||
328 | + background-color: #fb6451; | ||
329 | +} | ||
330 | +button::after { | ||
331 | + border: none; | ||
332 | +} | ||
333 | +.foot_box_text ._img { | ||
334 | + width: 100%; | ||
335 | +} | ||
336 | +.foot_box_text .img { | ||
337 | + line-height: 0; | ||
338 | +} | ||
339 | + |