Merged
Merge Request #712 · created by 后端研发-苏明海


Test


From test into qa

Merged by 后端研发-苏明海

1 participants

packageB/pages/luckactivity/luckinfo/luckinfo.js
... ... @@ -10,7 +10,7 @@ let imgDraw = {
10 10 "views": [
11 11 { //0.头像
12 12 "type": "image",
13   - // "url": "",
  13 + // "url": app.globalData.userInfo.head_pic,
14 14 "css": {
15 15 "background": "white",
16 16 "width": "80px",
... ... @@ -81,8 +81,8 @@ let imgDraw = {
81 81 "url": "/packageB/images/luckDraw/jiang.png",
82 82 "css": {
83 83 "width": "auto",
84   - "height": "350px",
85   - "top": "230px",
  84 + "height": "380px",
  85 + "top": "220px",
86 86 "left": "277px",
87 87 "align": "center",
88 88 "mode": "aspectFill",
... ... @@ -94,7 +94,7 @@ let imgDraw = {
94 94 "css": {
95 95 "width": "30px",
96 96 "height": "30px",
97   - "top": "620px",
  97 + "top": "630px",
98 98 "left": "18px",
99 99 "rotate": "0",
100 100 "borderRadius": "30px",
... ... @@ -106,7 +106,7 @@ let imgDraw = {
106 106 "css": {
107 107 "color": "red",
108 108 "width": "110px",
109   - "top": "620px",
  109 + "top": "630px",
110 110 "left": "52px",
111 111 "fontSize": "22px",
112 112 }
... ... @@ -117,7 +117,7 @@ let imgDraw = {
117 117 "css": {
118 118 "width": "30px",
119 119 "height": "30px",
120   - "top": "620px",
  120 + "top": "630px",
121 121 "left": "208px",
122 122 "borderRadius": "30px",
123 123 }
... ... @@ -128,7 +128,7 @@ let imgDraw = {
128 128 "css": {
129 129 "color": "red",
130 130 "width": "129px",
131   - "top": "620px",
  131 + "top": "630px",
132 132 "left": "243px",
133 133 "fontSize": "22px",
134 134 }
... ... @@ -139,7 +139,7 @@ let imgDraw = {
139 139 "css": {
140 140 "width": "30px",
141 141 "height": "30px",
142   - "top": "620px",
  142 + "top": "630px",
143 143 "left": "410px",
144 144 "borderRadius": "30px",
145 145 }
... ... @@ -150,7 +150,7 @@ let imgDraw = {
150 150 "css": {
151 151 "color": "red",
152 152 "width": "121px",
153   - "top": "620px",
  153 + "top": "630px",
154 154 "left": "450px",
155 155 "fontSize": "22px",
156 156 }
... ... @@ -193,7 +193,7 @@ let imgDraw = {
193 193 "css": {
194 194 "color": "#7c7c7c",
195 195 "width": "348px",
196   - "top": "810px",
  196 + "top": "820px",
197 197 "left": "27px",
198 198 "fontSize": "24px",
199 199 }
... ... @@ -205,7 +205,7 @@ let imgDraw = {
205 205 "css": {
206 206 "width": "150px",
207 207 "height": "150px",
208   - "top": "705px",
  208 + "top": "715px",
209 209 "left": "380px",
210 210 "mode": "scaleToFill"
211 211 }
... ... @@ -217,7 +217,7 @@ let imgDraw = {
217 217  
218 218 Page({
219 219 data: {
220   - imgDraw: imgDraw,
  220 + imgDraw,
221 221 start: false,
222 222 list: null,
223 223 isLoading: false, // 检测是否已经发送请求,防止重复发送请求
... ... @@ -239,6 +239,7 @@ Page({
239 239 blocks: [{
240 240 padding: '76rpx',
241 241 imgs: [{
  242 + src: imghost + 'miniapp/images/luckDraw/weel.png?v=3',
242 243 width: '700rpx',
243 244 height: '700rpx',
244 245 rotate: true,
... ... @@ -247,6 +248,7 @@ Page({
247 248 buttons: [{
248 249 radius: '60rpx',
249 250 imgs: [{
  251 + src: imghost + 'miniapp/images/luckDraw/pointer.png?v=3',
250 252 width: '188rpx',
251 253 height: '230rpx',
252 254 top: '-130rpx',
... ... @@ -310,12 +312,28 @@ Page({
310 312  
311 313 onShow() {
312 314 // console.log('show~~`');
  315 +
313 316 if(app.globalData.userInfo) {
314 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 334 this.setData({
316 335 userInfo: app.globalData.userInfo,
317 336 isLogin: true,
318   - 'imgDraw.views[0].url': app.globalData.userInfo.head_pic,//头像
319 337 'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称
320 338 });
321 339 // console.log('imghost', this.data.imghost);
... ... @@ -340,6 +358,12 @@ Page({
340 358 icon: 'none',
341 359 });
342 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 369 // console.log('luckInfo', res.data.data);
... ... @@ -369,6 +393,7 @@ Page({
369 393 'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=3'), //指针
370 394 'imgDraw.views[3].text': template.title, //分享标题
371 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 399 let color = template&&template.colorCode ? template.colorCode:'#da104b';
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.wxss
... ... @@ -434,7 +434,9 @@ page,
434 434 color: #FFE12F;
435 435 padding: 0 10rpx;
436 436 }
437   -
  437 +.bdt:only-child {
  438 + border-top: none;
  439 +}
438 440 .bdt ~ .bdt {
439 441 border-top: 2rpx solid #ebedf0;
440 442 }
... ... @@ -450,8 +452,8 @@ page,
450 452 }
451 453  
452 454 .poster {
453   - width: 554rpx;
454   - height: 899rpx;
  455 + width: 620rpx;
  456 + height: 995rpx;
455 457 /* border-radius: 16rpx; */
456 458 margin: 0 auto;
457 459 /* background-color: pink; */
... ...