diff --git a/packageB/pages/luckactivity/luckinfo/luckinfo.js b/packageB/pages/luckactivity/luckinfo/luckinfo.js index 40033af..6bbe8ab 100644 --- a/packageB/pages/luckactivity/luckinfo/luckinfo.js +++ b/packageB/pages/luckactivity/luckinfo/luckinfo.js @@ -236,39 +236,22 @@ Page({ // fontColor: '#d64737', // fontSize: '14px' // }, - blocks: [ //背景图 - // { padding: '13px', background: '#d64737', top: '20rpx' } - { - padding: '76rpx', - // background: 'pink', - imgs: [{ - src: imghost + 'miniapp/images/luckDraw/weel.png', - width: '700rpx', - height: '700rpx', - rotate: true, - }] - } - ], - buttons: [ - // { radius: '50px', background: '#d64737' }, - // { radius: '45px', background: '#fff' }, - // { radius: '41px', background: '#f6c66f', pointer: true }, - // { - // radius: '35px', background: '#ffdea0', - // fonts: [{ text: '开始\n抽奖', fontSize: '18px', top: -18 }] - // } - { - radius: '60rpx', - // background: 'black', - // pointer: true, - imgs: [{ - src: imghost + 'miniapp/images/luckDraw/pointer.png', - width: '188rpx', - height: '230rpx', - top: '-130rpx', - }], - } - ], + blocks: [{ + padding: '76rpx', + imgs: [{ + width: '700rpx', + height: '700rpx', + rotate: true, + }], + }], + buttons: [{ + radius: '60rpx', + imgs: [{ + width: '188rpx', + height: '230rpx', + top: '-130rpx', + }], + }], }, onLoad(options) { @@ -370,6 +353,8 @@ Page({ let luckStyle = null; + + if(luckInfo && luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板 let url = `/api/weshop/marketing/marketingLuckTemplate/get/0/${luckInfo.template_id}`; app.request.get(url, { @@ -380,8 +365,8 @@ Page({ self.setData({ template, bannerUrl: imghost + template.bannerUrl, //背景图 - 'blocks[0].imgs[0].src': imghost + ((template&&template.wheelBaseUrl) ? template.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘 - 'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针 + 'blocks[0].imgs[0].src': imghost + ((template&&template.wheelBaseUrl) ? template.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=3'), + 'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=3'), //指针 'imgDraw.views[3].text': template.title, //分享标题 'imgDraw.views[5].url': imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl), //分享图片 }); @@ -407,8 +392,8 @@ Page({ self.setData({ luckStyle, 'imgDraw.views[5].url': self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packageB/images/luckDraw/jiang.png', //分享图片 - //'blocks[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘 - //'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针 + 'blocks[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/weel.png?v=3', //转盘 + 'buttons[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/pointer.png?v=3', //指针 }); // let color = template&&template.colorCode ? template.colorCode:'#da104b'; @@ -443,6 +428,8 @@ Page({ luckStyle = `background: ${color} url(${self.data.bannerUrl}) no-repeat;`; self.setData({ luckStyle, + 'blocks[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/weel.png?v=3', //转盘 + 'buttons[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/pointer.png?v=3', //指针 }); };