Commit aa4ffa027de7c652566deaac741ea2b5837f81ef

Authored by taiyuan
1 parent 648500eb

大转盘修改

packageB/pages/luckactivity/luckinfo/luckinfo.js
  1 +var util = require("../../../../utils/util.js");
1 var WxParse = require('../../../../utils/wxParse/wxParse.js'); 2 var WxParse = require('../../../../utils/wxParse/wxParse.js');
2 const app = getApp(); 3 const app = getApp();
3 let imghost = app.globalData.setting.imghost; 4 let imghost = app.globalData.setting.imghost;
4 let self = null; 5 let self = null;
  6 +let imgDraw = {
  7 + "width": "554px",
  8 + "height": "899px",
  9 + "background": "http://jmh.xinda100.cn/public/images/share_bg.png",
  10 + "views": [
  11 + { //0.头像
  12 + "type": "image",
  13 + "url": "",
  14 + "css": {
  15 + "background": "white",
  16 + "width": "80px",
  17 + "height": "80px",
  18 + "top": "24px",
  19 + "left": "40px",
  20 + "borderRadius": "80px",
  21 + }
  22 + },
  23 + { //1.昵称
  24 + "type": "text",
  25 + "text": "",
  26 + "css": {
  27 + "color": "#000000",
  28 + "width": "400px",
  29 + "top": "25px",
  30 + "left": "140px",
  31 + "fontSize": "26px",
  32 + "maxLines": "1",
  33 + }
  34 + },
  35 + { //2.强烈推荐
  36 + "type": "text",
  37 + "text": "强烈推荐",
  38 + "css": {
  39 + "color": "#fff",
  40 + "background": "#FF6768",
  41 + "width": "110px",
  42 + "height": "26px",
  43 + "lineHeight": "26px",
  44 + "top": "70px",
  45 + "left": "140px",
  46 + "borderRadius": "10px",
  47 + "fontSize": "18px",
  48 + "textAlign": "center"
  49 +
  50 + }
  51 + },
  52 + { //3.分享标题
  53 + "type": "text",
  54 + "text": "",
  55 + "css": {
  56 + "color": "red",
  57 + "width": "554px",
  58 + "padding": "20px",
  59 + "left": "20px",
  60 + "top": "140px",
  61 + "fontSize": "28px",
  62 + "textAlign": "center",
  63 + "maxLines": "1",
  64 + "fontWeight": "bold",
  65 + }
  66 + },
  67 + { //4.分享内容
  68 + "type": "text",
  69 + "text": "分享内容分享内容分享内容分享内容分享内容分享内容分享内容分享内容分享内容",
  70 + "css": {
  71 + "color": "#000000",
  72 + "width": "554px",
  73 + "padding": "20px",
  74 + "left": "20px",
  75 + "top": "190px",
  76 + "fontSize": "26px",
  77 + "textAlign": "center",
  78 + "maxLines": "1",
  79 + }
  80 + },
  81 + { //5.分享图片
  82 + "type": "image",
  83 + "url": "",
  84 + "css": {
  85 + "width": "554px",
  86 + "height": "350px",
  87 + "top": "240px",
  88 + "mode": "scaleToFill",
  89 + }
  90 + },
  91 + { //6
  92 + "type": "image",
  93 + "url": "/images/share/s_gou.png",
  94 + "css": {
  95 + "width": "30px",
  96 + "height": "30px",
  97 + "top": "620px",
  98 + "left": "18px",
  99 + "rotate": "0",
  100 + "borderRadius": "30px",
  101 + }
  102 + },
  103 + { //7
  104 + "type": "text",
  105 + "text": "正品保障",
  106 + "css": {
  107 + "color": "red",
  108 + "width": "110px",
  109 + "top": "620px",
  110 + "left": "52px",
  111 + "fontSize": "22px",
  112 + }
  113 + },
  114 + { //8
  115 + "type": "image",
  116 + "url": "/images/share/s_gou.png",
  117 + "css": {
  118 + "width": "30px",
  119 + "height": "30px",
  120 + "top": "620px",
  121 + "left": "208px",
  122 + "borderRadius": "30px",
  123 + }
  124 + },
  125 + { //9
  126 + "type": "text",
  127 + "text": "纯实体店",
  128 + "css": {
  129 + "color": "red",
  130 + "width": "129px",
  131 + "top": "620px",
  132 + "left": "243px",
  133 + "fontSize": "22px",
  134 + }
  135 + },
  136 + { //10
  137 + "type": "image",
  138 + "url": "/images/share/s_gou.png",
  139 + "css": {
  140 + "width": "30px",
  141 + "height": "30px",
  142 + "top": "620px",
  143 + "left": "410px",
  144 + "borderRadius": "30px",
  145 + }
  146 + },
  147 + { //11
  148 + "type": "text",
  149 + "text": "官方验证",
  150 + "css": {
  151 + "color": "red",
  152 + "width": "121px",
  153 + "top": "620px",
  154 + "left": "450px",
  155 + "fontSize": "22px",
  156 + }
  157 + },
  158 + { //12.横线
  159 + "type": "rect",
  160 + "css": {
  161 + "background": "#f0f0f0",
  162 + "width": "554px",
  163 + "height": "1px",
  164 + "top": "676px",
  165 + "left": "0px",
  166 + }
  167 + },
  168 + { //13
  169 + "type": "text",
  170 + "text": "特惠活动时间仅限",
  171 + "css": {
  172 + "color": "#000000",
  173 + "width": "245px",
  174 + "top": "730px",
  175 + "left": "28px",
  176 + "fontSize": "24px",
  177 + "textAlign": "left"
  178 + }
  179 + },
  180 + { //14.时间
  181 + "type": "text",
  182 + "text": "",
  183 + "css": {
  184 + "width": "377px",
  185 + "top": "770px",
  186 + "left": "28px",
  187 + "fontSize": "24px",
  188 + }
  189 + },
  190 + { //15
  191 + "type": "text",
  192 + "text": "长按识别小程序码有惊喜哦!",
  193 + "css": {
  194 + "color": "#7c7c7c",
  195 + "width": "348px",
  196 + "top": "810px",
  197 + "left": "27px",
  198 + "fontSize": "24px",
  199 + }
  200 + },
  201 +
  202 + { //16.码
  203 + "type": "image",
  204 + "url": "",
  205 + "css": {
  206 + "width": "150px",
  207 + "height": "150px",
  208 + "top": "705px",
  209 + "left": "380px",
  210 + "mode": "scaleToFill"
  211 + }
  212 + },
  213 +
  214 + ]
  215 + };
  216 +
