Commit 1da0cc6389f3b1b0c715229516f80390f09f46e9

Authored by taiyuan
1 parent 82ec4afb

转盘修改

packageB/pages/luckactivity/luckinfo/luckinfo.js
@@ -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: imgDraw,
221 221
222 start: false, 222 start: false,
223 list: null, 223 list: null,
@@ -302,7 +302,7 @@ Page({ @@ -302,7 +302,7 @@ Page({
302 302
303 if(app.globalData.userInfo) { 303 if(app.globalData.userInfo) {
304 if(!this.data.isLogin) { 304 if(!this.data.isLogin) {
305 - imgDraw.views[1].text = app.globalData.userInfo.nickname; 305 +
306 // 下载头像 306 // 下载头像
307 let path = app.globalData.userInfo.head_pic; 307 let path = app.globalData.userInfo.head_pic;
308 path = path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); 308 path = path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
@@ -312,11 +312,10 @@ Page({ @@ -312,11 +312,10 @@ Page({
312 success (res) { 312 success (res) {
313 // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容 313 // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
314 if (res.statusCode === 200) { 314 if (res.statusCode === 200) {
315 - // self.setData({  
316 - // 'imgDraw.views[0].url': res.tempFilePath,//头像  
317 - // }); 315 + self.setData({
  316 + 'imgDraw.views[0].url': res.tempFilePath,//头像
  317 + });
318 318
319 - imgDraw.views[0].url = res.tempFilePath;  
320 } 319 }
321 } 320 }
322 }); 321 });
@@ -325,7 +324,7 @@ Page({ @@ -325,7 +324,7 @@ Page({
325 this.setData({ 324 this.setData({
326 userInfo: app.globalData.userInfo, 325 userInfo: app.globalData.userInfo,
327 isLogin: true, 326 isLogin: true,
328 - //'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称 327 + 'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称
329 }); 328 });
330 329
331 330
@@ -368,15 +367,13 @@ Page({ @@ -368,15 +367,13 @@ Page({
368 // console.log('luckInfo', res.data.data); 367 // console.log('luckInfo', res.data.data);
369 let luckInfo = res.data.data; 368 let luckInfo = res.data.data;
370 369
371 - imgDraw.views[3].text = self.data.luckInfo.act_name;//分享标题  
372 - // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容  
373 - imgDraw.views[14].text = util.formar_no_full(luckInfo.begindate) + ' 至 ' + util.formar_no_full(luckInfo.enddate);//活动时间  
374 370
375 - // self.setData({  
376 - // 'imgDraw.views[3].text': self.data.luckInfo.act_name,//分享标题  
377 - // // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容  
378 - // 'imgDraw.views[14].text': util.formar_no_full(luckInfo.begindate) + ' 至 ' + util.formar_no_full(luckInfo.enddate),//活动时间  
379 - // }); 371 +
  372 + self.setData({
  373 + 'imgDraw.views[3].text': self.data.luckInfo.act_name,//分享标题
  374 + // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容
  375 + 'imgDraw.views[14].text': util.formar_no_full(luckInfo.begindate) + ' 至 ' + util.formar_no_full(luckInfo.enddate),//活动时间
  376 + });
380 377
381 378
382 379
@@ -395,15 +392,11 @@ Page({ @@ -395,15 +392,11 @@ Page({
395 bannerUrl: imghost + template.bannerUrl, //背景图 392 bannerUrl: imghost + template.bannerUrl, //背景图
396 'blocks[0].imgs[0].src': imghost + ((template&&template.wheelBaseUrl) ? template.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=3'), 393 'blocks[0].imgs[0].src': imghost + ((template&&template.wheelBaseUrl) ? template.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=3'),
397 'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=3'), //指针 394 'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=3'), //指针
398 - // 要用  
399 - //'imgDraw.views[3].text': template.share_title ? template.share_title:self.data.luckInfo.act_name, //分享标题  
400 - //'imgDraw.views[5].url': imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl), //分享图片 395 + 'imgDraw.views[3].text': template.share_title ? template.share_title:self.data.luckInfo.act_name, //分享标题
  396 + 'imgDraw.views[5].url': imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl), //分享图片
401 397
402 }); 398 });
403 399
404 - imgDraw.views[3].text = template.share_title ? template.share_title:self.data.luckInfo.act_name; //分享标题  
405 - imgDraw.views[5].url = imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl); //分享图片  
406 -  
407 let color = template&&template.colorCode ? template.colorCode:'#da104b'; 400 let color = template&&template.colorCode ? template.colorCode:'#da104b';
408 luckStyle = `background: ${color} url(${self.data.bannerUrl}) no-repeat;`; 401 luckStyle = `background: ${color} url(${self.data.bannerUrl}) no-repeat;`;
409 self.setData({ 402 self.setData({
@@ -425,13 +418,10 @@ Page({ @@ -425,13 +418,10 @@ Page({
425 luckStyle = `background: #da104b url(${imghost + 'miniapp/images/luckDraw/bg.png?v=2'}) no-repeat;`; 418 luckStyle = `background: #da104b url(${imghost + 'miniapp/images/luckDraw/bg.png?v=2'}) no-repeat;`;
426 self.setData({ 419 self.setData({
427 luckStyle, 420 luckStyle,
428 - //'imgDraw.views[5].url': self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packageB/images/luckDraw/jiang.png', //分享图片 421 + 'imgDraw.views[5].url': self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packageB/images/luckDraw/jiang.png', //分享图片
429 'blocks[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/weel.png?v=3', //转盘 422 'blocks[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/weel.png?v=3', //转盘
430 'buttons[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/pointer.png?v=3', //指针 423 'buttons[0].imgs[0].src': imghost + 'miniapp/images/luckDraw/pointer.png?v=3', //指针
431 }); 424 });
432 -  
433 - imgDraw.views[5].url = self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packageB/images/luckDraw/jiang.png'; //分享图片  
434 -  
435 // let color = template&&template.colorCode ? template.colorCode:'#da104b'; 425 // let color = template&&template.colorCode ? template.colorCode:'#da104b';
436 426
437 // self.setData({ 427 // self.setData({
@@ -445,10 +435,8 @@ Page({ @@ -445,10 +435,8 @@ Page({
445 435
446 if(luckInfo && luckInfo.imageurl) { 436 if(luckInfo && luckInfo.imageurl) {
447 self.setData({ 437 self.setData({
448 - //'imgDraw.views[5].url': imghost + self.data.luckInfo.imageurl, //分享图片 438 + 'imgDraw.views[5].url': imghost + self.data.luckInfo.imageurl, //分享图片
449 }); 439 });
450 -  
451 - imgDraw.views[5].url = imghost + self.data.luckInfo.imageurl; //分享图片  
452 }; 440 };
453 441
454 if(luckInfo && luckInfo.store_bannerUrl) { 442 if(luckInfo && luckInfo.store_bannerUrl) {
@@ -473,9 +461,6 @@ Page({ @@ -473,9 +461,6 @@ Page({
473 461
474 }; 462 };
475 463
476 - self.setData({  
477 - imgDraw: imgDraw,  
478 - });  
479 464
480 if(self.data.luckInfo.msgInfo) { 465 if(self.data.luckInfo.msgInfo) {
481 wx.showToast({ 466 wx.showToast({
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
@@ -189,7 +189,7 @@ @@ -189,7 +189,7 @@
189 189
190 190
191 <!-- 海报 --> 191 <!-- 海报 -->
192 - <view class="poster-container" wx:if="{{showPoster}}"> 192 + <view class="poster-container" hidden="{{!showPoster}}">
193 <view class="t-r pdb20 white2"><text class="iconfont icon-close fs40" bindtap="closePoster"></text></view> 193 <view class="t-r pdb20 white2"><text class="iconfont icon-close fs40" bindtap="closePoster"></text></view>
194 <image src="{{myimg}}" class="poster" show-menu-by-longpress lazy-load></image> 194 <image src="{{myimg}}" class="poster" show-menu-by-longpress lazy-load></image>
195 <view class="pdt10 fs26 white2"><text class="iconfont icon-zhiwen"></text> 长按图片保存至相册</view> 195 <view class="pdt10 fs26 white2"><text class="iconfont icon-zhiwen"></text> 长按图片保存至相册</view>