Commit ad060c853043a4714c0e8f0c42a97d1006b5513a

Authored by yvan.ni
2 parents 5450d326 7d7eba85

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

packageB/images/luckDraw/jiang.png 0 → 100644

19.6 KB

packageB/pages/luckactivity/luckinfo/luckinfo.js
@@ -6,7 +6,7 @@ let self = null; @@ -6,7 +6,7 @@ let self = null;
6 let imgDraw = { 6 let imgDraw = {
7 "width": "554px", 7 "width": "554px",
8 "height": "899px", 8 "height": "899px",
9 - "background": "http://jmh.xinda100.cn/public/images/share_bg.png", 9 + "background": imghost + "miniapp/images/share_bg.png",
10 "views": [ 10 "views": [
11 { //0.头像 11 { //0.头像
12 "type": "image", 12 "type": "image",
@@ -38,7 +38,7 @@ let imgDraw = { @@ -38,7 +38,7 @@ let imgDraw = {
38 "css": { 38 "css": {
39 "color": "#fff", 39 "color": "#fff",
40 "background": "#FF6768", 40 "background": "#FF6768",
41 - "width": "110px", 41 + "width": "105px",
42 "height": "26px", 42 "height": "26px",
43 "lineHeight": "26px", 43 "lineHeight": "26px",
44 "top": "70px", 44 "top": "70px",
@@ -53,20 +53,18 @@ let imgDraw = { @@ -53,20 +53,18 @@ let imgDraw = {
53 "type": "text", 53 "type": "text",
54 "text": "", 54 "text": "",
55 "css": { 55 "css": {
56 - "color": "red",  
57 "width": "554px", 56 "width": "554px",
58 "padding": "20px", 57 "padding": "20px",
59 "left": "20px", 58 "left": "20px",
60 - "top": "140px", 59 + "top": "160px",
61 "fontSize": "28px", 60 "fontSize": "28px",
62 - "textAlign": "center", 61 + "textAlign": "left",
63 "maxLines": "1", 62 "maxLines": "1",
64 - "fontWeight": "bold",  
65 } 63 }
66 }, 64 },
67 { //4.分享内容 65 { //4.分享内容
68 "type": "text", 66 "type": "text",
69 - "text": "分享内容分享内容分享内容分享内容分享内容分享内容分享内容分享内容分享内容", 67 + "text": "",
70 "css": { 68 "css": {
71 "color": "#000000", 69 "color": "#000000",
72 "width": "554px", 70 "width": "554px",
@@ -80,12 +78,14 @@ let imgDraw = { @@ -80,12 +78,14 @@ let imgDraw = {
80 }, 78 },
81 { //5.分享图片 79 { //5.分享图片
82 "type": "image", 80 "type": "image",
83 - "url": "", 81 + "url": "/packageB/images/luckDraw/jiang.png",
84 "css": { 82 "css": {
85 - "width": "554px", 83 + "width": "auto",
86 "height": "350px", 84 "height": "350px",
87 - "top": "240px",  
88 - "mode": "scaleToFill", 85 + "top": "230px",
  86 + "left": "277px",
  87 + "align": "center",
  88 + "mode": "aspectFill",
89 } 89 }
90 }, 90 },
91 { //6 91 { //6
@@ -280,6 +280,8 @@ Page({ @@ -280,6 +280,8 @@ Page({
280 self = this; 280 self = this;
281 let first_leader = null; 281 let first_leader = null;
282 this.data.options = options; 282 this.data.options = options;
  283 +
  284 +
283 // this.setData({ 285 // this.setData({
284 // options, 286 // options,
285 // imghost, 287 // imghost,
@@ -307,7 +309,7 @@ Page({ @@ -307,7 +309,7 @@ Page({
307 }; 309 };
308 310
309 if(first_leader) { 311 if(first_leader) {
310 - console.log("log---", first_leader); 312 + // console.log("log---", first_leader);
311 app.globalData.first_leader = first_leader; 313 app.globalData.first_leader = first_leader;
312 //调用接口判断是不是会员 314 //调用接口判断是不是会员
313 app.request.promiseGet("/api/weshop/shoppingGuide/get/" + app.globalData.setting.stoid +"/" + first_leader,{}).then(res=>{ 315 app.request.promiseGet("/api/weshop/shoppingGuide/get/" + app.globalData.setting.stoid +"/" + first_leader,{}).then(res=>{
@@ -324,7 +326,7 @@ Page({ @@ -324,7 +326,7 @@ Page({
324 }, 326 },
325 327
326 onShow() { 328 onShow() {
327 - console.log('show~~`'); 329 + // console.log('show~~`');
328 if(app.globalData.userInfo) { 330 if(app.globalData.userInfo) {
329 if(!this.data.isLogin) { 331 if(!this.data.isLogin) {
330 this.setData({ 332 this.setData({
@@ -360,31 +362,59 @@ Page({ @@ -360,31 +362,59 @@ Page({
360 // console.log('luckInfo', res.data.data); 362 // console.log('luckInfo', res.data.data);
361 let luckInfo = res.data.data; 363 let luckInfo = res.data.data;
362 364
  365 + self.setData({
  366 + 'imgDraw.views[3].text': self.data.luckInfo.act_name,//分享标题
  367 + // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容
  368 + 'imgDraw.views[14].text': util.formar_no_full(self.data.luckInfo.begindate) + ' 至 ' + util.formar_no_full(self.data.luckInfo.enddate),//活动时间
  369 + });
363 370
364 if(luckInfo && luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板 371 if(luckInfo && luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板
365 let url = `/api/weshop/marketing/marketingLuckTemplate/get/0/${luckInfo.template_id}`; 372 let url = `/api/weshop/marketing/marketingLuckTemplate/get/0/${luckInfo.template_id}`;
366 app.request.get(url, { 373 app.request.get(url, {
367 success: function(res) { 374 success: function(res) {
368 - // if(res.data.code == 0) { 375 + if(res.data.code == 0) {
369 self.setData({ 376 self.setData({
370 template: res.data.data, 377 template: res.data.data,
371 - bannerUrl: imghost + ((res.data.data&&res.data.data.bannerUrl) ? res.data.data.bannerUrl:'miniapp/images/luckDraw/bg.png?v=2'), //背景图 378 + bannerUrl: imghost + res.data.data.bannerUrl, //背景图
372 'blocks[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘 379 'blocks[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘
373 'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针 380 'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针
374 - 'imgDraw.views[3].text': (res.data.data&&res.data.data.title) ? res.data.data.tilte : self.data.luckInfo.act_name,//分享标题  
375 - 'imgDraw.views[4].text': (res.data.data&&res.data.data.share_content) ? res.data.data.share_content : '快来一起抽奖吧,精美奖品等着你!',//分享标题  
376 - 'imgDraw.views[5].url': imghost + ((res.data.data&&res.data.data.share_image) ? res.data.data.share_image:self.data.luckInfo.imageurl),//分享图片  
377 - 'imgDraw.views[14].text': util.formar_no_full(self.data.luckInfo.begindate) + ' 至 ' + util.formar_no_full(self.data.luckInfo.enddate),//活动时间 381 + 'imgDraw.views[3].text': res.data.data.title, //分享标题
  382 + 'imgDraw.views[5].url': imghost + (res.data.data&&res.data.data.share_image ? res.data.data.share_image:self.data.luckInfo.imageurl), //分享图片
  383 + });
  384 +
  385 + // self.setData({
  386 + // template: res.data.data,
  387 + // bannerUrl: imghost + res.data.data.bannerUrl, //背景图
  388 + // //bannerUrl: imghost + ((res.data.data&&res.data.data.bannerUrl) ? res.data.data.bannerUrl:'miniapp/images/luckDraw/bg.png?v=2'), //背景图
  389 + // 'blocks[0].imgs[0].src': imghost + res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘
  390 + // 'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针
  391 + // 'imgDraw.views[3].text': (res.data.data&&res.data.data.title) ? res.data.data.title : self.data.luckInfo.act_name,//分享标题
  392 + // // 'imgDraw.views[4].text': (res.data.data&&res.data.data.share_content) ? res.data.data.share_content : '快来一起抽奖吧,精美奖品等着你!',//分享内容
  393 + // 'imgDraw.views[5].url': (res.data.data&&res.data.data.share_image) ? (imghost + res.data.data.share_image):(self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packpageB/images/luckDraw/jiang.png'),//分享图片
  394 + // 'imgDraw.views[14].text': util.formar_no_full(self.data.luckInfo.begindate) + ' 至 ' + util.formar_no_full(self.data.luckInfo.enddate),//活动时间
  395 + // });
  396 + } else {
  397 + self.setData({
  398 + 'imgDraw.views[5].url': self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packageB/images/luckDraw/jiang.png', //分享图片
  399 + //'blocks[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘
  400 + //'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针
378 }); 401 });
379 - // }; 402 + };
380 403
381 }, 404 },
382 }); 405 });
383 } else { 406 } else {
  407 +
  408 + if(luckInfo && luckInfo.imageurl) {
  409 + self.setData({
  410 + 'imgDraw.views[5].url': imghost + self.data.luckInfo.imageurl, //分享图片
  411 + });
  412 + };
384 413
385 if(luckInfo && luckInfo.store_bannerUrl) { 414 if(luckInfo && luckInfo.store_bannerUrl) {
386 self.setData({ 415 self.setData({
387 bannerUrl: imghost + luckInfo.store_bannerUrl, 416 bannerUrl: imghost + luckInfo.store_bannerUrl,
  417 + custom: true,
388 }); 418 });
389 }; 419 };
390 420
@@ -413,7 +443,7 @@ Page({ @@ -413,7 +443,7 @@ Page({
413 self.setData({ 443 self.setData({
414 award, 444 award,
415 }); 445 });
416 - console.log('award', award); 446 + // console.log('award', award);
417 self.prizeLayout(award); 447 self.prizeLayout(award);
418 448
419 }, 449 },
@@ -463,9 +493,9 @@ Page({ @@ -463,9 +493,9 @@ Page({
463 // let user_id = app.globalData.userInfo.user_id; 493 // let user_id = app.globalData.userInfo.user_id;
464 494
465 wx.getImageInfo({ 495 wx.getImageInfo({
466 - src: `${mainUrl}/api/wx/open/app/user/getWeAppEwm/${store_id}?sceneValue=${user_id}_${cj_id}&pageValue=packageB/pages/luckactivity/luckinfo/luckinfo`, 496 + src: `${mainUrl}/api/wx/open/app/user/getWeAppEwm/${store_id}?sceneValue=${user_id}_${cj_id}&pageValue=pages/index/index/index`,
467 success (res) { 497 success (res) {
468 - if(res.data.code != -1) { 498 + if(res.code != -1) {
469 self.setData({ 499 self.setData({
470 'imgDraw.views[16].url': res.path, 500 'imgDraw.views[16].url': res.path,
471 }); 501 });
@@ -498,7 +528,7 @@ Page({ @@ -498,7 +528,7 @@ Page({
498 if(length == 1) { 528 if(length == 1) {
499 [0,2,4,6].map(function(item, index) { 529 [0,2,4,6].map(function(item, index) {
500 prizes[item] = { 530 prizes[item] = {
501 - id: award[0].record_id, 531 + id: award[0].id,
502 lbtype: award[0].lbtype, 532 lbtype: award[0].lbtype,
503 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 533 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
504 imgs: [ 534 imgs: [
@@ -522,7 +552,7 @@ Page({ @@ -522,7 +552,7 @@ Page({
522 if(length == 2) { 552 if(length == 2) {
523 [0,4].map(function(item, index) { 553 [0,4].map(function(item, index) {
524 prizes[item] = { 554 prizes[item] = {
525 - id: award[0].record_id, 555 + id: award[0].id,
526 lbtype: award[0].lbtype, 556 lbtype: award[0].lbtype,
527 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 557 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
528 imgs: [ 558 imgs: [
@@ -538,7 +568,7 @@ Page({ @@ -538,7 +568,7 @@ Page({
538 568
539 [2,6].map(function(item, index) { 569 [2,6].map(function(item, index) {
540 prizes[item] = { 570 prizes[item] = {
541 - id: award[1].record_id, 571 + id: award[1].id,
542 lbtype: award[1].lbtype, 572 lbtype: award[1].lbtype,
543 fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 573 fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
544 imgs: [ 574 imgs: [
@@ -562,7 +592,7 @@ Page({ @@ -562,7 +592,7 @@ Page({
562 if(length == 3) { 592 if(length == 3) {
563 [0,4].map(function(item, index) { 593 [0,4].map(function(item, index) {
564 prizes[item] = { 594 prizes[item] = {
565 - id: award[0].record_id, 595 + id: award[0].id,
566 lbtype: award[0].lbtype, 596 lbtype: award[0].lbtype,
567 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 597 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
568 imgs: [ 598 imgs: [
@@ -578,7 +608,7 @@ Page({ @@ -578,7 +608,7 @@ Page({
578 608
579 [1,5].map(function(item, index) { 609 [1,5].map(function(item, index) {
580 prizes[item] = { 610 prizes[item] = {
581 - id: award[1].record_id, 611 + id: award[1].id,
582 lbtype: award[1].lbtype, 612 lbtype: award[1].lbtype,
583 fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 613 fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
584 imgs: [ 614 imgs: [
@@ -594,7 +624,7 @@ Page({ @@ -594,7 +624,7 @@ Page({
594 624
595 [2,6].map(function(item, index) { 625 [2,6].map(function(item, index) {
596 prizes[item] = { 626 prizes[item] = {
597 - id: award[2].record_id, 627 + id: award[2].id,
598 lbtype: award[2].lbtype, 628 lbtype: award[2].lbtype,
599 fonts: [{ text: award[2].luck_goods_name + ' x' + award[2].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 629 fonts: [{ text: award[2].luck_goods_name + ' x' + award[2].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
600 imgs: [ 630 imgs: [
@@ -619,7 +649,7 @@ Page({ @@ -619,7 +649,7 @@ Page({
619 if(length == 4) { 649 if(length == 4) {
620 [0,2,4,6].map(function(item, index) { 650 [0,2,4,6].map(function(item, index) {
621 prizes[item] = { 651 prizes[item] = {
622 - id: award[index].record_id, 652 + id: award[index].id,
623 lbtype: award[index].lbtype, 653 lbtype: award[index].lbtype,
624 fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 654 fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
625 imgs: [ 655 imgs: [
@@ -643,7 +673,7 @@ Page({ @@ -643,7 +673,7 @@ Page({
643 if(length == 5) { 673 if(length == 5) {
644 [0,2,3,5,6].map(function(item, index) { 674 [0,2,3,5,6].map(function(item, index) {
645 prizes[item] = { 675 prizes[item] = {
646 - id: award[index].record_id, 676 + id: award[index].id,
647 lbtype: award[index].lbtype, 677 lbtype: award[index].lbtype,
648 fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 678 fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
649 imgs: [ 679 imgs: [
@@ -667,7 +697,7 @@ Page({ @@ -667,7 +697,7 @@ Page({
667 if(length == 6) { 697 if(length == 6) {
668 prizes = award.map(function(item, index) { 698 prizes = award.map(function(item, index) {
669 return { 699 return {
670 - id: item.record_id, 700 + id: item.id,
671 lbtype: item.lbtype, 701 lbtype: item.lbtype,
672 fonts: [{ text: item.luck_goods_name + ' x' + item.num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 702 fonts: [{ text: item.luck_goods_name + ' x' + item.num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
673 imgs: [ 703 imgs: [
@@ -790,7 +820,7 @@ Page({ @@ -790,7 +820,7 @@ Page({
790 if(res.data.code == 0) { 820 if(res.data.code == 0) {
791 821
792 if(self.data.luckInfo.user_LuckNumDay > 0 || self.data.luckInfo.vip_act_num == 0) { 822 if(self.data.luckInfo.user_LuckNumDay > 0 || self.data.luckInfo.vip_act_num == 0) {
793 - console.log('start choujiang'); 823 + // console.log('start choujiang');
794 // let start = false; 824 // let start = false;
795 if(!self.data.start) { 825 if(!self.data.start) {
796 self.data.start = true; 826 self.data.start = true;
@@ -810,7 +840,7 @@ Page({ @@ -810,7 +840,7 @@ Page({
810 success: function(res) { 840 success: function(res) {
811 841
812 if(res.data.code == 0) { 842 if(res.data.code == 0) {
813 - console.log('开始摇奖', res.data.data); 843 + // console.log('开始摇奖', res.data.data);
814 if(self.data.luckInfo.vip_act_num != 0) { 844 if(self.data.luckInfo.vip_act_num != 0) {
815 self.setData({ 845 self.setData({
816 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1, 846 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,
@@ -823,6 +853,7 @@ Page({ @@ -823,6 +853,7 @@ Page({
823 isActive: true, 853 isActive: true,
824 wow: res.data.data, 854 wow: res.data.data,
825 }); 855 });
  856 + // console.log('wow', self.data.wow);
826 // console.log('请求成功', res.data.data); 857 // console.log('请求成功', res.data.data);
827 let luckyId = res.data.data.id; 858 let luckyId = res.data.data.id;
828 let indexArr = self.luckyIndex(self.data.prizes, luckyId); 859 let indexArr = self.luckyIndex(self.data.prizes, luckyId);
@@ -938,12 +969,12 @@ Page({ @@ -938,12 +969,12 @@ Page({
938 console.log('抽奖结果:',event.detail); 969 console.log('抽奖结果:',event.detail);
939 let no_luck_urltype = this.data.luckInfo.no_luck_urltype; 970 let no_luck_urltype = this.data.luckInfo.no_luck_urltype;
940 let lbtype = null; 971 let lbtype = null;
941 - let good_id = null; 972 + // let good_id = null;
942 let resultTitle = event.detail.fonts[0].text.replace('\n',''); 973 let resultTitle = event.detail.fonts[0].text.replace('\n','');
943 - if(event.detail.id) {  
944 - console.log('~~~~~~----++++++',event.detail.id);  
945 - good_id = event.detail.id;  
946 - }; 974 + // if(event.detail.id) {
  975 + // console.log('~~~~~~----++++++',event.detail.id);
  976 + // good_id = event.detail.id;
  977 + // };
947 if(event.detail.lbtype == 5) { 978 if(event.detail.lbtype == 5) {
948 lbtype = 5; 979 lbtype = 5;
949 } else { 980 } else {
@@ -957,7 +988,7 @@ Page({ @@ -957,7 +988,7 @@ Page({
957 resultTitle, 988 resultTitle,
958 showPopup: false, 989 showPopup: false,
959 currentLbtype: lbtype, 990 currentLbtype: lbtype,
960 - good_id, 991 + // good_id,
961 }); 992 });
962 993
963 994
@@ -1194,10 +1225,10 @@ Page({ @@ -1194,10 +1225,10 @@ Page({
1194 if(e && e.currentTarget.dataset.id) { 1225 if(e && e.currentTarget.dataset.id) {
1195 id = e.currentTarget.dataset.id; 1226 id = e.currentTarget.dataset.id;
1196 } else { 1227 } else {
1197 - id = this.data.good_id; 1228 + id = this.data.wow.record_id;
1198 }; 1229 };
1199 let url = `/api/weshop/marketing/marketingLuckList/updateGoodsVerifyCode/${store_id}/${id}`; 1230 let url = `/api/weshop/marketing/marketingLuckList/updateGoodsVerifyCode/${store_id}/${id}`;
1200 - console.log('good_id', id, url); 1231 + // console.log('good_id', id, url);
1201 app.request.put(url, { 1232 app.request.put(url, {
1202 success: function(res) { 1233 success: function(res) {
1203 if(res.data.code == 0) { 1234 if(res.data.code == 0) {
@@ -1229,7 +1260,6 @@ Page({ @@ -1229,7 +1260,6 @@ Page({
1229 clickReceive() { 1260 clickReceive() {
1230 this.setData({ 1261 this.setData({
1231 showResult: false, 1262 showResult: false,
1232 - showMask: false,  
1233 }); 1263 });
1234 this.showQr(); 1264 this.showQr();
1235 }, 1265 },
@@ -1257,4 +1287,34 @@ Page({ @@ -1257,4 +1287,34 @@ Page({
1257 myimg: e.detail.path, 1287 myimg: e.detail.path,
1258 }); 1288 });
1259 }, 1289 },
  1290 +
  1291 +
  1292 + imageSize(e, boxWidth, boxHeight) {
  1293 + var imageSize = {};
  1294 + var originalWidth = e.detail.width;//图片原始宽
  1295 + var originalHeight = e.detail.height;//图片原始高
  1296 + var originalScale = originalHeight/originalWidth;//图片高宽比
  1297 + console.log('originalWidth: ' + originalWidth)
  1298 + console.log('originalHeight: ' + originalHeight)
  1299 +
  1300 + //获取屏幕宽高
  1301 + var boxWidth = boxWidth;
  1302 + var boxHeight = boxHeight;
  1303 + var boxscale = boxHeight/boxWidth;//屏幕高宽比
  1304 + console.log('windowWidth: ' + boxWidth)
  1305 + console.log('windowHeight: ' + boxHeight)
  1306 + if(originalScale < boxscale){//图片高宽比小于屏幕高宽比
  1307 + //图片缩放后的宽为屏幕宽
  1308 + imageSize.imageWidth = boxWidth;
  1309 + imageSize.imageHeight = (boxWidth * originalHeight) / originalWidth;
  1310 + }else{//图片高宽比大于屏幕高宽比
  1311 + //图片缩放后的高为屏幕高
  1312 + imageSize.imageHeight = boxHeight;
  1313 + imageSize.imageWidth = (boxHeight * originalWidth) / originalHeight;
  1314 + }
  1315 + console.log('缩放后的宽: ' + imageSize.imageWidth)
  1316 + console.log('缩放后的高: ' + imageSize.imageHeight)
  1317 + console.log('图片尺寸', imageSize);
  1318 + return imageSize;
  1319 + },
1260 }) 1320 })
1261 \ No newline at end of file 1321 \ No newline at end of file
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
1 <wxs module="filter" src="../../../../utils/filter.wxs"></wxs> 1 <wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
2 <wxs module="tool" src="./tool.wxs"></wxs> 2 <wxs module="tool" src="./tool.wxs"></wxs>
3 -<view class="luck-container {{template ? '':'on'}}" style="background: {{template.colorCode ? template.colorCode:'#f0f0f0'}} url({{bannerUrl ? bannerUrl:(imghost + 'miniapp/images/luckDraw/bg.png?v=2')}}) no-repeat;"> 3 +<view class="luck-container {{!template&&custom ? 'on':''}}" style="background: {{template&&template.colorCode ? template.colorCode:(custom ? '#f0f0f0':'#da104b')}} url({{bannerUrl ? bannerUrl:(imghost + 'miniapp/images/luckDraw/bg.png?v=2')}}) no-repeat;">
4 <!-- 中奖人员 --> 4 <!-- 中奖人员 -->
5 <view class="swiper-container" wx:if="{{nameList && nameList.length != 0}}"> 5 <view class="swiper-container" wx:if="{{nameList && nameList.length != 0}}">
6 <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000"> 6 <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000">
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 /> 36 />
37 </view> 37 </view>
38 <view class="weel-txt fs28 white t-c pdt10" wx:if="{{luckInfo.vip_act_num == 0}}">今天你有 <text class="fs50 c-yellow cs">不限次</text> 抽奖机会</view> 38 <view class="weel-txt fs28 white t-c pdt10" wx:if="{{luckInfo.vip_act_num == 0}}">今天你有 <text class="fs50 c-yellow cs">不限次</text> 抽奖机会</view>
39 - <view class="weel-txt fs28 white t-c pdt10" wx:else>今天你还有 <text class="fs50 c-yellow">{{filter.show_default(luckInfo.user_LuckNumDay, '0')}}</text> 次抽奖机会</view> 39 + <view class="weel-txt fs28 white t-c pdt10" wx:else>今天你还有 <text class="fs50 c-yellow cs">{{filter.show_default(luckInfo.user_LuckNumDay, '0')}}</text> 次抽奖机会</view>
40 <view class="tip-to-down expand-transition"> 40 <view class="tip-to-down expand-transition">
41 <text></text> 41 <text></text>
42 <text></text> 42 <text></text>
@@ -118,7 +118,7 @@ @@ -118,7 +118,7 @@
118 <!-- 技术支持 --> 118 <!-- 技术支持 -->
119 <view class="logo-container t-c"> 119 <view class="logo-container t-c">
120 <!-- <view class="pdt20 fs26 text-underline">帮美店免费开通这个玩法</view> --> 120 <!-- <view class="pdt20 fs26 text-underline">帮美店免费开通这个玩法</view> -->
121 - <view class="flex ai_c fs24 jc-center pdv20 white"><image src="{{imghost + 'miniapp/images/luckDraw/logo.png'}}" class="logo" lazy-load></image>提供技术支持</view> 121 + <view class="flex ai_c fs24 jc-center pdv20 white"><image src="{{imghost + 'miniapp/images/luckDraw/logo.png?v=3'}}" class="logo" lazy-load></image>提供技术支持</view>
122 </view> 122 </view>
123 </view> 123 </view>
124 124
packageB/pages/luckactivity/luckinfo/luckinfo.wxss
@@ -113,8 +113,8 @@ page, @@ -113,8 +113,8 @@ page,
113 } 113 }
114 114
115 .logo { 115 .logo {
116 - width: 120rpx;  
117 - height: 40rpx; 116 + width: 132rpx;
  117 + height: 37rpx;
118 margin-right: 10rpx; 118 margin-right: 10rpx;
119 } 119 }
120 120
@@ -470,7 +470,7 @@ page, @@ -470,7 +470,7 @@ page,
470 } 470 }
471 471
472 .luck-container.on .panel { 472 .luck-container.on .panel {
473 - box-shadow: 0 16rpx 24rpx #e7e9eb; 473 + box-shadow: 0 0 24rpx #e7e9eb;
474 } 474 }
475 475
476 .luck-container.on .cs { 476 .luck-container.on .cs {