5 217
6 Page({ 218 Page({
7 data: { 219 data: {
  220 + imgDraw: imgDraw,
8 start: false, 221 start: false,
9 list: null, 222 list: null,
10 isLoading: false, // 检测是否已经发送请求,防止重复发送请求 223 isLoading: false, // 检测是否已经发送请求,防止重复发送请求
@@ -12,6 +225,8 @@ Page({ @@ -12,6 +225,8 @@ Page({
12 pageNum: 1, // 当前页数 225 pageNum: 1, // 当前页数
13 imghost: imghost, 226 imghost: imghost,
14 num: 3, 227 num: 3,
  228 + canStart: false,
  229 +
15 230
16 prizes: [], 231 prizes: [],
17 defaultConfig: { 232 defaultConfig: {
@@ -63,6 +278,7 @@ Page({ @@ -63,6 +278,7 @@ Page({
63 // }); 278 // });
64 // console.log('imghost+++++', imghost); 279 // console.log('imghost+++++', imghost);
65 self = this; 280 self = this;
  281 + let first_leader = null;
66 this.data.options = options; 282 this.data.options = options;
67 // this.setData({ 283 // this.setData({
68 // options, 284 // options,
@@ -72,28 +288,58 @@ Page({ @@ -72,28 +288,58 @@ Page({
72 wx.setNavigationBarTitle({ 288 wx.setNavigationBarTitle({
73 title: options.title, 289 title: options.title,
74 }); 290 });
  291 +
  292 +
75 app.isLogin().then(function(data) {//进入页面前已经授权登录成功 293 app.isLogin().then(function(data) {//进入页面前已经授权登录成功
76 self.setData({ 294 self.setData({
77 userInfo: data, 295 userInfo: data,
78 - // imghost,  
79 }); 296 });
80 }); 297 });
  298 +
  299 +
  300 +
  301 + //从分享的跳转过来
  302 + if (options.id == undefined || options.id == null || options.id == '') {
  303 + var scene = decodeURIComponent(options.scene);
  304 + scene = scene.split('_');
  305 + first_leader = scene[0];
  306 + this.data.options.id = scene[1];
  307 + };
  308 +
  309 + if(first_leader) {
  310 + console.log("log---", first_leader);
  311 + app.globalData.first_leader = first_leader;
  312 + //调用接口判断是不是会员
  313 + app.request.promiseGet("/api/weshop/shoppingGuide/get/" + app.globalData.setting.stoid +"/" + first_leader,{}).then(res=>{
  314 + if(res.data.code==0){
  315 + app.globalData.guide_id = res.data.data.id;
  316 + }
  317 + })
  318 + };
  319 +
  320 +
  321 +
  322 +
  323 +
81 }, 324 },
82 325
83 onShow() { 326 onShow() {
  327 + console.log('show~~`');
84 if(app.globalData.userInfo) { 328 if(app.globalData.userInfo) {
85 if(!this.data.isLogin) { 329 if(!this.data.isLogin) {
86 -  
87 this.setData({ 330 this.setData({
88 userInfo: app.globalData.userInfo, 331 userInfo: app.globalData.userInfo,
89 isLogin: true, 332 isLogin: true,
  333 + 'imgDraw.views[0].url': app.globalData.userInfo.head_pic,//头像
  334 + 'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称
90 }); 335 });
91 -  
92 // console.log('imghost', this.data.imghost); 336 // console.log('imghost', this.data.imghost);
93 let user_id = app.globalData.userInfo.user_id; 337 let user_id = app.globalData.userInfo.user_id;
94 let store_id = app.globalData.setting.stoid; 338 let store_id = app.globalData.setting.stoid;
95 let id = this.data.options.id; 339 let id = this.data.options.id;
96 let url = `/api/weshop/marketing/marketingLuckForm/getLuckInfo/${store_id}/${id}/${user_id}`; 340 let url = `/api/weshop/marketing/marketingLuckForm/getLuckInfo/${store_id}/${id}/${user_id}`;
  341 +
  342 +
97 343
98 344
99 app.request.get(url, { 345 app.request.get(url, {
@@ -116,31 +362,32 @@ Page({ @@ -116,31 +362,32 @@ Page({
116 362
117 363
118 if(luckInfo && luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板 364 if(luckInfo && luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板
119 - let url = `/api/weshop/marketing/marketingLuckTemplate/get/${store_id}/${luckInfo.template_id}`; 365 + let url = `/api/weshop/marketing/marketingLuckTemplate/get/0/${luckInfo.template_id}`;
120 app.request.get(url, { 366 app.request.get(url, {
121 success: function(res) { 367 success: function(res) {
122 - // console.log('prizes//////', res.data.data);  
123 - self.setData({  
124 - template: res.data.data,  
125 - bannerUrl: imghost + ((res.data.data&&res.data.data.bannerUrl) ? res.data.data.bannerUrl:'miniapp/images/luckDraw/bg.png?v=2'), //背景图  
126 - 'blocks[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘  
127 - 'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针  
128 - }); 368 + // if(res.data.code == 0) {
  369 + self.setData({
  370 + 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'), //背景图
  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'), //转盘
  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'), //指针
  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),//活动时间
  378 + });
  379 + // };
  380 +
129 }, 381 },
130 }); 382 });
131 } else { 383 } else {
132 - // wx.hideLoading(); 384 +
133 if(luckInfo && luckInfo.store_bannerUrl) { 385 if(luckInfo && luckInfo.store_bannerUrl) {
134 self.setData({ 386 self.setData({
135 bannerUrl: imghost + luckInfo.store_bannerUrl, 387 bannerUrl: imghost + luckInfo.store_bannerUrl,
136 }); 388 });
137 }; 389 };
138 390
139 - // self.setData({  
140 - // showMask2: false,  
141 - // hiddenCanvas: false,  
142 - // });  
143 -  
144 }; 391 };
145 392
146 393
@@ -149,7 +396,6 @@ Page({ @@ -149,7 +396,6 @@ Page({
149 title: self.data.luckInfo.msgInfo, 396 title: self.data.luckInfo.msgInfo,
150 icon: 'none', 397 icon: 'none',
151 }); 398 });
152 - // return;  
153 }; 399 };
154 400
155 }, 401 },
@@ -211,6 +457,24 @@ Page({ @@ -211,6 +457,24 @@ Page({
211 }, 457 },
212 }); 458 });
213 459
  460 + let mainUrl = app.globalData.setting.url;
  461 + // let stoid = app.globalData.setting.stoid;
  462 + let cj_id = this.data.options.id;
  463 + // let user_id = app.globalData.userInfo.user_id;
  464 +
  465 + wx.getImageInfo({
  466 + src: `${mainUrl}/api/wx/open/app/user/getWeAppEwm/${store_id}?sceneValue=${user_id}_${cj_id}&pageValue=packageB/pages/luckactivity/luckinfo/luckinfo`,
  467 + success (res) {
  468 + if(res.data.code != -1) {
  469 + self.setData({
  470 + 'imgDraw.views[16].url': res.path,
  471 + });
  472 + };
  473 +
  474 + }
  475 + });
  476 +
  477 +
214 }; 478 };
215 }; 479 };
216 }, 480 },
@@ -234,7 +498,7 @@ Page({ @@ -234,7 +498,7 @@ Page({
234 if(length == 1) { 498 if(length == 1) {
235 [0,2,4,6].map(function(item, index) { 499 [0,2,4,6].map(function(item, index) {
236 prizes[item] = { 500 prizes[item] = {
237 - id: award[0].id, 501 + id: award[0].record_id,
238 lbtype: award[0].lbtype, 502 lbtype: award[0].lbtype,
239 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 503 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
240 imgs: [ 504 imgs: [
@@ -258,7 +522,7 @@ Page({ @@ -258,7 +522,7 @@ Page({
258 if(length == 2) { 522 if(length == 2) {
259 [0,4].map(function(item, index) { 523 [0,4].map(function(item, index) {
260 prizes[item] = { 524 prizes[item] = {
261 - id: award[0].id, 525 + id: award[0].record_id,
262 lbtype: award[0].lbtype, 526 lbtype: award[0].lbtype,
263 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 527 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
264 imgs: [ 528 imgs: [
@@ -274,7 +538,7 @@ Page({ @@ -274,7 +538,7 @@ Page({
274 538
275 [2,6].map(function(item, index) { 539 [2,6].map(function(item, index) {
276 prizes[item] = { 540 prizes[item] = {
277 - id: award[1].id, 541 + id: award[1].record_id,
278 lbtype: award[1].lbtype, 542 lbtype: award[1].lbtype,
279 fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 543 fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
280 imgs: [ 544 imgs: [
@@ -298,7 +562,7 @@ Page({ @@ -298,7 +562,7 @@ Page({
298 if(length == 3) { 562 if(length == 3) {
299 [0,4].map(function(item, index) { 563 [0,4].map(function(item, index) {
300 prizes[item] = { 564 prizes[item] = {
301 - id: award[0].id, 565 + id: award[0].record_id,
302 lbtype: award[0].lbtype, 566 lbtype: award[0].lbtype,
303 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 567 fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
304 imgs: [ 568 imgs: [
@@ -314,7 +578,7 @@ Page({ @@ -314,7 +578,7 @@ Page({
314 578
315 [1,5].map(function(item, index) { 579 [1,5].map(function(item, index) {
316 prizes[item] = { 580 prizes[item] = {
317 - id: award[1].id, 581 + id: award[1].record_id,
318 lbtype: award[1].lbtype, 582 lbtype: award[1].lbtype,
319 fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 583 fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
320 imgs: [ 584 imgs: [
@@ -330,7 +594,7 @@ Page({ @@ -330,7 +594,7 @@ Page({
330 594
331 [2,6].map(function(item, index) { 595 [2,6].map(function(item, index) {
332 prizes[item] = { 596 prizes[item] = {
333 - id: award[2].id, 597 + id: award[2].record_id,
334 lbtype: award[2].lbtype, 598 lbtype: award[2].lbtype,
335 fonts: [{ text: award[2].luck_goods_name + ' x' + award[2].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 599 fonts: [{ text: award[2].luck_goods_name + ' x' + award[2].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
336 imgs: [ 600 imgs: [
@@ -355,7 +619,7 @@ Page({ @@ -355,7 +619,7 @@ Page({
355 if(length == 4) { 619 if(length == 4) {
356 [0,2,4,6].map(function(item, index) { 620 [0,2,4,6].map(function(item, index) {
357 prizes[item] = { 621 prizes[item] = {
358 - id: award[index].id, 622 + id: award[index].record_id,
359 lbtype: award[index].lbtype, 623 lbtype: award[index].lbtype,
360 fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 624 fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
361 imgs: [ 625 imgs: [
@@ -379,7 +643,7 @@ Page({ @@ -379,7 +643,7 @@ Page({
379 if(length == 5) { 643 if(length == 5) {
380 [0,2,3,5,6].map(function(item, index) { 644 [0,2,3,5,6].map(function(item, index) {
381 prizes[item] = { 645 prizes[item] = {
382 - id: award[index].id, 646 + id: award[index].record_id,
383 lbtype: award[index].lbtype, 647 lbtype: award[index].lbtype,
384 fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 648 fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
385 imgs: [ 649 imgs: [
@@ -403,7 +667,7 @@ Page({ @@ -403,7 +667,7 @@ Page({
403 if(length == 6) { 667 if(length == 6) {
404 prizes = award.map(function(item, index) { 668 prizes = award.map(function(item, index) {
405 return { 669 return {
406 - id: item.id, 670 + id: item.record_id,
407 lbtype: item.lbtype, 671 lbtype: item.lbtype,
408 fonts: [{ text: item.luck_goods_name + ' x' + item.num, top: '18%', wordWrap:false, fontColor: 'transparent'}], 672 fonts: [{ text: item.luck_goods_name + ' x' + item.num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
409 imgs: [ 673 imgs: [
@@ -503,146 +767,183 @@ Page({ @@ -503,146 +767,183 @@ Page({
503 return; 767 return;
504 }; 768 };
505 769
506 -  
507 - if(this.data.luckInfo.user_LuckNumDay > 0 || this.data.luckInfo.vip_act_num == 0) {  
508 - // console.log('start choujiang');  
509 - // let start = false;  
510 - if(!this.data.start) {  
511 - this.data.start = true;  
512 - // 获取抽奖组件实例  
513 - const $lucky = this.selectComponent('#myLucky');  
514 - // 调用play方法开始旋转  
515 - $lucky.play(); 770 + // 获取积分
  771 + app.request.promisePost('/api/weshop/marketing/marketingLuckForm/startLuckIntegral', {
  772 + isShowLoading: false,
  773 + data: {
  774 + storeId: app.globalData.setting.stoid,
  775 + userId: app.globalData.userInfo.user_id,
  776 + LuckId: this.data.options.id,
  777 + },
  778 + })
  779 + .then(function(res) {
  780 + if(res.data.code == -1) {
  781 + //积分不足,弹出提示
  782 + self.data.luckInfo.msgInfo = res.data.msg
  783 + wx.showToast({
  784 + title: res.data.msg,
  785 + icon: 'none',
  786 + });
  787 + return;
  788 + };
  789 +
  790 + if(res.data.code == 0) {
516 791
517 - // 获取抽奖结果  
518 - app.request.post('/api/weshop/marketing/marketingLuckForm/startLuck', {  
519 - isShowLoading: false,  
520 - data: {  
521 - storeId: app.globalData.setting.stoid,  
522 - userId: app.globalData.userInfo.user_id,  
523 - LuckId: this.data.options.id,  
524 - },  
525 - success: function(res) { 792 + if(self.data.luckInfo.user_LuckNumDay > 0 || self.data.luckInfo.vip_act_num == 0) {
  793 + console.log('start choujiang');
  794 + // let start = false;
  795 + if(!self.data.start) {
  796 + self.data.start = true;
  797 + // 获取抽奖组件实例
  798 + const $lucky = self.selectComponent('#myLucky');
  799 + // 调用play方法开始旋转
  800 + $lucky.play();
526 801
527 - if(res.data.code == 0) {  
528 - console.log('开始摇奖', res.data.data);  
529 - if(self.data.luckInfo.vip_act_num != 0) {  
530 - self.setData({  
531 - 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,  
532 - // isActive: true,  
533 - });  
534 - };  
535 -  
536 - self.setData({  
537 - // 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,  
538 - isActive: true,  
539 - wow: res.data.data,  
540 - });  
541 - // console.log('请求成功', res.data.data);  
542 - let luckyId = res.data.data.id;  
543 - let indexArr = self.luckyIndex(self.data.prizes, luckyId);  
544 - // console.log('抽奖奖品id', luckyId);  
545 - // console.log('奖品列表', self.data.prizes);  
546 - // console.log('奖品对应的索引数组', indexArr);  
547 - let random = Math.random() * indexArr.length >> 0;  
548 - // console.log('random', random);  
549 - let index = indexArr[random];  
550 - setTimeout(() => {  
551 - $lucky.stop(index);  
552 - self.data.start = false;  
553 - }, 3000);  
554 -  
555 -  
556 - //获取兑奖记录  
557 - // app.request.get('/api/weshop/marketing/marketingLuckRecord/page', {  
558 - // isShowLoading: false,  
559 - // data: {  
560 - // store_id: app.globalData.setting.stoid,  
561 - // user_id: app.globalData.userInfo.user_id,  
562 - // luck_formid: self.data.options.id,  
563 - // luck_state: 1  
564 - // },  
565 - // success: function(res) {  
566 - // if(res.data.code == 0) {  
567 - // // console.log('res===>', res.data.data.pageData);  
568 - // self.setData({  
569 - // record: res.data.data.pageData,  
570 - // });  
571 - // };  
572 - // },  
573 - // });  
574 -  
575 -  
576 - } else {  
577 - let thxIndexArr = self.data.thxIndexArr;  
578 - const random = Math.random() * thxIndexArr.length >> 0;  
579 - const index = thxIndexArr[random];  
580 - // console.log('谢谢参与数组', thxIndexArr);  
581 - // console.log('请求出错产生谢谢参与的随机数', index);  
582 - setTimeout(() => {  
583 - $lucky.stop(index);  
584 - self.data.start = false;  
585 - }, 3000);  
586 -  
587 - 802 + // 获取抽奖结果
  803 + app.request.post('/api/weshop/marketing/marketingLuckForm/startLuck', {
  804 + isShowLoading: false,
  805 + data: {
  806 + storeId: app.globalData.setting.stoid,
  807 + userId: app.globalData.userInfo.user_id,
  808 + LuckId: self.data.options.id,
  809 + },
  810 + success: function(res) {
  811 +
  812 + if(res.data.code == 0) {
  813 + console.log('开始摇奖', res.data.data);
  814 + if(self.data.luckInfo.vip_act_num != 0) {
  815 + self.setData({
  816 + 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,
  817 + // isActive: true,
  818 + });
  819 + };
  820 +
  821 + self.setData({
  822 + // 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,
  823 + isActive: true,
  824 + wow: res.data.data,
  825 + });
  826 + // console.log('请求成功', res.data.data);
  827 + let luckyId = res.data.data.id;
  828 + let indexArr = self.luckyIndex(self.data.prizes, luckyId);
  829 + // console.log('抽奖奖品id', luckyId);
  830 + // console.log('奖品列表', self.data.prizes);
  831 + // console.log('奖品对应的索引数组', indexArr);
  832 + let random = Math.random() * indexArr.length >> 0;
  833 + // console.log('random', random);
  834 + let index = indexArr[random];
  835 + setTimeout(() => {
  836 + $lucky.stop(index);
  837 + self.data.start = false;
  838 + }, 3000);
  839 +
  840 +
  841 + //获取兑奖记录
  842 + // app.request.get('/api/weshop/marketing/marketingLuckRecord/page', {
  843 + // isShowLoading: false,
  844 + // data: {
  845 + // store_id: app.globalData.setting.stoid,
  846 + // user_id: app.globalData.userInfo.user_id,
  847 + // luck_formid: self.data.options.id,
  848 + // luck_state: 1
  849 + // },
  850 + // success: function(res) {
  851 + // if(res.data.code == 0) {
  852 + // // console.log('res===>', res.data.data.pageData);
  853 + // self.setData({
  854 + // record: res.data.data.pageData,
  855 + // });
  856 + // };
  857 + // },
  858 + // });
  859 +
  860 +
  861 + } else {
  862 + let thxIndexArr = self.data.thxIndexArr;
  863 + const random = Math.random() * thxIndexArr.length >> 0;
  864 + const index = thxIndexArr[random];
  865 + // console.log('谢谢参与数组', thxIndexArr);
  866 + // console.log('请求出错产生谢谢参与的随机数', index);
  867 + setTimeout(() => {
  868 + $lucky.stop(index);
  869 + self.data.start = false;
  870 + }, 3000);
  871 +
  872 +
  873 +
  874 +
  875 + if(res.data.code == -1) {
  876 + wx.showToast({
  877 + title: res.data.msg,
  878 + icon: 'none',
  879 + });
  880 + self.data.luckInfo.msgInfo = res.data.msg;
  881 + return;
  882 + // self.data.start = true;
  883 + };
  884 +
  885 +
  886 + if(res.data.code == -2 && self.data.luckInfo.vip_act_num != 0) {
  887 + self.setData({
  888 + 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,
  889 + });
  890 + };
  891 +
  892 +
  893 + };
  894 +
588 895
  896 + },
589 897
590 - if(res.data.code == -1) { 898 + fail: function(res) {
  899 + // console.log('出错');
591 wx.showToast({ 900 wx.showToast({
592 - title: res.data.msg,  
593 - icon: 'none', 901 + title: '数据请求失败',
  902 + icon: 'error',
594 }); 903 });
595 - self.data.luckInfo.msgInfo = res.data.msg;  
596 - return;  
597 - // self.data.start = true;  
598 - };  
599 - // console.log('请求出错');  
600 - if(res.data.code == -2 && self.data.luckInfo.vip_act_num != 0) {  
601 - self.setData({  
602 - 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,  
603 - });  
604 - };  
605 - 904 + let thxIndexArr = self.data.thxIndexArr;
  905 + const random = Math.random() * thxIndexArr.length >> 0;
  906 + const index = thxIndexArr[random];
  907 + setTimeout(() => {
  908 + $lucky.stop(index);
  909 + self.data.start = false;
  910 + }, 3000);
  911 + },
606 912
607 913
608 914
609 - };  
610 - },  
611 -  
612 - fail: function(res) {  
613 - // console.log('出错');  
614 - wx.showToast({  
615 - title: '数据请求失败',  
616 - icon: 'error',  
617 }); 915 });
618 - let thxIndexArr = self.data.thxIndexArr;  
619 - const random = Math.random() * thxIndexArr.length >> 0;  
620 - const index = thxIndexArr[random];  
621 - setTimeout(() => {  
622 - $lucky.stop(index);  
623 - self.data.start = false;  
624 - }, 3000);  
625 - }, 916 +
  917 + }
626 918
627 - }); 919 +
  920 + } else {
  921 + wx.showToast({
  922 + title: '你今天的抽奖次数已用完啦!~',
  923 + icon: 'none',
  924 + });
  925 + };
628 926
629 - }  
630 -  
631 -  
632 - } else {  
633 - wx.showToast({  
634 - title: '你今天的抽奖次数已用完啦!~',  
635 - icon: 'none',  
636 - });  
637 - }; 927 + };
  928 + });
  929 +
  930 +
  931 +
  932 +
  933 +
638 934
639 }, 935 },
640 end (event) { 936 end (event) {
641 // 中奖奖品详情 937 // 中奖奖品详情
642 - console.log('00000000~',event.detail.lbtype); 938 + console.log('抽奖结果:',event.detail);
643 let no_luck_urltype = this.data.luckInfo.no_luck_urltype; 939 let no_luck_urltype = this.data.luckInfo.no_luck_urltype;
644 - let lbtype; 940 + let lbtype = null;
  941 + let good_id = null;
645 let resultTitle = event.detail.fonts[0].text.replace('\n',''); 942 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 + };
646 if(event.detail.lbtype == 5) { 947 if(event.detail.lbtype == 5) {
647 lbtype = 5; 948 lbtype = 5;
648 } else { 949 } else {
@@ -656,6 +957,7 @@ Page({ @@ -656,6 +957,7 @@ Page({
656 resultTitle, 957 resultTitle,
657 showPopup: false, 958 showPopup: false,
658 currentLbtype: lbtype, 959 currentLbtype: lbtype,
  960 + good_id,
659 }); 961 });
660 962
661 963
@@ -691,7 +993,7 @@ Page({ @@ -691,7 +993,7 @@ Page({
691 }); 993 });
692 }; 994 };
693 } else if((self.data.luckInfo.give_type == 2)) { 995 } else if((self.data.luckInfo.give_type == 2)) {
694 - if(self.data.luckInfo.give_integral > 0) { 996 + if(self.data.luckInfo.give_growth > 0) {
695 wx.showToast({ 997 wx.showToast({
696 title: `获得游戏奖励成长值${self.data.luckInfo.give_growth}`, 998 title: `获得游戏奖励成长值${self.data.luckInfo.give_growth}`,
697 icon: 'none', 999 icon: 'none',
@@ -708,7 +1010,7 @@ Page({ @@ -708,7 +1010,7 @@ Page({
708 }); 1010 });
709 }; 1011 };
710 } else if((self.data.luckInfo.give_type == 2)) { 1012 } else if((self.data.luckInfo.give_type == 2)) {
711 - if(self.data.luckInfo.give_integral > 0) { 1013 + if(self.data.luckInfo.give_growth > 0) {
712 wx.showToast({ 1014 wx.showToast({
713 title: `获得游戏奖励成长值${self.data.luckInfo.give_growth}`, 1015 title: `获得游戏奖励成长值${self.data.luckInfo.give_growth}`,
714 icon: 'none', 1016 icon: 'none',
@@ -887,20 +1189,30 @@ Page({ @@ -887,20 +1189,30 @@ Page({
887 }, 1189 },
888 1190
889 showQr(e) { 1191 showQr(e) {
  1192 + let id = null;
890 let store_id = app.globalData.setting.stoid; 1193 let store_id = app.globalData.setting.stoid;
891 - let id = e.currentTarget.dataset.id; 1194 + if(e && e.currentTarget.dataset.id) {
  1195 + id = e.currentTarget.dataset.id;
  1196 + } else {
  1197 + id = this.data.good_id;
  1198 + };
892 let url = `/api/weshop/marketing/marketingLuckList/updateGoodsVerifyCode/${store_id}/${id}`; 1199 let url = `/api/weshop/marketing/marketingLuckList/updateGoodsVerifyCode/${store_id}/${id}`;
  1200 + console.log('good_id', id, url);
893 app.request.put(url, { 1201 app.request.put(url, {
894 success: function(res) { 1202 success: function(res) {
895 if(res.data.code == 0) { 1203 if(res.data.code == 0) {
896 let data = res.data.data; 1204 let data = res.data.data;
897 - console.log('data!!!!', data);  
898 let barcode = self.selectComponent("#qrcode"); 1205 let barcode = self.selectComponent("#qrcode");
899 barcode.open({val: data}); 1206 barcode.open({val: data});
900 self.setData({ 1207 self.setData({
901 hiddenCanvas: true, 1208 hiddenCanvas: true,
902 showPopup: false, 1209 showPopup: false,
903 }); 1210 });
  1211 + } else {
  1212 + wx.showToast({
  1213 + title: res.data.msg,
  1214 + icon: 'none',
  1215 + });
904 }; 1216 };
905 }, 1217 },
906 1218
@@ -917,7 +1229,32 @@ Page({ @@ -917,7 +1229,32 @@ Page({
917 clickReceive() { 1229 clickReceive() {
918 this.setData({ 1230 this.setData({
919 showResult: false, 1231 showResult: false,
  1232 + showMask: false,
  1233 + });
  1234 + this.showQr();
  1235 + },
  1236 +
  1237 + showPoster() {
  1238 + this.setData({
  1239 + hiddenCanvas: true,
  1240 + showMask: true,
  1241 + showPoster: true,
  1242 + });
  1243 + },
  1244 +
  1245 + closePoster() {
  1246 + this.setData({
  1247 + showMask: false,
  1248 + showPoster: false,
  1249 + hiddenCanvas: false,
  1250 + });
  1251 + },
  1252 +
  1253 +
  1254 +
  1255 + onImgOK(e) {
  1256 + this.setData({
  1257 + myimg: e.detail.path,
920 }); 1258 });
921 - this.showPopup();  
922 }, 1259 },
923 }) 1260 })
924 \ No newline at end of file 1261 \ No newline at end of file
packageB/pages/luckactivity/luckinfo/luckinfo.json
@@ -2,7 +2,8 @@ @@ -2,7 +2,8 @@
2 "usingComponents": { 2 "usingComponents": {
3 "lucky-wheel":"/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index", 3 "lucky-wheel":"/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index",
4 "qrcode": "/components/my-qrcode/my-qrcode", 4 "qrcode": "/components/my-qrcode/my-qrcode",
5 - "nodata": "/components/nodata/nodata" 5 + "nodata": "/components/nodata/nodata",
  6 + "painter": "/packageB/components/painter/painter"
6 }, 7 },
7 "enablePullDownRefresh": false, 8 "enablePullDownRefresh": false,
8 "navigationBarTitleText": "幸运大转盘" 9 "navigationBarTitleText": "幸运大转盘"
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" style="background: {{template.colorCode ? template.colorCode:'#da104b'}} url({{bannerUrl ? bannerUrl:(imghost + 'miniapp/images/luckDraw/bg.png?v=2')}}) no-repeat;"> 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;">
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">
@@ -35,17 +35,17 @@ @@ -35,17 +35,17 @@
35 hiddenCanvas="{{hiddenCanvas}}" 35 hiddenCanvas="{{hiddenCanvas}}"
36 /> 36 />
37 </view> 37 </view>
38 - <view class="fs28 white t-c pdt10" wx:if="{{luckInfo.vip_act_num == 0}}">今天你有 <text class="fs50 c-yellow">不限次</text> 抽奖机会</view>  
39 - <view class="fs28 white t-c pdt10" wx:else>今天你还有 <text class="fs50 c-yellow">{{filter.show_default(luckInfo.user_LuckNumDay, '0')}}</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>
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>
43 </view> 43 </view>
44 </view> 44 </view>
45 <!-- 奖品展示 --> 45 <!-- 奖品展示 -->
46 - <view wx:if="{{award}}"> 46 + <view wx:if="{{award && award.length != 0}}">
47 <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge prizes" lazy-load></image></view> 47 <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge prizes" lazy-load></image></view>
48 - <view class="list br12 bg-white"> 48 + <view class="panel list br12 bg-white">
49 <view class="list-item" wx:for="{{award}}"> 49 <view class="list-item" wx:for="{{award}}">
50 <view class="img-container"> 50 <view class="img-container">
51 <image wx:if="{{item.luck_goods_img}}" src="{{imghost + item.luck_goods_img}}" class="img" mode="aspectFit"></image> 51 <image wx:if="{{item.luck_goods_img}}" src="{{imghost + item.luck_goods_img}}" class="img" mode="aspectFit"></image>
@@ -64,19 +64,19 @@ @@ -64,19 +64,19 @@
64 <!-- 活动展示 --> 64 <!-- 活动展示 -->
65 <view> 65 <view>
66 <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge activity" lazy-load></image></view> 66 <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge activity" lazy-load></image></view>
67 - <view class="bg-white br12 pd20 fs28"> 67 + <view class="panel bg-white br12 pd20 fs28">
68 <!-- {{luckInfo.remark}} --> 68 <!-- {{luckInfo.remark}} -->
69 <import src="../../../../utils/wxParse/wxParse.wxml"/> 69 <import src="../../../../utils/wxParse/wxParse.wxml"/>
70 <!-- <template is="wxParse" data="{{wxParseData:content.nodes}}"/> --> 70 <!-- <template is="wxParse" data="{{wxParseData:content.nodes}}"/> -->
71 <!-- 时间 --> 71 <!-- 时间 -->
72 - <view class="bdb"> 72 + <view class="bdt">
73 <!-- <view class=""> --> 73 <!-- <view class=""> -->
74 <view class="txt-red">活动时间:</view> 74 <view class="txt-red">活动时间:</view>
75 <view class="fs28 pdv20">{{filter.format_time(luckInfo.begindate, 1) + ' 至 ' + filter.format_time(luckInfo.enddate, 1)}}</view> 75 <view class="fs28 pdv20">{{filter.format_time(luckInfo.begindate, 1) + ' 至 ' + filter.format_time(luckInfo.enddate, 1)}}</view>
76 <!-- </view> --> 76 <!-- </view> -->
77 </view> 77 </view>
78 <!-- 规则 --> 78 <!-- 规则 -->
79 - <view class="bdb" wx:if="{{luckInfo.remark}}"> 79 + <view class="bdt" wx:if="{{luckInfo.remark}}">
80 <view class="txt-red pdt20">活动说明:</view> 80 <view class="txt-red pdt20">活动说明:</view>
81 <view class="fs28 pdv20"><template is="wxParse" data="{{wxParseData:content.nodes}}"/></view> 81 <view class="fs28 pdv20"><template is="wxParse" data="{{wxParseData:content.nodes}}"/></view>
82 </view> 82 </view>
@@ -116,14 +116,14 @@ @@ -116,14 +116,14 @@
116 </view> 116 </view>
117 </view> --> 117 </view> -->
118 <!-- 技术支持 --> 118 <!-- 技术支持 -->
119 - <view class="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'}}" class="logo" lazy-load></image>提供技术支持</view>
122 </view> 122 </view>
123 </view> 123 </view>
124 124
125 <!-- 分享按钮 --> 125 <!-- 分享按钮 -->
126 -<!-- <view class="circle-container zhuanfa" bindtap=""><text class="iconfont icon-zhuanfa1"></text></view> --> 126 +<view class="circle-container zhuanfa" bindtap="showPoster"><text class="iconfont icon-zhuanfa1"></text></view>
127 127
128 <!-- 悬浮按钮 --> 128 <!-- 悬浮按钮 -->
129 <view class="circle-container gift {{((record && record.length != 0) || isActive) ? 'active':''}}" bindtap="showPopup"><text class="iconfont icon-liwu"></text></view> 129 <view class="circle-container gift {{((record && record.length != 0) || isActive) ? 'active':''}}" bindtap="showPopup"><text class="iconfont icon-liwu"></text></view>
@@ -140,10 +140,10 @@ @@ -140,10 +140,10 @@
140 <view class="ellipsis-2 fs28">{{item.luck_name}}</view> 140 <view class="ellipsis-2 fs28">{{item.luck_name}}</view>
141 <view class="pdt20"> 141 <view class="pdt20">
142 <view class="fs26 xc-black3">价值:<text class="rmb">{{item.luck_goods_price}}</text></view> 142 <view class="fs26 xc-black3">价值:<text class="rmb">{{item.luck_goods_price}}</text></view>
143 - <view class="flex ai_c jc_fe fs26 xc-black3 "> 143 + <view class="flex ai_c {{item.luck_type == 5 ? 'jc_sb':'jc_fe'}} fs26 xc-black3 ">
144 <!-- <view style="visibility: {{item.luck_type == 5 ? 'visible':'hidden'}};">兑换状态:{{item.state == 0 ? '未兑换':'已兑换'}}</view> --> 144 <!-- <view style="visibility: {{item.luck_type == 5 ? 'visible':'hidden'}};">兑换状态:{{item.state == 0 ? '未兑换':'已兑换'}}</view> -->
145 <!-- <view style="">兑换状态:{{item.state == 0 ? '未兑换':'已兑换'}}</view> --> 145 <!-- <view style="">兑换状态:{{item.state == 0 ? '未兑换':'已兑换'}}</view> -->
146 - <!-- <view class="fs24 c-a">中奖时间:{{filter.format_time(item.luck_time, 1)}}</view> --> 146 + <view class="fs24 c-a" wx:if="{{item.luck_type == 5}}">兑换截止时间:{{filter.show_default(item.changeDate, '不限')}}</view>
147 <view class="btn" bindtap="{{item.luck_type == 5 ? (item.state == 0 ? 'showQr':''):'goto'}}" data-type="{{item.luck_type}}" data-id="{{item.id}}" data-ordersn="{{item.order_sn}}" data-buyreceiveid="{{item.buyreceive_id}}">{{item.luck_type == 5 ? (item.state == 1 ? '已兑换':'兑换'):'查看'}}</view> 147 <view class="btn" bindtap="{{item.luck_type == 5 ? (item.state == 0 ? 'showQr':''):'goto'}}" data-type="{{item.luck_type}}" data-id="{{item.id}}" data-ordersn="{{item.order_sn}}" data-buyreceiveid="{{item.buyreceive_id}}">{{item.luck_type == 5 ? (item.state == 1 ? '已兑换':'兑换'):'查看'}}</view>
148 </view> 148 </view>
149 </view> 149 </view>
@@ -187,9 +187,18 @@ @@ -187,9 +187,18 @@
187 </view> 187 </view>
188 188
189 189
  190 +<!-- 海报 -->
  191 + <view class="poster-container" wx:if="{{showPoster}}">
  192 + <view class="t-r pdb20 white2"><text class="iconfont icon-close fs40" bindtap="closePoster"></text></view>
  193 + <image src="{{myimg}}" class="poster" show-menu-by-longpress></image>
  194 + <view class="pdt10 fs26 white2"><text class="iconfont icon-zhiwen"></text> 长按图片保存至相册</view>
  195 + </view>
  196 +
  197 +
190 <!-- 遮罩层 --> 198 <!-- 遮罩层 -->
191 <view class="mask" wx:if="{{showMask}}"></view> 199 <view class="mask" wx:if="{{showMask}}"></view>
192 -<!-- 进场遮罩层 -->  
193 -<view class="mask2" wx:if="{{showMask2}}"></view>  
194 200
195 -<qrcode id="qrcode" bind:close="closeQr"></qrcode>  
196 \ No newline at end of file 201 \ No newline at end of file
  202 +<qrcode id="qrcode" bind:close="closeQr"></qrcode>
  203 +
  204 +
  205 +<painter style="position: absolute; top: -9999rpx;" palette="{{imgDraw}}" bind:imgOK="onImgOK" />
197 \ No newline at end of file 206 \ No newline at end of file
packageB/pages/luckactivity/luckinfo/luckinfo.wxss
@@ -13,7 +13,7 @@ page, @@ -13,7 +13,7 @@ page,
13 13
14 .luck-container { 14 .luck-container {
15 background-size: 100% auto !important; 15 background-size: 100% auto !important;
16 - padding: 50% 20rpx 0; 16 + padding: 42% 20rpx 0;
17 } 17 }
18 18
19 .weel-container { 19 .weel-container {
@@ -320,9 +320,7 @@ page, @@ -320,9 +320,7 @@ page,
320 color: #ff2d4b; 320 color: #ff2d4b;
321 } 321 }
322 322
323 -.bdb {  
324 - border-bottom: 2rpx solid #ebedf0;  
325 -} 323 +
326 324
327 .c-yellow { 325 .c-yellow {
328 color: yellow; 326 color: yellow;
@@ -336,7 +334,7 @@ page, @@ -336,7 +334,7 @@ page,
336 width: 100%; 334 width: 100%;
337 height: 100%; 335 height: 100%;
338 top: 0; 336 top: 0;
339 - background-color: rgba(0,0,0,.5); 337 + background-color: rgba(0,0,0,.7);
340 z-index: 1; 338 z-index: 1;
341 } 339 }
342 340
@@ -437,3 +435,50 @@ page, @@ -437,3 +435,50 @@ page,
437 padding: 0 10rpx; 435 padding: 0 10rpx;
438 } 436 }
439 437
  438 +.bdt ~ .bdt {
  439 + border-top: 2rpx solid #ebedf0;
  440 +}
  441 +
  442 +.poster-container {
  443 + text-align: center;
  444 + color: white;
  445 + position: fixed;
  446 + top: 50%;
  447 + left: 50%;
  448 + transform: translate(-50%, -50%);
  449 + z-index: 9;
  450 +}
  451 +
  452 +.poster {
  453 + width: 554rpx;
  454 + height: 899rpx;
  455 + /* border-radius: 16rpx; */
  456 + margin: 0 auto;
  457 + /* background-color: pink; */
  458 +}
  459 +
  460 +
  461 +.luck-container.on .weel-txt {
  462 + color: black;
  463 +}
  464 +
  465 +.luck-container.on .badge,
  466 +.luck-container.on .logo-container,
  467 +.luck-container.on .tip-to-down {
  468 + -webkit-filter: brightness(60%);
  469 + filter: brightness(60%);
  470 +}
  471 +
  472 +.luck-container.on .panel {
  473 + box-shadow: 0 16rpx 24rpx #e7e9eb;
  474 +}
  475 +
  476 +.luck-container.on .cs {
  477 + color: #ff5000;
  478 +}
  479 +
  480 +
  481 +
  482 +
  483 +
  484 +