Commit b099db07438e82c69f3dce8328f80c452a6018ae
1 parent
3404e6ce
商品详情,转盘修改
Showing
4 changed files
with
28 additions
and
86 deletions
components/goods_list/goods_list.wxml
... | ... | @@ -4,8 +4,8 @@ |
4 | 4 | <view class="collects"> |
5 | 5 | <view class="hang "> |
6 | 6 | <!-- 商品详情 --> |
7 | - <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> | |
8 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" hover-class="none"> | |
7 | + <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}"> | |
8 | + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}" hover-class="none"> | |
9 | 9 | <!-- 商品图⽚ --> |
10 | 10 | <image class="sp" src="{{url+item.original_img}}" mode="aspectFill" binderror="bind_bnerr_xc" data-url="{{url+item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image> |
11 | 11 | <view class="bottom"> | ... | ... |
packageA/pages/goodsInfo/goodsInfo.js
... | ... | @@ -199,8 +199,10 @@ Page({ |
199 | 199 | //------初始化加载---------- |
200 | 200 | onLoad: function(t) { |
201 | 201 | |
202 | - console.log("--服务卡项--"); | |
203 | - console.log(t); | |
202 | + // console.log("--服务卡项--"); | |
203 | + // console.log('fdsfasfasf111111111111111====================',t); | |
204 | + | |
205 | + | |
204 | 206 | |
205 | 207 | var ee = this, |
206 | 208 | that = ee, | ... | ... |
packageB/pages/luckactivity/luckinfo/luckinfo.js
... | ... | @@ -10,70 +10,7 @@ Page({ |
10 | 10 | noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 |
11 | 11 | pageNum: 1, // 当前页数 |
12 | 12 | |
13 | - prizes: [ | |
14 | - { fonts: [{ text: '积分', top: '18%', wordWrap:false, fontColor: 'transparent'}], | |
15 | - imgs: [ | |
16 | - { | |
17 | - src: '', | |
18 | - width: '135rpx', | |
19 | - height: '107rpx', | |
20 | - top: '15%', | |
21 | - } | |
22 | - ], | |
23 | - }, | |
24 | - { fonts: [{ text: '优惠券', top: '18%', wordWrap:false, fontColor: 'transparent'}], | |
25 | - imgs: [ | |
26 | - { | |
27 | - src: '', | |
28 | - width: '135rpx', | |
29 | - height: '107rpx', | |
30 | - top: '15%', | |
31 | - } | |
32 | - ], | |
33 | - }, | |
34 | - { fonts: [{ text: '美容', top: '18%', wordWrap:false, fontColor: 'transparent'}], | |
35 | - imgs: [ | |
36 | - { | |
37 | - src: '', | |
38 | - width: '135rpx', | |
39 | - height: '107rpx', | |
40 | - top: '15%', | |
41 | - } | |
42 | - ], | |
43 | - }, | |
44 | - { fonts: [{ text: '谢谢\n参与', top: '18%', wordWrap:false, fontColor: 'white'}]}, | |
45 | - { fonts: [{ text: '积分', top: '18%', wordWrap:false, fontColor: 'transparent'}], | |
46 | - imgs: [ | |
47 | - { | |
48 | - src: '', | |
49 | - width: '135rpx', | |
50 | - height: '107rpx', | |
51 | - top: '15%', | |
52 | - } | |
53 | - ], | |
54 | - }, | |
55 | - { fonts: [{ text: '优惠券', top: '18%', wordWrap:false, fontColor: 'transparent'}], | |
56 | - imgs: [ | |
57 | - { | |
58 | - src: '', | |
59 | - width: '135rpx', | |
60 | - height: '107rpx', | |
61 | - top: '15%', | |
62 | - } | |
63 | - ], | |
64 | - }, | |
65 | - { fonts: [{ text: '美容', top: '18%', wordWrap:false, fontColor: 'transparent'}], | |
66 | - imgs: [ | |
67 | - { | |
68 | - src: '', | |
69 | - width: '135rpx', | |
70 | - height: '107rpx', | |
71 | - top: '15%', | |
72 | - } | |
73 | - ], | |
74 | - }, | |
75 | - { fonts: [{ text: '谢谢\n参与', top: '18%', wordWrap:false, fontColor: 'white'}], }, | |
76 | - ], | |
13 | + prizes: [], | |
77 | 14 | defaultConfig: { |
78 | 15 | offsetDegree: 22.5, |
79 | 16 | }, |
... | ... | @@ -117,7 +54,7 @@ Page({ |
117 | 54 | }, |
118 | 55 | |
119 | 56 | onLoad(options) { |
120 | - // console.log('imghost', imghost); | |
57 | + console.log('imghost+++++', imghost); | |
121 | 58 | self = this; |
122 | 59 | this.data.options = options; |
123 | 60 | this.setData({ |
... | ... | @@ -168,7 +105,7 @@ Page({ |
168 | 105 | // console.log('luckInfo', res.data.data); |
169 | 106 | let luckInfo = res.data.data; |
170 | 107 | // let imghost = self.data.imghost; |
171 | - if(luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板 | |
108 | + if(luckInfo && luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板 | |
172 | 109 | let url = `/api/weshop/marketing/marketingLuckTemplate/get/${store_id}/${luckInfo.template_id}`; |
173 | 110 | app.request.get(url, { |
174 | 111 | success: function(res) { |
... | ... | @@ -182,9 +119,12 @@ Page({ |
182 | 119 | }, |
183 | 120 | }); |
184 | 121 | } else { |
185 | - self.setData({ | |
186 | - bannerUrl: imghost + luckInfo.store_bannerUrl, | |
187 | - }); | |
122 | + if(luckInfo && luckInfo.store_bannerUrl) { | |
123 | + self.setData({ | |
124 | + bannerUrl: imghost + luckInfo.store_bannerUrl, | |
125 | + }); | |
126 | + }; | |
127 | + | |
188 | 128 | }; |
189 | 129 | |
190 | 130 | }, |
... | ... | @@ -264,7 +204,7 @@ Page({ |
264 | 204 | fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
265 | 205 | imgs: [ |
266 | 206 | { |
267 | - src: self.prizeSrc(award[0].lbtype), | |
207 | + src: self.prizeSrc(award[0].lbtype) ? self.prizeSrc(award[0].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'), | |
268 | 208 | width: '135rpx', |
269 | 209 | height: '107rpx', |
270 | 210 | top: '12%', |
... | ... | @@ -288,7 +228,7 @@ Page({ |
288 | 228 | fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
289 | 229 | imgs: [ |
290 | 230 | { |
291 | - src: self.prizeSrc(award[0].lbtype), | |
231 | + src: self.prizeSrc(award[0].lbtype) ? self.prizeSrc(award[0].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'), | |
292 | 232 | width: '135rpx', |
293 | 233 | height: '107rpx', |
294 | 234 | top: '12%', |
... | ... | @@ -304,7 +244,7 @@ Page({ |
304 | 244 | fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
305 | 245 | imgs: [ |
306 | 246 | { |
307 | - src: self.prizeSrc(award[1].lbtype), | |
247 | + src: self.prizeSrc(award[1].lbtype) ? self.prizeSrc(award[1].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'), | |
308 | 248 | width: '135rpx', |
309 | 249 | height: '107rpx', |
310 | 250 | top: '12%', |
... | ... | @@ -328,7 +268,7 @@ Page({ |
328 | 268 | fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
329 | 269 | imgs: [ |
330 | 270 | { |
331 | - src: self.prizeSrc(award[0].lbtype), | |
271 | + src: self.prizeSrc(award[0].lbtype) ? self.prizeSrc(award[0].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'), | |
332 | 272 | width: '135rpx', |
333 | 273 | height: '107rpx', |
334 | 274 | top: '12%', |
... | ... | @@ -344,7 +284,7 @@ Page({ |
344 | 284 | fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
345 | 285 | imgs: [ |
346 | 286 | { |
347 | - src: self.prizeSrc(award[1].lbtype), | |
287 | + src: self.prizeSrc(award[1].lbtype) ? self.prizeSrc(award[1].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'), | |
348 | 288 | width: '135rpx', |
349 | 289 | height: '107rpx', |
350 | 290 | top: '12%', |
... | ... | @@ -360,7 +300,7 @@ Page({ |
360 | 300 | fonts: [{ text: award[2].luck_goods_name + ' x' + award[2].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
361 | 301 | imgs: [ |
362 | 302 | { |
363 | - src: self.prizeSrc(award[2].lbtype), | |
303 | + src: self.prizeSrc(award[2].lbtype) ? self.prizeSrc(award[2].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'), | |
364 | 304 | width: '135rpx', |
365 | 305 | height: '107rpx', |
366 | 306 | top: '12%', |
... | ... | @@ -385,7 +325,7 @@ Page({ |
385 | 325 | fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
386 | 326 | imgs: [ |
387 | 327 | { |
388 | - src: self.prizeSrc(award[index].lbtype), | |
328 | + src: self.prizeSrc(award[index].lbtype) ? self.prizeSrc(award[index].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'), | |
389 | 329 | width: '135rpx', |
390 | 330 | height: '107rpx', |
391 | 331 | top: '12%', |
... | ... | @@ -409,7 +349,7 @@ Page({ |
409 | 349 | fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
410 | 350 | imgs: [ |
411 | 351 | { |
412 | - src: self.prizeSrc(award[index].lbtype), | |
352 | + src: self.prizeSrc(award[index].lbtype) ? self.prizeSrc(award[index].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'), | |
413 | 353 | width: '135rpx', |
414 | 354 | height: '107rpx', |
415 | 355 | top: '12%', |
... | ... | @@ -433,7 +373,7 @@ Page({ |
433 | 373 | fonts: [{ text: item.luck_goods_name + ' x' + item.num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
434 | 374 | imgs: [ |
435 | 375 | { |
436 | - src: self.prizeSrc(item.lbtype), | |
376 | + src: self.prizeSrc(item.lbtype) ? self.prizeSrc(item.lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'), | |
437 | 377 | width: '135rpx', |
438 | 378 | height: '107rpx', |
439 | 379 | top: '12%', | ... | ... |
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
1 | 1 | <wxs module="filter" src="../../../../utils/filter.wxs"></wxs> |
2 | 2 | <wxs module="tool" src="./tool.wxs"></wxs> |
3 | -<view class="luck-container" style="background: {{template.colorCode}} url({{bannerUrl}}) no-repeat;"> | |
3 | +<view class="luck-container" style="background: {{template.colorCode ? template.colorCode:'#8102FD'}} url({{bannerUrl ? bannerUrl:(imghost + 'miniapp/images/luckDraw/bg.png')}}) no-repeat;"> | |
4 | 4 | <!-- <view class="luck-container" style="background: url({{ bannerUrl}}) no-repeat;"> --> |
5 | 5 | <!-- 中奖人员 --> |
6 | 6 | <view class="swiper-container" wx:if="{{nameList && nameList.length != 0}}"> |
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | </view> |
46 | 46 | <!-- 奖品展示 --> |
47 | 47 | <view> |
48 | - <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge prizes"></image></view> | |
48 | + <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge prizes" lazy-load></image></view> | |
49 | 49 | <view class="list br12 bg-white"> |
50 | 50 | <view class="list-item" wx:for="{{award}}"> |
51 | 51 | <view class="img-container"> |
... | ... | @@ -64,7 +64,7 @@ |
64 | 64 | </view> |
65 | 65 | <!-- 活动展示 --> |
66 | 66 | <view wx:if="{{luckInfo.remark}}"> |
67 | - <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge activity"></image></view> | |
67 | + <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge activity" lazy-load></image></view> | |
68 | 68 | <view class="bg-white br12 pd20"> |
69 | 69 | {{luckInfo.remark}} |
70 | 70 | <!-- 时间 --> |
... | ... | @@ -121,7 +121,7 @@ |
121 | 121 | <!-- 技术支持 --> |
122 | 122 | <view class="t-c"> |
123 | 123 | <!-- <view class="pdt20 fs26 text-underline">帮美店免费开通这个玩法</view> --> |
124 | - <view class="flex ai_c fs24 jc-center pdv20 white"><image src="{{imghost + 'miniapp/images/luckDraw/logo.png'}}" class="logo"></image>提供技术支持</view> | |
124 | + <view class="flex ai_c fs24 jc-center pdv20 white"><image src="{{imghost + 'miniapp/images/luckDraw/logo.png'}}" class="logo" lazy-load></image>提供技术支持</view> | |
125 | 125 | </view> |
126 | 126 | </view> |
127 | 127 | ... | ... |