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,8 +4,8 @@ | ||
4 | <view class="collects"> | 4 | <view class="collects"> |
5 | <view class="hang "> | 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 | <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> | 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 | <view class="bottom"> | 11 | <view class="bottom"> |
packageA/pages/goodsInfo/goodsInfo.js
@@ -199,8 +199,10 @@ Page({ | @@ -199,8 +199,10 @@ Page({ | ||
199 | //------初始化加载---------- | 199 | //------初始化加载---------- |
200 | onLoad: function(t) { | 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 | var ee = this, | 207 | var ee = this, |
206 | that = ee, | 208 | that = ee, |
packageB/pages/luckactivity/luckinfo/luckinfo.js
@@ -10,70 +10,7 @@ Page({ | @@ -10,70 +10,7 @@ Page({ | ||
10 | noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 | 10 | noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 |
11 | pageNum: 1, // 当前页数 | 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 | defaultConfig: { | 14 | defaultConfig: { |
78 | offsetDegree: 22.5, | 15 | offsetDegree: 22.5, |
79 | }, | 16 | }, |
@@ -117,7 +54,7 @@ Page({ | @@ -117,7 +54,7 @@ Page({ | ||
117 | }, | 54 | }, |
118 | 55 | ||
119 | onLoad(options) { | 56 | onLoad(options) { |
120 | - // console.log('imghost', imghost); | 57 | + console.log('imghost+++++', imghost); |
121 | self = this; | 58 | self = this; |
122 | this.data.options = options; | 59 | this.data.options = options; |
123 | this.setData({ | 60 | this.setData({ |
@@ -168,7 +105,7 @@ Page({ | @@ -168,7 +105,7 @@ Page({ | ||
168 | // console.log('luckInfo', res.data.data); | 105 | // console.log('luckInfo', res.data.data); |
169 | let luckInfo = res.data.data; | 106 | let luckInfo = res.data.data; |
170 | // let imghost = self.data.imghost; | 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 | let url = `/api/weshop/marketing/marketingLuckTemplate/get/${store_id}/${luckInfo.template_id}`; | 109 | let url = `/api/weshop/marketing/marketingLuckTemplate/get/${store_id}/${luckInfo.template_id}`; |
173 | app.request.get(url, { | 110 | app.request.get(url, { |
174 | success: function(res) { | 111 | success: function(res) { |
@@ -182,9 +119,12 @@ Page({ | @@ -182,9 +119,12 @@ Page({ | ||
182 | }, | 119 | }, |
183 | }); | 120 | }); |
184 | } else { | 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,7 +204,7 @@ Page({ | ||
264 | fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], | 204 | fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
265 | imgs: [ | 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 | width: '135rpx', | 208 | width: '135rpx', |
269 | height: '107rpx', | 209 | height: '107rpx', |
270 | top: '12%', | 210 | top: '12%', |
@@ -288,7 +228,7 @@ Page({ | @@ -288,7 +228,7 @@ Page({ | ||
288 | fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], | 228 | fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
289 | imgs: [ | 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 | width: '135rpx', | 232 | width: '135rpx', |
293 | height: '107rpx', | 233 | height: '107rpx', |
294 | top: '12%', | 234 | top: '12%', |
@@ -304,7 +244,7 @@ Page({ | @@ -304,7 +244,7 @@ Page({ | ||
304 | fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], | 244 | fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
305 | imgs: [ | 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 | width: '135rpx', | 248 | width: '135rpx', |
309 | height: '107rpx', | 249 | height: '107rpx', |
310 | top: '12%', | 250 | top: '12%', |
@@ -328,7 +268,7 @@ Page({ | @@ -328,7 +268,7 @@ Page({ | ||
328 | fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], | 268 | fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
329 | imgs: [ | 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 | width: '135rpx', | 272 | width: '135rpx', |
333 | height: '107rpx', | 273 | height: '107rpx', |
334 | top: '12%', | 274 | top: '12%', |
@@ -344,7 +284,7 @@ Page({ | @@ -344,7 +284,7 @@ Page({ | ||
344 | fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], | 284 | fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
345 | imgs: [ | 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 | width: '135rpx', | 288 | width: '135rpx', |
349 | height: '107rpx', | 289 | height: '107rpx', |
350 | top: '12%', | 290 | top: '12%', |
@@ -360,7 +300,7 @@ Page({ | @@ -360,7 +300,7 @@ Page({ | ||
360 | fonts: [{ text: award[2].luck_goods_name + ' x' + award[2].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], | 300 | fonts: [{ text: award[2].luck_goods_name + ' x' + award[2].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
361 | imgs: [ | 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 | width: '135rpx', | 304 | width: '135rpx', |
365 | height: '107rpx', | 305 | height: '107rpx', |
366 | top: '12%', | 306 | top: '12%', |
@@ -385,7 +325,7 @@ Page({ | @@ -385,7 +325,7 @@ Page({ | ||
385 | fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], | 325 | fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
386 | imgs: [ | 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 | width: '135rpx', | 329 | width: '135rpx', |
390 | height: '107rpx', | 330 | height: '107rpx', |
391 | top: '12%', | 331 | top: '12%', |
@@ -409,7 +349,7 @@ Page({ | @@ -409,7 +349,7 @@ Page({ | ||
409 | fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], | 349 | fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
410 | imgs: [ | 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 | width: '135rpx', | 353 | width: '135rpx', |
414 | height: '107rpx', | 354 | height: '107rpx', |
415 | top: '12%', | 355 | top: '12%', |
@@ -433,7 +373,7 @@ Page({ | @@ -433,7 +373,7 @@ Page({ | ||
433 | fonts: [{ text: item.luck_goods_name + ' x' + item.num, top: '18%', wordWrap:false, fontColor: 'transparent'}], | 373 | fonts: [{ text: item.luck_goods_name + ' x' + item.num, top: '18%', wordWrap:false, fontColor: 'transparent'}], |
434 | imgs: [ | 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 | width: '135rpx', | 377 | width: '135rpx', |
438 | height: '107rpx', | 378 | height: '107rpx', |
439 | top: '12%', | 379 | top: '12%', |
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
1 | <wxs module="filter" src="../../../../utils/filter.wxs"></wxs> | 1 | <wxs module="filter" src="../../../../utils/filter.wxs"></wxs> |
2 | <wxs module="tool" src="./tool.wxs"></wxs> | 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 | <!-- <view class="luck-container" style="background: url({{ bannerUrl}}) no-repeat;"> --> | 4 | <!-- <view class="luck-container" style="background: url({{ bannerUrl}}) no-repeat;"> --> |
5 | <!-- 中奖人员 --> | 5 | <!-- 中奖人员 --> |
6 | <view class="swiper-container" wx:if="{{nameList && nameList.length != 0}}"> | 6 | <view class="swiper-container" wx:if="{{nameList && nameList.length != 0}}"> |
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | </view> | 45 | </view> |
46 | <!-- 奖品展示 --> | 46 | <!-- 奖品展示 --> |
47 | <view> | 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 | <view class="list br12 bg-white"> | 49 | <view class="list br12 bg-white"> |
50 | <view class="list-item" wx:for="{{award}}"> | 50 | <view class="list-item" wx:for="{{award}}"> |
51 | <view class="img-container"> | 51 | <view class="img-container"> |
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | </view> | 64 | </view> |
65 | <!-- 活动展示 --> | 65 | <!-- 活动展示 --> |
66 | <view wx:if="{{luckInfo.remark}}"> | 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 | <view class="bg-white br12 pd20"> | 68 | <view class="bg-white br12 pd20"> |
69 | {{luckInfo.remark}} | 69 | {{luckInfo.remark}} |
70 | <!-- 时间 --> | 70 | <!-- 时间 --> |
@@ -121,7 +121,7 @@ | @@ -121,7 +121,7 @@ | ||
121 | <!-- 技术支持 --> | 121 | <!-- 技术支持 --> |
122 | <view class="t-c"> | 122 | <view class="t-c"> |
123 | <!-- <view class="pdt20 fs26 text-underline">帮美店免费开通这个玩法</view> --> | 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 | </view> | 125 | </view> |
126 | </view> | 126 | </view> |
127 | 127 |