Commit cd4fb867e6b21d67eec4119ea3023bed36b03dc7
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
14 changed files
with
162 additions
and
44 deletions
app.js
components/my_confirm/my_confirm.wxml
@@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
6 | <view class="shut" bindtap="close_yu_e">ⅹ</view> | 6 | <view class="shut" bindtap="close_yu_e">ⅹ</view> |
7 | <view class="fs32 xc-black3 flex jc-center ai-center" style="padding: 10rpx 20rpx;min-height:220rpx;"><text>{{title}}</text></view> | 7 | <view class="fs32 xc-black3 flex jc-center ai-center" style="padding: 10rpx 20rpx;min-height:220rpx;"><text>{{title}}</text></view> |
8 | <view class="flex jc-center ai_center" style="width: 100%;height: 75rpx;"> | 8 | <view class="flex jc-center ai_center" style="width: 100%;height: 75rpx;"> |
9 | - <view bindtap="go_sure" class="fs30 white flex jc-center ai-center ck_btn color color" style="margin-right: 20rpx;">{{s_text}}</view> | ||
10 | - <view bindtap='go_cancle' class="fs30 xc-ash flex jc-center ai-center ck_btn"style="background:#ececea;">{{c_text}}</view> | 9 | + <view bindtap="go_sure" class="fs30 white flex jc-center ai-center ck_btn" style="margin-right: 20rpx;background:#ececea;">{{s_text}}</view> |
10 | + <view bindtap='go_cancle' class="fs30 xc-ash flex jc-center ai-center ck_btn color" >{{c_text}}</view> | ||
11 | </view> | 11 | </view> |
12 | </view> | 12 | </view> |
13 | </view> | 13 | </view> |
components/my_confirm/my_confirm.wxss
1 | - | 1 | +@import '../../app.wxss'; |
2 | /* 弹窗样式 */ | 2 | /* 弹窗样式 */ |
3 | .xc-pop-up{ | 3 | .xc-pop-up{ |
4 | width: 100%; | 4 | width: 100%; |
@@ -23,19 +23,19 @@ | @@ -23,19 +23,19 @@ | ||
23 | 23 | ||
24 | .shut{ | 24 | .shut{ |
25 | display: block; | 25 | display: block; |
26 | - width: 54rpx; | ||
27 | - height: 54rpx; | ||
28 | - font-size: 50rpx; | ||
29 | - line-height:47rpx; | 26 | + width: 45rpx; |
27 | + height: 45rpx; | ||
28 | + line-height:36rpx; | ||
30 | border-radius: 50%; | 29 | border-radius: 50%; |
31 | -moz-border-radius: 50%; | 30 | -moz-border-radius: 50%; |
32 | -webkit-border-radius: 50%; | 31 | -webkit-border-radius: 50%; |
32 | + font-size: 40rpx; | ||
33 | color: #fff; | 33 | color: #fff; |
34 | text-align: center; | 34 | text-align: center; |
35 | position: fixed; | 35 | position: fixed; |
36 | - margin-top: -23rpx; | ||
37 | z-index: 66666; | 36 | z-index: 66666; |
38 | - right: 60rpx; | 37 | + right: 75rpx; |
38 | + top: 465rpx; | ||
39 | background: #c8162c; | 39 | background: #c8162c; |
40 | } | 40 | } |
41 | .xc-qr-frame{ | 41 | .xc-qr-frame{ |
@@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
50 | margin-left: -280rpx; border-radius:10rpx | 50 | margin-left: -280rpx; border-radius:10rpx |
51 | } | 51 | } |
52 | 52 | ||
53 | -.ck_btn{width:44%;height:52rpx;line-height:60rpx;background:#f35e73;border-radius:10rpx;} | 53 | +.ck_btn{color: #000; width:44%;height:52rpx;line-height:60rpx;background:#f35e73;border-radius:10rpx;} |
54 | 54 | ||
55 | .fs36{ font-size: 36rpx; } | 55 | .fs36{ font-size: 36rpx; } |
56 | .fs30{ font-size: 30rpx; } | 56 | .fs30{ font-size: 30rpx; } |
components/qr_code/qr_code.wxml
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | </view> | 24 | </view> |
25 | 25 | ||
26 | </view> | 26 | </view> |
27 | - <view class="shut" bindtap="close">ⅹ</view> | 27 | + <view class="shut" bindtap="close"><text class="iconfont icon-close"></text></view> |
28 | </view> | 28 | </view> |
29 | <!-- </scroll-view> --> | 29 | <!-- </scroll-view> --> |
30 | </view> | 30 | </view> |
31 | \ No newline at end of file | 31 | \ No newline at end of file |
components/qr_code/qr_code.wxss
1 | +@import '../../app.wxss'; | ||
2 | + | ||
1 | .xc-pop-up{ | 3 | .xc-pop-up{ |
2 | width: 100%; | 4 | width: 100%; |
3 | height: 100%; | 5 | height: 100%; |
@@ -90,36 +92,39 @@ top: 5rpx; | @@ -90,36 +92,39 @@ top: 5rpx; | ||
90 | .qrcode{ | 92 | .qrcode{ |
91 | width:520rpx; | 93 | width:520rpx; |
92 | height:520rpx; | 94 | height:520rpx; |
93 | - margin-top:-27rpx | 95 | + margin-top:-18rpx |
94 | 96 | ||
95 | 97 | ||
96 | } | 98 | } |
97 | .r-code{ | 99 | .r-code{ |
98 | font-size:28rpx; | 100 | font-size:28rpx; |
99 | - padding-left: 25rpx; | ||
100 | -margin-top: -5.5rpx; | 101 | + margin-top: -5.5rpx; |
102 | + text-align: center; | ||
101 | 103 | ||
102 | } | 104 | } |
103 | 105 | ||
104 | .shut{ | 106 | .shut{ |
105 | - display: block; | 107 | + /* display: block; |
106 | width: 54rpx; | 108 | width: 54rpx; |
107 | height: 54rpx; | 109 | height: 54rpx; |
108 | border: 2rpx solid #fff; | 110 | border: 2rpx solid #fff; |
109 | font-size: 50rpx; | 111 | font-size: 50rpx; |
110 | - z-index:55; | ||
111 | - line-height:47rpx; | 112 | + line-height:54rpx; |
112 | margin-top: 45rpx; | 113 | margin-top: 45rpx; |
113 | border-radius: 50%; | 114 | border-radius: 50%; |
114 | -moz-border-radius: 50%; | 115 | -moz-border-radius: 50%; |
115 | - -webkit-border-radius: 50%; | 116 | + -webkit-border-radius: 50%; */ |
117 | + z-index:55; | ||
116 | color: #fff; | 118 | color: #fff; |
117 | text-align: center; | 119 | text-align: center; |
118 | position: fixed; | 120 | position: fixed; |
119 | top:940rpx; | 121 | top:940rpx; |
120 | - left:345rpx; | ||
121 | - | ||
122 | - | 122 | + left:50%; |
123 | + transform: translateX(-50%); | ||
124 | +} | ||
125 | +.icon-close:before { | ||
126 | + content: "\e62e"; | ||
127 | + font-size: 50rpx; | ||
123 | } | 128 | } |
124 | 129 | ||
125 | .mt{ margin-top:130rpx} | 130 | .mt{ margin-top:130rpx} |
packageA/pages/myGift/myGift.js
@@ -144,8 +144,9 @@ Page({ | @@ -144,8 +144,9 @@ Page({ | ||
144 | isShowLoading: true, | 144 | isShowLoading: true, |
145 | }) | 145 | }) |
146 | .then(function(res) { | 146 | .then(function(res) { |
147 | + console.log(res); | ||
147 | if(res.data.code == 0) { | 148 | if(res.data.code == 0) { |
148 | - | 149 | + |
149 | self.setData({ | 150 | self.setData({ |
150 | isLoading: false | 151 | isLoading: false |
151 | }); | 152 | }); |
@@ -154,10 +155,12 @@ Page({ | @@ -154,10 +155,12 @@ Page({ | ||
154 | self.setData({ | 155 | self.setData({ |
155 | list: res.data.data | 156 | list: res.data.data |
156 | }); | 157 | }); |
158 | + // console.log(this.data.list); | ||
157 | } else { | 159 | } else { |
158 | self.setData({ | 160 | self.setData({ |
159 | 'list.pageData': self.data.list.pageData.concat(res.data.data.pageData) | 161 | 'list.pageData': self.data.list.pageData.concat(res.data.data.pageData) |
160 | }); | 162 | }); |
163 | + | ||
161 | }; | 164 | }; |
162 | 165 | ||
163 | if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) { | 166 | if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) { |
@@ -312,5 +315,19 @@ Page({ | @@ -312,5 +315,19 @@ Page({ | ||
312 | 315 | ||
313 | }) | 316 | }) |
314 | }, | 317 | }, |
318 | + | ||
319 | + | ||
320 | + show_remark:function(e){ | ||
321 | + var index=e.currentTarget.dataset.index; | ||
322 | + var item=this.data.list.pageData[index]; | ||
323 | + this.setData({ | ||
324 | + show_rem_pop:1, | ||
325 | + pop_remark_text:item.lbintro | ||
326 | + }) | ||
327 | + }, | ||
328 | + | ||
329 | + close_remark:function(){ | ||
330 | + this.setData({show_rem_pop:0,}) | ||
331 | + } | ||
315 | 332 | ||
316 | }) | 333 | }) |
317 | \ No newline at end of file | 334 | \ No newline at end of file |
packageA/pages/myGift/myGift.wxml
@@ -8,7 +8,10 @@ | @@ -8,7 +8,10 @@ | ||
8 | <view class="tab-item" wx:for="{{list.pageData}}"> | 8 | <view class="tab-item" wx:for="{{list.pageData}}"> |
9 | <view bindtap="goto" data-url="{{'/packageA/pages/myGiftDetails/myGiftDetails?index=0&id=' + item.id}}"> | 9 | <view bindtap="goto" data-url="{{'/packageA/pages/myGiftDetails/myGiftDetails?index=0&id=' + item.id}}"> |
10 | <!-- 图片 --> | 10 | <!-- 图片 --> |
11 | - <view class="img-container"><image src="{{imghost + (item.lburl ? item.lburl:'miniapp/images/default_g_img.gif')}}" class="img" mode="widthFix"/></view> | 11 | + <view class="img-container rel"> |
12 | + <image src="{{imghost + (item.lburl ? item.lburl:'miniapp/images/default_g_img.gif')}}" class="img" mode="widthFix"/> | ||
13 | + <view catchtap="show_remark" data-index="{{index}}" class="lb_remark ellipsis-1" wx:if="{{item.lbintro}}">活动说明:{{item.lbintro}}</view> | ||
14 | + </view> | ||
12 | <view class="desc-container"> | 15 | <view class="desc-container"> |
13 | <!-- 标题 --> | 16 | <!-- 标题 --> |
14 | <view class="mgb10 ellipsis-2 lh taj">{{item.lbtitle}}</view> | 17 | <view class="mgb10 ellipsis-2 lh taj">{{item.lbtitle}}</view> |
@@ -33,7 +36,7 @@ | @@ -33,7 +36,7 @@ | ||
33 | <view class="fs24 c-a4">已售{{item.salenum}}件</view> | 36 | <view class="fs24 c-a4">已售{{item.salenum}}件</view> |
34 | </view> | 37 | </view> |
35 | <!-- 时间 --> | 38 | <!-- 时间 --> |
36 | - <view class="date">活动截止日期 {{filter.format_time(item.expdate)}}</view> | 39 | + <view class="date">活动结束日期 {{filter.format_time(item.endtime)}}</view> |
37 | <!-- 按钮 --> | 40 | <!-- 按钮 --> |
38 | </view> | 41 | </view> |
39 | </view> | 42 | </view> |
@@ -52,10 +55,11 @@ | @@ -52,10 +55,11 @@ | ||
52 | <!-- 标题 --> | 55 | <!-- 标题 --> |
53 | <view class="mgb10 ellipsis-2 lh taj">{{item.lbtitle}}</view> | 56 | <view class="mgb10 ellipsis-2 lh taj">{{item.lbtitle}}</view> |
54 | <!-- 时间 --> | 57 | <!-- 时间 --> |
55 | - <view class="date pdb20">活动截止日期 {{filter.format_time(item.endtime)}}</view> | 58 | + <view class="date pdb20">兑换截止日期 {{filter.format_time(item.expdate,1)}}</view> |
59 | + <view catchtap="show_remark" data-index="{{index}}" wx:if="{{item.lbintro}}" class="date pdb20">活动说明</view> | ||
56 | </view> | 60 | </view> |
57 | <!-- 说明 --> | 61 | <!-- 说明 --> |
58 | - <view class="c-red fs24">*请到线下门店兑换</view> | 62 | + <view wx:if="{{item.lbtype==1}}" class="c-red fs24">注:请到线下门店兑换</view> |
59 | </view> | 63 | </view> |
60 | </view> | 64 | </view> |
61 | </block> | 65 | </block> |
@@ -68,3 +72,13 @@ | @@ -68,3 +72,13 @@ | ||
68 | <!-- 引入提示组件 --> | 72 | <!-- 引入提示组件 --> |
69 | <warn id="warn"></warn> | 73 | <warn id="warn"></warn> |
70 | <my_confirm id="my_confirm"></my_confirm> | 74 | <my_confirm id="my_confirm"></my_confirm> |
75 | +<view wx:if="{{show_rem_pop}}"> | ||
76 | + <view class="cover-layer" bindtap="close_remark"></view> | ||
77 | + <view class="rem_pop;"> | ||
78 | + <view style="text-align: right;"bindtap="close_remark"><text class="iconfont icon-close" style="font-size: 40rpx;"></text></view> | ||
79 | + <view style="padding: 0 16rpx;"> | ||
80 | + <view class="fs32">活动说明:</view> | ||
81 | + <view class="fs30">{{pop_remark_text}}</view> | ||
82 | + </view> | ||
83 | + </view> | ||
84 | +</view> | ||
71 | \ No newline at end of file | 85 | \ No newline at end of file |
packageA/pages/myGift/myGift.wxss
@@ -164,4 +164,28 @@ page { | @@ -164,4 +164,28 @@ page { | ||
164 | color: #bbb; | 164 | color: #bbb; |
165 | text-align: center; | 165 | text-align: center; |
166 | font-size: 22rpx; | 166 | font-size: 22rpx; |
167 | -} | ||
168 | \ No newline at end of file | 167 | \ No newline at end of file |
168 | +} | ||
169 | +.lb_remark{ | ||
170 | + position: absolute; | ||
171 | + bottom: 0; | ||
172 | + left: 0; | ||
173 | + width: 100%; | ||
174 | + height: 50rpx; | ||
175 | + line-height: 50rpx; | ||
176 | + font-size: 30rpx; | ||
177 | + color: #333; | ||
178 | + padding-left: 10rpx; | ||
179 | + background-color: rgba(250,250,250,0.5); | ||
180 | +} | ||
181 | + | ||
182 | +.rem_pop{ | ||
183 | + position: fixed; | ||
184 | + top: 30%; | ||
185 | + left: 6%; | ||
186 | + width: 88%; | ||
187 | + margin: 0 auto; | ||
188 | + height: 460rpx; | ||
189 | + background-color: #fff; | ||
190 | + z-index: 100; border-radius: 10rpx; | ||
191 | + padding: 10rpx; | ||
192 | +} |
packageA/pages/myGiftDetails/myGiftDetails.js
@@ -11,7 +11,7 @@ Page({ | @@ -11,7 +11,7 @@ Page({ | ||
11 | data: { | 11 | data: { |
12 | qr_code_object: { | 12 | qr_code_object: { |
13 | val: "12121", | 13 | val: "12121", |
14 | - content: "请将二维码展示给核销员,服务更快捷!" | 14 | + content: "当前核销码仅限当面使用!" |
15 | }, | 15 | }, |
16 | }, | 16 | }, |
17 | 17 | ||
@@ -72,7 +72,7 @@ Page({ | @@ -72,7 +72,7 @@ Page({ | ||
72 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | 72 | if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ |
73 | var da= res.data.data.pageData[0] | 73 | var da= res.data.data.pageData[0] |
74 | self.setData({ details:da, }); | 74 | self.setData({ details:da, }); |
75 | - | 75 | + console.log(da); |
76 | //礼包有俩种类型 | 76 | //礼包有俩种类型 |
77 | if(da.lbtype==1){ | 77 | if(da.lbtype==1){ |
78 | app.request.promiseGet('/api/weshop/libao/libaoList/page', { | 78 | app.request.promiseGet('/api/weshop/libao/libaoList/page', { |
@@ -94,6 +94,7 @@ Page({ | @@ -94,6 +94,7 @@ Page({ | ||
94 | }, | 94 | }, |
95 | isShowLoading: true, | 95 | isShowLoading: true, |
96 | }).then(function(res) { | 96 | }).then(function(res) { |
97 | + console.log(res); | ||
97 | if(res.data.code==0){ | 98 | if(res.data.code==0){ |
98 | self.setData({ | 99 | self.setData({ |
99 | list: res.data.data, | 100 | list: res.data.data, |
@@ -150,6 +151,7 @@ Page({ | @@ -150,6 +151,7 @@ Page({ | ||
150 | }, | 151 | }, |
151 | isShowLoading: true, | 152 | isShowLoading: true, |
152 | }).then(function(res) { | 153 | }).then(function(res) { |
154 | + console.log(res); | ||
153 | // console.log('res4-->', res); | 155 | // console.log('res4-->', res); |
154 | if(res.data.code==0 && res.data.data) { | 156 | if(res.data.code==0 && res.data.data) { |
155 | self.setData({ | 157 | self.setData({ |
@@ -290,6 +292,7 @@ Page({ | @@ -290,6 +292,7 @@ Page({ | ||
290 | getApp().request.get("/api/weshop/libao/libaoListvip/getLibaoCode",{ | 292 | getApp().request.get("/api/weshop/libao/libaoListvip/getLibaoCode",{ |
291 | data:data, | 293 | data:data, |
292 | success:function (res){ | 294 | success:function (res){ |
295 | + console.log(res); | ||
293 | if(res.data.code==0){ | 296 | if(res.data.code==0){ |
294 | th.data.qr_code_object.val=res.data.data; | 297 | th.data.qr_code_object.val=res.data.data; |
295 | var qc_com = th.selectComponent("#qrcode"); //组件的id | 298 | var qc_com = th.selectComponent("#qrcode"); //组件的id |
packageA/pages/myGiftDetails/myGiftDetails.wxml
@@ -3,7 +3,17 @@ | @@ -3,7 +3,17 @@ | ||
3 | <!-- 图片 --> | 3 | <!-- 图片 --> |
4 | <view><image src="{{imghost + (details.lburl ? details.lburl:'miniapp/images/default_g_img.gif')}}" class="img" mode="widthFix"/></view> | 4 | <view><image src="{{imghost + (details.lburl ? details.lburl:'miniapp/images/default_g_img.gif')}}" class="img" mode="widthFix"/></view> |
5 | 5 | ||
6 | - <view wx:if="{{index==1}}" class="fs26 exp_title">兑换结束时间:{{filter.format_time(details.expdate,1)}}</view> | 6 | + <!-- 未买 --> |
7 | + <block wx:if="{{index==0}}"> | ||
8 | + <view class="fs26 exp_title">活动结束时间:{{filter.format_time(details.endtime,1)}}</view> | ||
9 | + </block> | ||
10 | + <!-- 已买 --> | ||
11 | + <block wx:else> | ||
12 | + <view wx:if="{{details.lbtype==1}}"class="fs26 exp_title">兑换结束时间:{{filter.format_time(details.expdate,1)}}</view> | ||
13 | + </block> | ||
14 | + | ||
15 | + | ||
16 | + | ||
7 | <!-- 描述--> | 17 | <!-- 描述--> |
8 | <view class="desc-container"> | 18 | <view class="desc-container"> |
9 | <!-- 标题 --> | 19 | <!-- 标题 --> |
@@ -30,7 +40,7 @@ | @@ -30,7 +40,7 @@ | ||
30 | <view class="fs24 c-a4">已售{{details.salenum}}件</view> | 40 | <view class="fs24 c-a4">已售{{details.salenum}}件</view> |
31 | </view> | 41 | </view> |
32 | <!-- 时间 --> | 42 | <!-- 时间 --> |
33 | - <view class="date">活动截止日期 {{details.expdate ? filter.format_time(details.expdate):filter.format_time(details.endtime)}}</view> | 43 | + <!-- <view class="date">活动结束日期 {{filter.format_time(details.endtime)}}</view> --> |
34 | </view> | 44 | </view> |
35 | 45 | ||
36 | 46 | ||
@@ -71,16 +81,40 @@ | @@ -71,16 +81,40 @@ | ||
71 | </view> | 81 | </view> |
72 | 82 | ||
73 | <view wx:if="{{details.lbtype==2}}" class="flex" style="flex-wrap: wrap;"> | 83 | <view wx:if="{{details.lbtype==2}}" class="flex" style="flex-wrap: wrap;"> |
74 | - <block wx:for="{{list}}"> | 84 | + <block wx:for="{{list}}" wx:for-index="f_idx"> |
75 | <block wx:for="{{item.goods_num-0}}" wx:for-item="nitem" wx:for-index="idx"> | 85 | <block wx:for="{{item.goods_num-0}}" wx:for-item="nitem" wx:for-index="idx"> |
76 | <view class="lb_quan" style="background-image: url({{imghost}}/miniapp/images/yhq_{{index%2+1}}.png)"> | 86 | <view class="lb_quan" style="background-image: url({{imghost}}/miniapp/images/yhq_{{index%2+1}}.png)"> |
77 | <view class="flex fs28 fir_view"> | 87 | <view class="flex fs28 fir_view"> |
78 | - <view>满1000.00使用</view> | ||
79 | - <view class="fs38" style="text-align: right">¥1000</view> | 88 | + <view>满{{item.condition}}使用</view> |
89 | + <view class="fs8" style="text-align: right">¥{{item.money}}</view> | ||
80 | </view> | 90 | </view> |
81 | - <view style="font-size: 16rpx; text-align: center">活动结束日期: 2022-06-02 00:00:00 </view> | 91 | + |
92 | + | ||
93 | + <view style="font-size: 16rpx; text-align: center"> {{index==0?'活动结束日期':'截至时间'}}: | ||
94 | + | ||
95 | + <block wx:if="{{item.endtype<1}}"> | ||
96 | + <block wx:if="{{item.use_end_time}}"> | ||
97 | + {{filter.format_time(item.use_end_time,1)}} | ||
98 | + </block> | ||
99 | + <block wx:else> | ||
100 | + 不限 | ||
101 | + </block> | ||
102 | + </block> | ||
103 | + | ||
104 | + <block wx:else> | ||
105 | + <block wx:if="{{item.days>0}}"> | ||
106 | + 有效期{{item.days}}天 | ||
107 | + </block> | ||
108 | + <block wx:else> | ||
109 | + 不限 | ||
110 | + </block> | ||
111 | + | ||
112 | + </block> | ||
113 | + </view> | ||
114 | + | ||
115 | + | ||
82 | </view> | 116 | </view> |
83 | - </block> | 117 | + </block> |
84 | </block> | 118 | </block> |
85 | </view> | 119 | </view> |
86 | 120 | ||
@@ -106,7 +140,7 @@ | @@ -106,7 +140,7 @@ | ||
106 | <view wx:if="{{details.lbprice>0}}" bindtap="GetBuyPrice" class="btn pink">立即购买</view> | 140 | <view wx:if="{{details.lbprice>0}}" bindtap="GetBuyPrice" class="btn pink">立即购买</view> |
107 | </block> | 141 | </block> |
108 | <block wx:else> | 142 | <block wx:else> |
109 | - <view wx:if="{{details.isget}}" data-type="1" class="btn" style="background-color:#aaa;color: #fff">已领</view> | 143 | + <view wx:if="{{details.isget}}" data-type="1" class="btn" style="background-color:#aaa;color: #fff">已领取</view> |
110 | <view wx:else bindtap="show_get_quan" data-type="1" class="btn red">一键领取优惠券→</view> | 144 | <view wx:else bindtap="show_get_quan" data-type="1" class="btn red">一键领取优惠券→</view> |
111 | </block> | 145 | </block> |
112 | </view> | 146 | </view> |
pages/index/index/index.js
@@ -978,15 +978,27 @@ Page({ | @@ -978,15 +978,27 @@ Page({ | ||
978 | var giftBagId = res.data.data.gifBagId; //礼包id | 978 | var giftBagId = res.data.data.gifBagId; //礼包id |
979 | var nav_url = "/pages/giftpack/festival/festival?actId=" + actid + '&' + 'actType=' + 3 + '&' + 'giftBagId=' + giftBagId; | 979 | var nav_url = "/pages/giftpack/festival/festival?actId=" + actid + '&' + 'actType=' + 3 + '&' + 'giftBagId=' + giftBagId; |
980 | var swiperimage = th.data.swiperimage; | 980 | var swiperimage = th.data.swiperimage; |
981 | - var actBoundImg = res.data.data.actBoundImg; | 981 | + var actBoundImg = res.data.data.actBoundImg?res.data.data.actBoundImg:'/miniapp/images/default_g_img.gif'; |
982 | 982 | ||
983 | th.data.holiday_image= res.data.data.actImg; | 983 | th.data.holiday_image= res.data.data.actImg; |
984 | th.data.holiday_url=nav_url; | 984 | th.data.holiday_url=nav_url; |
985 | 985 | ||
986 | var img = { | 986 | var img = { |
987 | image: actBoundImg, | 987 | image: actBoundImg, |
988 | - nav_url: nav_url | 988 | + nav_url: nav_url, |
989 | + id:res.data.data.id, | ||
990 | + type:'festival' | ||
989 | } | 991 | } |
992 | + | ||
993 | + for(var i in swiperimage){ | ||
994 | + var item=swiperimage[i]; | ||
995 | + if(item.id ==img.id && type==img.type){ | ||
996 | + return false; | ||
997 | + } | ||
998 | + } | ||
999 | + | ||
1000 | + | ||
1001 | + | ||
990 | swiperimage.unshift(img); | 1002 | swiperimage.unshift(img); |
991 | th.setData({ | 1003 | th.setData({ |
992 | swiperimage: swiperimage, | 1004 | swiperimage: swiperimage, |
pages/index/index/index.wxml
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | <!--普通界面--> | 9 | <!--普通界面--> |
10 | <wxs module="filter" src="../../../utils/filter.wxs"></wxs> | 10 | <wxs module="filter" src="../../../utils/filter.wxs"></wxs> |
11 | 11 | ||
12 | -<view class="container rel" wx:if="{{ishow}}"> | 12 | +<view class="container rel nor" wx:if="{{ishow}}"> |
13 | <block wx:if="{{banner}}"> | 13 | <block wx:if="{{banner}}"> |
14 | <image class="xc-top-img abs" src="{{url}}/miniapp/images/top-img.png"></image> | 14 | <image class="xc-top-img abs" src="{{url}}/miniapp/images/top-img.png"></image> |
15 | </block> | 15 | </block> |
pages/index/index/index.wxss
@@ -9,7 +9,6 @@ | @@ -9,7 +9,6 @@ | ||
9 | z-index: 99; | 9 | z-index: 99; |
10 | } | 10 | } |
11 | 11 | ||
12 | - | ||
13 | .search-box { | 12 | .search-box { |
14 | /* position: fixed; | 13 | /* position: fixed; |
15 | top: 0; | 14 | top: 0; |
@@ -976,6 +975,10 @@ page { | @@ -976,6 +975,10 @@ page { | ||
976 | 975 | ||
977 | .container { | 976 | .container { |
978 | overflow: hidden; | 977 | overflow: hidden; |
978 | + /* padding-top: 140rpx; */ | ||
979 | +} | ||
980 | + | ||
981 | +.container.nor{ | ||
979 | padding-top: 140rpx; | 982 | padding-top: 140rpx; |
980 | } | 983 | } |
981 | 984 |
project.config.json
@@ -21,6 +21,7 @@ | @@ -21,6 +21,7 @@ | ||
21 | "checkSiteMap": true, | 21 | "checkSiteMap": true, |
22 | "uploadWithSourceMap": true, | 22 | "uploadWithSourceMap": true, |
23 | "compileHotReLoad": false, | 23 | "compileHotReLoad": false, |
24 | + "lazyloadPlaceholderEnable": false, | ||
24 | "useMultiFrameRuntime": true, | 25 | "useMultiFrameRuntime": true, |
25 | "useApiHook": true, | 26 | "useApiHook": true, |
26 | "useApiHostProcess": false, | 27 | "useApiHostProcess": false, |
@@ -30,12 +31,11 @@ | @@ -30,12 +31,11 @@ | ||
30 | "outputPath": "" | 31 | "outputPath": "" |
31 | }, | 32 | }, |
32 | "useIsolateContext": true, | 33 | "useIsolateContext": true, |
33 | - "useCompilerModule": false, | ||
34 | - "userConfirmedUseCompilerModuleSwitch": false, | ||
35 | "userConfirmedBundleSwitch": false, | 34 | "userConfirmedBundleSwitch": false, |
36 | "packNpmManually": false, | 35 | "packNpmManually": false, |
37 | "packNpmRelationList": [], | 36 | "packNpmRelationList": [], |
38 | - "minifyWXSS": true | 37 | + "minifyWXSS": true, |
38 | + "showES6CompileOption": false | ||
39 | }, | 39 | }, |
40 | "compileType": "miniprogram", | 40 | "compileType": "miniprogram", |
41 | "libVersion": "2.16.0", | 41 | "libVersion": "2.16.0", |