-
Status changed to merged
-
mentioned in commit 72f5f5dab8156df398e397591cb7c87dadcd99d4
Showing
2 changed files
packageB/pages/luckactivity/luckinfo/luckinfo.js
@@ -10,7 +10,7 @@ let imgDraw = { | @@ -10,7 +10,7 @@ let imgDraw = { | ||
10 | "views": [ | 10 | "views": [ |
11 | { //0.头像 | 11 | { //0.头像 |
12 | "type": "image", | 12 | "type": "image", |
13 | - // "url": "", | 13 | + // "url": app.globalData.userInfo.head_pic, |
14 | "css": { | 14 | "css": { |
15 | "background": "white", | 15 | "background": "white", |
16 | "width": "80px", | 16 | "width": "80px", |
@@ -81,8 +81,8 @@ let imgDraw = { | @@ -81,8 +81,8 @@ let imgDraw = { | ||
81 | "url": "/packageB/images/luckDraw/jiang.png", | 81 | "url": "/packageB/images/luckDraw/jiang.png", |
82 | "css": { | 82 | "css": { |
83 | "width": "auto", | 83 | "width": "auto", |
84 | - "height": "350px", | ||
85 | - "top": "230px", | 84 | + "height": "380px", |
85 | + "top": "220px", | ||
86 | "left": "277px", | 86 | "left": "277px", |
87 | "align": "center", | 87 | "align": "center", |
88 | "mode": "aspectFill", | 88 | "mode": "aspectFill", |
@@ -94,7 +94,7 @@ let imgDraw = { | @@ -94,7 +94,7 @@ let imgDraw = { | ||
94 | "css": { | 94 | "css": { |
95 | "width": "30px", | 95 | "width": "30px", |
96 | "height": "30px", | 96 | "height": "30px", |
97 | - "top": "620px", | 97 | + "top": "630px", |
98 | "left": "18px", | 98 | "left": "18px", |
99 | "rotate": "0", | 99 | "rotate": "0", |
100 | "borderRadius": "30px", | 100 | "borderRadius": "30px", |
@@ -106,7 +106,7 @@ let imgDraw = { | @@ -106,7 +106,7 @@ let imgDraw = { | ||
106 | "css": { | 106 | "css": { |
107 | "color": "red", | 107 | "color": "red", |
108 | "width": "110px", | 108 | "width": "110px", |
109 | - "top": "620px", | 109 | + "top": "630px", |
110 | "left": "52px", | 110 | "left": "52px", |
111 | "fontSize": "22px", | 111 | "fontSize": "22px", |
112 | } | 112 | } |
@@ -117,7 +117,7 @@ let imgDraw = { | @@ -117,7 +117,7 @@ let imgDraw = { | ||
117 | "css": { | 117 | "css": { |
118 | "width": "30px", | 118 | "width": "30px", |
119 | "height": "30px", | 119 | "height": "30px", |
120 | - "top": "620px", | 120 | + "top": "630px", |
121 | "left": "208px", | 121 | "left": "208px", |
122 | "borderRadius": "30px", | 122 | "borderRadius": "30px", |
123 | } | 123 | } |
@@ -128,7 +128,7 @@ let imgDraw = { | @@ -128,7 +128,7 @@ let imgDraw = { | ||
128 | "css": { | 128 | "css": { |
129 | "color": "red", | 129 | "color": "red", |
130 | "width": "129px", | 130 | "width": "129px", |
131 | - "top": "620px", | 131 | + "top": "630px", |
132 | "left": "243px", | 132 | "left": "243px", |
133 | "fontSize": "22px", | 133 | "fontSize": "22px", |
134 | } | 134 | } |
@@ -139,7 +139,7 @@ let imgDraw = { | @@ -139,7 +139,7 @@ let imgDraw = { | ||
139 | "css": { | 139 | "css": { |
140 | "width": "30px", | 140 | "width": "30px", |
141 | "height": "30px", | 141 | "height": "30px", |
142 | - "top": "620px", | 142 | + "top": "630px", |
143 | "left": "410px", | 143 | "left": "410px", |
144 | "borderRadius": "30px", | 144 | "borderRadius": "30px", |
145 | } | 145 | } |
@@ -150,7 +150,7 @@ let imgDraw = { | @@ -150,7 +150,7 @@ let imgDraw = { | ||
150 | "css": { | 150 | "css": { |
151 | "color": "red", | 151 | "color": "red", |
152 | "width": "121px", | 152 | "width": "121px", |
153 | - "top": "620px", | 153 | + "top": "630px", |
154 | "left": "450px", | 154 | "left": "450px", |
155 | "fontSize": "22px", | 155 | "fontSize": "22px", |
156 | } | 156 | } |
@@ -193,7 +193,7 @@ let imgDraw = { | @@ -193,7 +193,7 @@ let imgDraw = { | ||
193 | "css": { | 193 | "css": { |
194 | "color": "#7c7c7c", | 194 | "color": "#7c7c7c", |
195 | "width": "348px", | 195 | "width": "348px", |
196 | - "top": "810px", | 196 | + "top": "820px", |
197 | "left": "27px", | 197 | "left": "27px", |
198 | "fontSize": "24px", | 198 | "fontSize": "24px", |
199 | } | 199 | } |
@@ -205,7 +205,7 @@ let imgDraw = { | @@ -205,7 +205,7 @@ let imgDraw = { | ||
205 | "css": { | 205 | "css": { |
206 | "width": "150px", | 206 | "width": "150px", |
207 | "height": "150px", | 207 | "height": "150px", |
208 | - "top": "705px", | 208 | + "top": "715px", |
209 | "left": "380px", | 209 | "left": "380px", |
210 | "mode": "scaleToFill" | 210 | "mode": "scaleToFill" |
211 | } | 211 | } |
@@ -217,7 +217,7 @@ let imgDraw = { | @@ -217,7 +217,7 @@ let imgDraw = { | ||
217 | 217 | ||
218 | Page({ | 218 | Page({ |
219 | data: { | 219 | data: { |
220 | - imgDraw: imgDraw, | 220 | + imgDraw, |
221 | start: false, | 221 | start: false, |
222 | list: null, | 222 | list: null, |
223 | isLoading: false, // 检测是否已经发送请求,防止重复发送请求 | 223 | isLoading: false, // 检测是否已经发送请求,防止重复发送请求 |
@@ -239,6 +239,7 @@ Page({ | @@ -239,6 +239,7 @@ Page({ | ||
239 | blocks: [{ | 239 | blocks: [{ |
240 | padding: '76rpx', | 240 | padding: '76rpx', |
241 | imgs: [{ | 241 | imgs: [{ |
242 | + src: imghost + 'miniapp/images/luckDraw/weel.png?v=3', | ||
242 | width: '700rpx', | 243 | width: '700rpx', |
243 | height: '700rpx', | 244 | height: '700rpx', |
244 | rotate: true, | 245 | rotate: true, |
@@ -247,6 +248,7 @@ Page({ | @@ -247,6 +248,7 @@ Page({ | ||
247 | buttons: [{ | 248 | buttons: [{ |
248 | radius: '60rpx', | 249 | radius: '60rpx', |
249 | imgs: [{ | 250 | imgs: [{ |
251 | + src: imghost + 'miniapp/images/luckDraw/pointer.png?v=3', | ||
250 | width: '188rpx', | 252 | width: '188rpx', |
251 | height: '230rpx', | 253 | height: '230rpx', |
252 | top: '-130rpx', | 254 | top: '-130rpx', |
@@ -310,12 +312,28 @@ Page({ | @@ -310,12 +312,28 @@ Page({ | ||
310 | 312 | ||
311 | onShow() { | 313 | onShow() { |
312 | // console.log('show~~`'); | 314 | // console.log('show~~`'); |
315 | + | ||
313 | if(app.globalData.userInfo) { | 316 | if(app.globalData.userInfo) { |
314 | if(!this.data.isLogin) { | 317 | if(!this.data.isLogin) { |
318 | + // 下载头像 | ||
319 | + let path = app.globalData.userInfo.head_pic; | ||
320 | + path = path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | ||
321 | + path = path.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | ||
322 | + wx.downloadFile({ | ||
323 | + url: path, //仅为示例,并非真实的资源 | ||
324 | + success (res) { | ||
325 | + // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容 | ||
326 | + if (res.statusCode === 200) { | ||
327 | + self.setData({ | ||
328 | + 'imgDraw.views[0].url': res.tempFilePath,//头像 | ||
329 | + }); | ||
330 | + } | ||
331 | + } | ||
332 | + }); | ||
333 | + | ||
315 | this.setData({ | 334 | this.setData({ |
316 | userInfo: app.globalData.userInfo, | 335 | userInfo: app.globalData.userInfo, |
317 | isLogin: true, | 336 | isLogin: true, |
318 | - 'imgDraw.views[0].url': app.globalData.userInfo.head_pic,//头像 | ||
319 | 'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称 | 337 | 'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称 |
320 | }); | 338 | }); |
321 | // console.log('imghost', this.data.imghost); | 339 | // console.log('imghost', this.data.imghost); |
@@ -340,6 +358,12 @@ Page({ | @@ -340,6 +358,12 @@ Page({ | ||
340 | icon: 'none', | 358 | icon: 'none', |
341 | }); | 359 | }); |
342 | self.data.msg = res.data.msg; | 360 | self.data.msg = res.data.msg; |
361 | + // self.setData({ | ||
362 | + // bannerUrl: imghost + 'miniapp/images/luckDraw/bg.png?v=2', | ||
363 | + // 'blocks[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/weel.png?v=3', //转盘 | ||
364 | + // 'buttons[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/pointer.png?v=3', //指针 | ||
365 | + // }); | ||
366 | + | ||
343 | }; | 367 | }; |
344 | 368 | ||
345 | // console.log('luckInfo', res.data.data); | 369 | // console.log('luckInfo', res.data.data); |
@@ -369,6 +393,7 @@ Page({ | @@ -369,6 +393,7 @@ Page({ | ||
369 | 'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=3'), //指针 | 393 | 'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=3'), //指针 |
370 | 'imgDraw.views[3].text': template.title, //分享标题 | 394 | 'imgDraw.views[3].text': template.title, //分享标题 |
371 | 'imgDraw.views[5].url': imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl), //分享图片 | 395 | 'imgDraw.views[5].url': imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl), //分享图片 |
396 | + imgDraw: imgDraw, | ||
372 | }); | 397 | }); |
373 | 398 | ||
374 | let color = template&&template.colorCode ? template.colorCode:'#da104b'; | 399 | let color = template&&template.colorCode ? template.colorCode:'#da104b'; |
packageB/pages/luckactivity/luckinfo/luckinfo.wxss
@@ -434,7 +434,9 @@ page, | @@ -434,7 +434,9 @@ page, | ||
434 | color: #FFE12F; | 434 | color: #FFE12F; |
435 | padding: 0 10rpx; | 435 | padding: 0 10rpx; |
436 | } | 436 | } |
437 | - | 437 | +.bdt:only-child { |
438 | + border-top: none; | ||
439 | +} | ||
438 | .bdt ~ .bdt { | 440 | .bdt ~ .bdt { |
439 | border-top: 2rpx solid #ebedf0; | 441 | border-top: 2rpx solid #ebedf0; |
440 | } | 442 | } |
@@ -450,8 +452,8 @@ page, | @@ -450,8 +452,8 @@ page, | ||
450 | } | 452 | } |
451 | 453 | ||
452 | .poster { | 454 | .poster { |
453 | - width: 554rpx; | ||
454 | - height: 899rpx; | 455 | + width: 620rpx; |
456 | + height: 995rpx; | ||
455 | /* border-radius: 16rpx; */ | 457 | /* border-radius: 16rpx; */ |
456 | margin: 0 auto; | 458 | margin: 0 auto; |
457 | /* background-color: pink; */ | 459 | /* background-color: pink; */ |