Commit 41bfe9af7f355d7080300ee66385c555e799cc0a
Merge branch 'dev' into 'test'
轮盘、指针请求前不加载默认图片 See merge request !708
Showing
1 changed file
with
24 additions
and
37 deletions
packageB/pages/luckactivity/luckinfo/luckinfo.js
| ... | ... | @@ -236,39 +236,22 @@ Page({ | 
| 236 | 236 | // fontColor: '#d64737', | 
| 237 | 237 | // fontSize: '14px' | 
| 238 | 238 | // }, | 
| 239 | - blocks: [ //背景图 | |
| 240 | - // { padding: '13px', background: '#d64737', top: '20rpx' } | |
| 241 | - { | |
| 242 | - padding: '76rpx', | |
| 243 | - // background: 'pink', | |
| 244 | - imgs: [{ | |
| 245 | - src: imghost + 'miniapp/images/luckDraw/weel.png', | |
| 246 | - width: '700rpx', | |
| 247 | - height: '700rpx', | |
| 248 | - rotate: true, | |
| 249 | - }] | |
| 250 | - } | |
| 251 | - ], | |
| 252 | - buttons: [ | |
| 253 | - // { radius: '50px', background: '#d64737' }, | |
| 254 | - // { radius: '45px', background: '#fff' }, | |
| 255 | - // { radius: '41px', background: '#f6c66f', pointer: true }, | |
| 256 | - // { | |
| 257 | - // radius: '35px', background: '#ffdea0', | |
| 258 | - // fonts: [{ text: '开始\n抽奖', fontSize: '18px', top: -18 }] | |
| 259 | - // } | |
| 260 | - { | |
| 261 | - radius: '60rpx', | |
| 262 | - // background: 'black', | |
| 263 | - // pointer: true, | |
| 264 | - imgs: [{ | |
| 265 | - src: imghost + 'miniapp/images/luckDraw/pointer.png', | |
| 266 | - width: '188rpx', | |
| 267 | - height: '230rpx', | |
| 268 | - top: '-130rpx', | |
| 269 | - }], | |
| 270 | - } | |
| 271 | - ], | |
| 239 | + blocks: [{ | |
| 240 | + padding: '76rpx', | |
| 241 | + imgs: [{ | |
| 242 | + width: '700rpx', | |
| 243 | + height: '700rpx', | |
| 244 | + rotate: true, | |
| 245 | + }], | |
| 246 | + }], | |
| 247 | + buttons: [{ | |
| 248 | + radius: '60rpx', | |
| 249 | + imgs: [{ | |
| 250 | + width: '188rpx', | |
| 251 | + height: '230rpx', | |
| 252 | + top: '-130rpx', | |
| 253 | + }], | |
| 254 | + }], | |
| 272 | 255 | }, | 
| 273 | 256 | |
| 274 | 257 | onLoad(options) { | 
| ... | ... | @@ -370,6 +353,8 @@ Page({ | 
| 370 | 353 | |
| 371 | 354 | |
| 372 | 355 | let luckStyle = null; | 
| 356 | + | |
| 357 | + | |
| 373 | 358 | if(luckInfo && luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板 | 
| 374 | 359 | let url = `/api/weshop/marketing/marketingLuckTemplate/get/0/${luckInfo.template_id}`; | 
| 375 | 360 | app.request.get(url, { | 
| ... | ... | @@ -380,8 +365,8 @@ Page({ | 
| 380 | 365 | self.setData({ | 
| 381 | 366 | template, | 
| 382 | 367 | bannerUrl: imghost + template.bannerUrl, //背景图 | 
| 383 | - 'blocks[0].imgs[0].src': imghost + ((template&&template.wheelBaseUrl) ? template.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘 | |
| 384 | - 'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针 | |
| 368 | + 'blocks[0].imgs[0].src': imghost + ((template&&template.wheelBaseUrl) ? template.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=3'), | |
| 369 | + 'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=3'), //指针 | |
| 385 | 370 | 'imgDraw.views[3].text': template.title, //分享标题 | 
| 386 | 371 | 'imgDraw.views[5].url': imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl), //分享图片 | 
| 387 | 372 | }); | 
| ... | ... | @@ -407,8 +392,8 @@ Page({ | 
| 407 | 392 | self.setData({ | 
| 408 | 393 | luckStyle, | 
| 409 | 394 | 'imgDraw.views[5].url': self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packageB/images/luckDraw/jiang.png', //分享图片 | 
| 410 | - //'blocks[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘 | |
| 411 | - //'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针 | |
| 395 | + 'blocks[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/weel.png?v=3', //转盘 | |
| 396 | + 'buttons[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/pointer.png?v=3', //指针 | |
| 412 | 397 | }); | 
| 413 | 398 | // let color = template&&template.colorCode ? template.colorCode:'#da104b'; | 
| 414 | 399 | |
| ... | ... | @@ -443,6 +428,8 @@ Page({ | 
| 443 | 428 | luckStyle = `background: ${color} url(${self.data.bannerUrl}) no-repeat;`; | 
| 444 | 429 | self.setData({ | 
| 445 | 430 | luckStyle, | 
| 431 | + 'blocks[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/weel.png?v=3', //转盘 | |
| 432 | + 'buttons[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/pointer.png?v=3', //指针 | |
| 446 | 433 | }); | 
| 447 | 434 | |
| 448 | 435 | }; | ... | ... | 
