Commit 80cda58a8d3f8d544edd605017671fc6ca2b6738
1 parent
e6c9db0a
幸运购
Showing
13 changed files
with
427 additions
and
907 deletions
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js
| ... | ... | @@ -10,22 +10,6 @@ Page({ |
| 10 | 10 | isLoading: false, // 检测是否已经发送请求,防止重复发送请求 |
| 11 | 11 | noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 |
| 12 | 12 | pageNum: 1, // 当前页数 |
| 13 | - // typeArr: [{ | |
| 14 | - // key: 'point', | |
| 15 | - // name: '积分', | |
| 16 | - // },{ | |
| 17 | - // key: 'grow', | |
| 18 | - // name: '成长值', | |
| 19 | - // },{ | |
| 20 | - // key: 'point', | |
| 21 | - // name: '优惠券', | |
| 22 | - // },{ | |
| 23 | - // key: 'prestore_name', | |
| 24 | - // name: '项目服务', | |
| 25 | - // },{ | |
| 26 | - // key: 'prestore_money', | |
| 27 | - // name: '预存金额', | |
| 28 | - // }], | |
| 29 | 13 | }, |
| 30 | 14 | |
| 31 | 15 | onLoad: function () { |
| ... | ... | @@ -54,13 +38,11 @@ Page({ |
| 54 | 38 | enabled: 1 |
| 55 | 39 | } |
| 56 | 40 | }).then(res => { |
| 57 | - // console.log('获取广告', res); | |
| 58 | 41 | if(res.data.code == 0) { |
| 59 | 42 | self.setData({ |
| 60 | 43 | adList: res.data.data.pageData, |
| 61 | 44 | }); |
| 62 | 45 | }; |
| 63 | - | |
| 64 | 46 | }); |
| 65 | 47 | |
| 66 | 48 | // 获取列表 |
| ... | ... | @@ -72,8 +54,6 @@ Page({ |
| 72 | 54 | |
| 73 | 55 | |
| 74 | 56 | }; |
| 75 | - | |
| 76 | - | |
| 77 | 57 | }; |
| 78 | 58 | }, |
| 79 | 59 | ... | ... |
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxml
| ... | ... | @@ -11,11 +11,11 @@ |
| 11 | 11 | |
| 12 | 12 | <view class="list"> |
| 13 | 13 | <block wx:for="{{list.pageData}}"> |
| 14 | - <view class="list-item" wx:if="{{item.status}}"> | |
| 15 | - | |
| 14 | + <view class="list-item" wx:if="{{item.status == 1}}" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{item.goods_id}}&prom_type=9&group_id={{item.id}}"> | |
| 16 | 15 | <view class="flex ai-center"> |
| 17 | - <view class="img-container"><image class="img-block" src="{{imghost + item.original_img}}" data-val="{{item.original_img}}" | |
| 18 | - data-errorimg="list.pageData[{{index}}].original_img" binderror="bind_bnerr" lazy-load="true"></image></view> | |
| 16 | + <view class="img-container"> | |
| 17 | + <image class="img-block" src="{{imghost + item.original_img}}" data-val="{{item.original_img}}" | |
| 18 | + data-errorimg="list.pageData[{{index}}].original_img" binderror="bind_bnerr" lazy-load="true" mode="heightFix"></image></view> | |
| 19 | 19 | <view class="pdl20 flex fdc jc_sb f1"> |
| 20 | 20 | |
| 21 | 21 | <view class="ellipsis-2 name fs28" data-content="{{item.group_num}}人团">{{item.title}}</view> |
| ... | ... | @@ -26,8 +26,7 @@ |
| 26 | 26 | </view> |
| 27 | 27 | <view class="flex jc_sb"> |
| 28 | 28 | <progress class="pdr20 f1 progress" percent="{{filters.percent(item.num, item.group_num)}}" activeColor="#FF6768" backgroundColor="#d0d0d0" border-radius="12" stroke-width="12" data-content="{{item.num}}人已参团"></progress> |
| 29 | - <view class="btn fs26" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{item.goods_id}}&prom_type=9&group_id={{item.id}}">去参团</view> | |
| 30 | - <!-- &title=狐狸3号测速003&prom_type=7&prom_id=468 --> | |
| 29 | + <view class="btn fs26">去参团</view> | |
| 31 | 30 | </view> |
| 32 | 31 | </view> |
| 33 | 32 | ... | ... |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
| ... | ... | @@ -50,8 +50,6 @@ Page({ |
| 50 | 50 | showPoster: false, |
| 51 | 51 | }, |
| 52 | 52 | onLoad: function (t) { |
| 53 | - // wx.setNavigationBarTitle({ title: "拼团订单",}) | |
| 54 | - // console.log('options========>', t); | |
| 55 | 53 | if(t.team_id != null && t.team_id !=undefined) { |
| 56 | 54 | this.setData({ |
| 57 | 55 | team_id: t.team_id, |
| ... | ... | @@ -109,13 +107,13 @@ Page({ |
| 109 | 107 | |
| 110 | 108 | onUnload: function () { |
| 111 | 109 | // 开团成功后,清除storage里的team_id |
| 112 | - if(this.data.luckyGoInfo.num == 0) { | |
| 110 | + if(this.data.luckyGoInfo.num && this.data.luckyGoInfo.num == 0) { | |
| 113 | 111 | wx.removeStorageSync('team_id'); |
| 114 | 112 | }; |
| 115 | 113 | }, |
| 116 | 114 | |
| 117 | 115 | //关闭展开列表 |
| 118 | - click:function(e){ | |
| 116 | + click: function(e) { | |
| 119 | 117 | this.setData({ |
| 120 | 118 | hiddenName: !this.data.hiddenName, |
| 121 | 119 | zk: !this.data.zk, |
| ... | ... | @@ -123,7 +121,7 @@ Page({ |
| 123 | 121 | }, |
| 124 | 122 | |
| 125 | 123 | //打开收起拼团列表 |
| 126 | - czk:function(e){ | |
| 124 | + czk: function(e) { | |
| 127 | 125 | this.setData({ |
| 128 | 126 | zk:!this.data.zk, |
| 129 | 127 | hiddenName: !this.data.hiddenName, |
| ... | ... | @@ -131,28 +129,28 @@ Page({ |
| 131 | 129 | }, |
| 132 | 130 | |
| 133 | 131 | //打开蒙板提示 |
| 134 | - cmeng:function(e){ | |
| 132 | + cmeng: function(e) { | |
| 135 | 133 | this.setData({ |
| 136 | 134 | meng:!this.data.meng, |
| 137 | 135 | }) |
| 138 | 136 | }, |
| 139 | 137 | |
| 140 | 138 | //关闭蒙板提示 |
| 141 | - cmc:function(e){ | |
| 139 | + cmc: function(e) { | |
| 142 | 140 | this.setData({ |
| 143 | 141 | meng: !this.data.meng, |
| 144 | 142 | }) |
| 145 | 143 | }, |
| 146 | 144 | |
| 147 | 145 | //打开二维码提示 |
| 148 | - cerweima:function(e){ | |
| 146 | + cerweima: function(e) { | |
| 149 | 147 | this.setData({ |
| 150 | 148 | meng: !this.data.meng, |
| 151 | 149 | erweima: !this.data.erweima, |
| 152 | 150 | }) |
| 153 | 151 | }, |
| 154 | 152 | |
| 155 | - cerc:function(e){ | |
| 153 | + cerc: function(e) { | |
| 156 | 154 | this.setData({ |
| 157 | 155 | erweima: !this.data.erweima, |
| 158 | 156 | meng: !this.data.meng, |
| ... | ... | @@ -347,9 +345,9 @@ Page({ |
| 347 | 345 | |
| 348 | 346 | wx.setNavigationBarTitle({ |
| 349 | 347 | title: "拼团详情", |
| 350 | - }) | |
| 348 | + }); | |
| 351 | 349 | |
| 352 | - ee.countDown2(); | |
| 350 | + // ee.countDown2(); | |
| 353 | 351 | |
| 354 | 352 | //获取分享图片的本地地址 |
| 355 | 353 | // var path2 = os.imghost + th.data.luckyGoInfo.original_img; |
| ... | ... | @@ -367,106 +365,112 @@ Page({ |
| 367 | 365 | |
| 368 | 366 | }, |
| 369 | 367 | //---小于10的格式化函数---- |
| 370 | - timeFormat(param) { | |
| 371 | - return param < 10 ? '0' + param : param; | |
| 372 | - }, | |
| 373 | - countDown2() { | |
| 374 | - var th = this; | |
| 375 | - // 获取当前时间,同时得到活动结束时间数组 | |
| 376 | - var newTime = ut.gettimestamp(); | |
| 377 | - var o = this.data.teamgroup; | |
| 378 | - if(!o) return false; | |
| 368 | + // timeFormat(param) { | |
| 369 | + // return param < 10 ? '0' + param : param; | |
| 370 | + // }, | |
| 371 | + // countDown2() { | |
| 372 | + // var th = this; | |
| 373 | + // // 获取当前时间,同时得到活动结束时间数组 | |
| 374 | + // var newTime = ut.gettimestamp(); | |
| 375 | + // var o = this.data.teamgroup; | |
| 376 | + // if(!o) return false; | |
| 379 | 377 | |
| 380 | - var endTime = o.kt_end_time; | |
| 381 | - if (o.status == 0) endTime = o.start_time; | |
| 378 | + // var endTime = o.kt_end_time; | |
| 379 | + // if (o.status == 0) endTime = o.start_time; | |
| 382 | 380 | |
| 383 | - //看一下,是否要支付尾款 | |
| 384 | - if(o.team_type==3 && th.data.order.pt_status==2){ | |
| 385 | - endTime = o.wk_end_time; | |
| 386 | - } | |
| 381 | + // //看一下,是否要支付尾款 | |
| 382 | + // if(o.team_type==3 && th.data.order.pt_status==2){ | |
| 383 | + // endTime = o.wk_end_time; | |
| 384 | + // } | |
| 387 | 385 | |
| 388 | - let obj = null; | |
| 389 | - // 如果活动未结束,对时间进行处理 | |
| 390 | - if (endTime - newTime > 0) { | |
| 391 | - let time = (endTime - newTime); | |
| 392 | - // 获取天、时、分、秒 | |
| 393 | - let day = parseInt(time / (60 * 60 * 24)); | |
| 394 | - let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 395 | - let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 396 | - let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 397 | - obj = { | |
| 398 | - day: this.timeFormat(day), | |
| 399 | - hou: this.timeFormat(hou), | |
| 400 | - min: this.timeFormat(min), | |
| 401 | - sec: this.timeFormat(sec) | |
| 402 | - } | |
| 403 | - } else { | |
| 404 | - //活动已结束,全部设置为'00' | |
| 405 | - obj = { | |
| 406 | - day: '00', | |
| 407 | - hou: '00', | |
| 408 | - min: '00', | |
| 409 | - sec: '00' | |
| 410 | - } | |
| 411 | - } | |
| 412 | - var txt = "pindGoods.djs"; | |
| 413 | - th.setData({ | |
| 414 | - obj: obj | |
| 415 | - }); | |
| 416 | - setTimeout(th.countDown2, 1000); | |
| 417 | - }, | |
| 386 | + // let obj = null; | |
| 387 | + // // 如果活动未结束,对时间进行处理 | |
| 388 | + // if (endTime - newTime > 0) { | |
| 389 | + // let time = (endTime - newTime); | |
| 390 | + // // 获取天、时、分、秒 | |
| 391 | + // let day = parseInt(time / (60 * 60 * 24)); | |
| 392 | + // let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 393 | + // let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 394 | + // let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 395 | + // obj = { | |
| 396 | + // day: this.timeFormat(day), | |
| 397 | + // hou: this.timeFormat(hou), | |
| 398 | + // min: this.timeFormat(min), | |
| 399 | + // sec: this.timeFormat(sec) | |
| 400 | + // } | |
| 401 | + // } else { | |
| 402 | + // //活动已结束,全部设置为'00' | |
| 403 | + // obj = { | |
| 404 | + // day: '00', | |
| 405 | + // hou: '00', | |
| 406 | + // min: '00', | |
| 407 | + // sec: '00' | |
| 408 | + // } | |
| 409 | + // } | |
| 410 | + // var txt = "pindGoods.djs"; | |
| 411 | + // th.setData({ | |
| 412 | + // obj: obj | |
| 413 | + // }); | |
| 414 | + // setTimeout(th.countDown2, 1000); | |
| 415 | + // }, | |
| 418 | 416 | |
| 419 | 417 | |
| 420 | 418 | |
| 421 | 419 | //--定义的保存图片方法,分享团--- |
| 422 | 420 | saveImageToPhotosAlbum: function () { |
| 421 | + var that = this, th = that; | |
| 422 | + var app = getApp(); | |
| 423 | + | |
| 424 | + // 关闭底部分享弹窗 | |
| 425 | + this.setData({ | |
| 426 | + share_hidden: false, | |
| 427 | + }); | |
| 428 | + | |
| 423 | 429 | //--先判断会员状态-- |
| 424 | 430 | var user_info = getApp().globalData.userInfo; |
| 425 | 431 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 426 | 432 | //getApp().my_warnning("请先登录",0,this); |
| 427 | - wx.navigateTo({ url: '/pages/togoin/togoin', }) | |
| 428 | - return false; | |
| 433 | + // wx.navigateTo({ url: '/pages/togoin/togoin', }) | |
| 434 | + // return false; | |
| 429 | 435 | } |
| 430 | 436 | |
| 431 | - if (this.data.share_hidden) { | |
| 432 | - this.setData({ share_hidden: false,}); | |
| 433 | - }; | |
| 437 | + // if (this.data.share_hidden) { | |
| 438 | + // this.setData({ share_hidden: false,}); | |
| 439 | + // }; | |
| 434 | 440 | |
| 435 | 441 | //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 9幸运购 |
| 436 | 442 | var type = 9; |
| 437 | - if (type == 6) type = 2; | |
| 438 | - if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; | |
| 443 | + // if (type == 6) type = 2; | |
| 444 | + // if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; | |
| 439 | 445 | |
| 440 | - wx.showLoading({ title: '生成中...',}) | |
| 441 | - var that = this, th = that; | |
| 446 | + wx.showLoading({title: '生成海报中'}); | |
| 447 | + | |
| 442 | 448 | //设置画板显示,才能开始绘图 |
| 443 | - that.setData({ | |
| 444 | - canvasHidden: false | |
| 445 | - }) | |
| 449 | + // that.setData({ | |
| 450 | + // canvasHidden: true | |
| 451 | + // }) | |
| 446 | 452 | |
| 447 | - var app = getApp(); | |
| 453 | + | |
| 448 | 454 | var unit = that.data.screenWidth / 750 * 1.35; //基础单位, |
| 449 | - var path2 = that.data.luckyGoInfo.original_img; | |
| 450 | - var scene = th.data.param.goods_id + ""; | |
| 455 | + // var path2 = th.data.iurl + th.data.luckyGoInfo.original_img; | |
| 456 | + var scene = th.data.param.goods_id + ''; | |
| 451 | 457 | scene+="."+9+"."+th.data.luckyGoInfo.id; |
| 452 | 458 | |
| 453 | 459 | var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; |
| 454 | 460 | if (user_id > 0) { |
| 455 | 461 | scene += "_" + user_id; |
| 456 | - } | |
| 462 | + }; | |
| 457 | 463 | //-- 如果不是会员分享过来的要分享给别人 -- |
| 458 | - if (getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | |
| 464 | + if(getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | |
| 459 | 465 | //固定房间是第3个字符 |
| 460 | 466 | if (!user_id) scene += "_0"; |
| 461 | 467 | scene += "_" + getApp().globalData.room_id; |
| 462 | - } | |
| 468 | + }; | |
| 463 | 469 | ///二微码 |
| 464 | 470 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
| 465 | 471 | os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; |
| 466 | 472 | |
| 467 | - console.log(path3); | |
| 468 | 473 | |
| 469 | - | |
| 470 | 474 | // 读取文件成功则OK-- |
| 471 | 475 | wx.getImageInfo({ |
| 472 | 476 | src: path3, |
| ... | ... | @@ -488,489 +492,294 @@ Page({ |
| 488 | 492 | |
| 489 | 493 | |
| 490 | 494 | //-- 如果有自定义海报的时候,判断背景的图片 -- |
| 491 | - if (th.data.share_b_img) { | |
| 492 | - pg_path = th.data.share_b_img; | |
| 493 | - } | |
| 495 | + // if (th.data.share_b_img) { | |
| 496 | + // pg_path = th.data.share_b_img; | |
| 497 | + // } | |
| 498 | + | |
| 494 | 499 | // context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); |
| 495 | 500 | |
| 496 | 501 | |
| 497 | - if(type == 0) { // 如果是普通商品,绘制新海报 | |
| 498 | - th.drawPoster(context, unit, th.data.share_goods_img, vpath); | |
| 499 | - } else { | |
| 502 | + // if(type == 0) { | |
| 503 | + // // 如果是普通商品,绘制新海报 | |
| 504 | + // th.drawPoster(context, unit, th.data.share_goods_img, vpath); | |
| 505 | + // } else { | |
| 500 | 506 | context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); |
| 501 | - }; | |
| 507 | + // }; | |
| 502 | 508 | |
| 503 | 509 | // th.drawPoster(context, unit, th.data.share_goods_img, vpath); |
| 504 | 510 | |
| 505 | 511 | |
| 506 | 512 | //-- 是自定义海报的情况下 -- |
| 507 | - // if(type != 0) { | |
| 513 | + if(type != 0) { | |
| 508 | 514 | |
| 509 | 515 | |
| 510 | 516 | |
| 511 | - // if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
| 512 | - // //在线上分享人的情况下 | |
| 513 | - // if (parseInt(th.data.poster.show_headpic)) { | |
| 514 | - // //获取坐标 | |
| 515 | - // var x = parseFloat(th.data.poster.head_x) * 2; | |
| 516 | - // var y = parseFloat(th.data.poster.head_y) * 2; | |
| 517 | - // var x1 = (x + 90) * unit; | |
| 518 | - // var y1 = (y + 50) * unit; | |
| 519 | - // //--昵称--- | |
| 520 | - // context.setFontSize(24 * unit) | |
| 521 | - // context.setFillStyle("black") | |
| 522 | - // context.fillText(app.globalData.userInfo.nickname, x1, y1); | |
| 523 | - // var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; | |
| 524 | - // //强烈推荐 改许程 | |
| 525 | - // var tj_path = "../../../../images/share/q_tj.png"; | |
| 526 | - // context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); | |
| 527 | - // context.setFontSize(16 * unit); | |
| 528 | - // context.setLineJoin('round'); //交点设置成圆角 | |
| 529 | - // context.setFillStyle("white"); | |
| 530 | - // context.fillText('强烈推荐', x1 + width + 8 * unit, y1 - 1 * unit); | |
| 517 | + if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
| 518 | + //在线上分享人的情况下 | |
| 519 | + // if (parseInt(th.data.poster.show_headpic)) { | |
| 520 | + // //获取坐标 | |
| 521 | + // var x = parseFloat(th.data.poster.head_x) * 2; | |
| 522 | + // var y = parseFloat(th.data.poster.head_y) * 2; | |
| 523 | + // var x1 = (x + 90) * unit; | |
| 524 | + // var y1 = (y + 50) * unit; | |
| 525 | + // //--昵称--- | |
| 526 | + // context.setFontSize(24 * unit) | |
| 527 | + // context.setFillStyle("black") | |
| 528 | + // context.fillText(app.globalData.userInfo.nickname, x1, y1); | |
| 529 | + // var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; | |
| 530 | + // //强烈推荐 改许程 | |
| 531 | + // var tj_path = "../../../../images/share/q_tj.png"; | |
| 532 | + // context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); | |
| 533 | + // context.setFontSize(16 * unit); | |
| 534 | + // context.setLineJoin('round'); //交点设置成圆角 | |
| 535 | + // context.setFillStyle("white"); | |
| 536 | + // context.fillText('强烈推荐', x1 + width + 8 * unit, y1 - 1 * unit); | |
| 531 | 537 | |
| 532 | - // //context.setFillStyle("black") | |
| 533 | - // //context.setFontSize(24 * unit) | |
| 534 | - // //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit); | |
| 535 | - // } | |
| 536 | - // } else { | |
| 537 | - // //--昵称--- | |
| 538 | - // context.setFontSize(24 * unit); | |
| 539 | - // context.setFillStyle("black"); | |
| 540 | - // context.fillText(app.globalData.userInfo.nickname, 152 * unit, 60 * unit); | |
| 541 | - // var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; | |
| 542 | - // //强烈推荐 改许程 | |
| 543 | - // // var tj_path = "../../../../images/share/q_tj.png"; | |
| 544 | - // // let txt_gn = th.data.luckGoInfo.group_num + '人团'; | |
| 545 | - // // let width_gn = ut.measureText(txt_gn, 15); | |
| 546 | - // // context.drawImage(tj_path, 152 * unit + width, 54 * unit, (width_gn + 20) * unit, 30 * unit); | |
| 547 | - // // context.setFontSize(16 * unit); | |
| 548 | - // // context.setLineJoin('round'); //交点设置成圆角 | |
| 549 | - // // context.setFillStyle("white"); | |
| 550 | - // // context.fillText(txt_gn, 149 * unit + width + 15 * unit, 75 * unit); | |
| 551 | - // // 发出幸运购活动邀请 | |
| 552 | - // context.setFillStyle("#7f7f7f") | |
| 553 | - // context.setFontSize(21.3 * unit) | |
| 554 | - // context.fillText("向您发出幸运购邀请", 152 * unit, 90 * unit); | |
| 538 | + // //context.setFillStyle("black") | |
| 539 | + // //context.setFontSize(24 * unit) | |
| 540 | + // //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit); | |
| 541 | + // } | |
| 542 | + } else { | |
| 543 | + //--昵称--- | |
| 544 | + context.setFontSize(24 * unit); | |
| 545 | + context.setFillStyle("black"); | |
| 546 | + context.fillText(getApp().globalData.userInfo.nickname, 152 * unit, 60 * unit); | |
| 547 | + var width = 24 * getApp().globalData.userInfo.nickname.length * unit + 2 * unit; | |
| 548 | + //强烈推荐 改许程 | |
| 549 | + // var tj_path = "../../../../images/share/q_tj.png"; | |
| 550 | + // let txt_gn = th.data.luckGoInfo.group_num + '人团'; | |
| 551 | + // let width_gn = ut.measureText(txt_gn, 15); | |
| 552 | + // context.drawImage(tj_path, 152 * unit + width, 54 * unit, (width_gn + 20) * unit, 30 * unit); | |
| 553 | + // context.setFontSize(16 * unit); | |
| 554 | + // context.setLineJoin('round'); //交点设置成圆角 | |
| 555 | + // context.setFillStyle("white"); | |
| 556 | + // context.fillText(txt_gn, 149 * unit + width + 15 * unit, 75 * unit); | |
| 557 | + // 发出幸运购活动邀请 | |
| 558 | + context.setFillStyle("#7f7f7f") | |
| 559 | + context.setFontSize(21.3 * unit) | |
| 560 | + context.fillText("向您发出幸运购邀请", 152 * unit, 90 * unit); | |
| 555 | 561 | |
| 556 | - // } | |
| 562 | + } | |
| 557 | 563 | |
| 558 | - // }; | |
| 564 | + }; | |
| 559 | 565 | |
| 560 | 566 | |
| 561 | - // // var share_title = th.data.data.goods_name; | |
| 562 | - // var share_title = th.data.param.goods_name; | |
| 563 | - // if (th.data.prom_type == 1 || th.data.prom_type == 6 || th.data.prom_type == 4) { | |
| 564 | - // share_title = th.data.prom_act.share_title; | |
| 565 | - // if (!share_title) share_title = th.data.prom_act.title; | |
| 566 | - // if (th.data.prom_type == 4) share_title = th.data.prom_act.name; | |
| 567 | - // } | |
| 567 | + // var share_title = th.data.data.goods_name; | |
| 568 | + var share_title = th.data.param.goods_name; | |
| 569 | + // if (th.data.prom_type == 1 || th.data.prom_type == 6 || th.data.prom_type == 4) { | |
| 570 | + // share_title = th.data.prom_act.share_title; | |
| 571 | + // if (!share_title) share_title = th.data.prom_act.title; | |
| 572 | + // if (th.data.prom_type == 4) share_title = th.data.prom_act.name; | |
| 573 | + // } | |
| 568 | 574 | |
| 569 | - // //---产品名称--- | |
| 570 | - // //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | |
| 571 | - // if (type != 4 && type != 0) { | |
| 572 | - // context.setFillStyle("black"); | |
| 573 | - // context.setFontSize(21.3 * unit) | |
| 574 | - // th.draw_Text(context, share_title, | |
| 575 | - // 38 * unit, 180 * unit, 220 * unit, 220 * unit, unit); | |
| 575 | + //---产品名称--- | |
| 576 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | |
| 577 | + if (type != 4 && type != 0) { | |
| 578 | + context.setFillStyle("black"); | |
| 579 | + context.setFontSize(21.3 * unit); | |
| 580 | + th.draw_Text(context, share_title, | |
| 581 | + 38 * unit, 180 * unit, 220 * unit, 220 * unit, unit); | |
| 576 | 582 | |
| 577 | - // //------产品的价格------- | |
| 578 | - // context.setFontSize(23 * unit) | |
| 579 | - // context.setFillStyle("red") | |
| 583 | + //------产品的价格------- | |
| 584 | + context.setFontSize(23 * unit); | |
| 585 | + context.setFillStyle("red"); | |
| 580 | 586 | |
| 581 | 587 | |
| 582 | - // // var pri0 = th.data.data.shop_price; | |
| 583 | - // var pri0 = th.data.luckyGoInfo.group_price; | |
| 584 | - // if (th.data.prom_act) | |
| 585 | - // pri0 = th.data.prom_act.price; | |
| 586 | - // pri0 = parseFloat(pri0).toFixed(2); | |
| 587 | - // var wd1 = th.data.screenWidth - ut.measureText(pri0, 31 * unit) - 25; | |
| 588 | - // context.fillText("¥", wd1 - 15, 185 * unit); | |
| 589 | - // context.setFontSize(31 * unit) | |
| 590 | - // context.fillText(pri0, wd1, 185 * unit); | |
| 588 | + // var pri0 = th.data.data.shop_price; | |
| 589 | + var pri0 = th.data.luckyGoInfo.group_price/100; | |
| 590 | + if (th.data.prom_act) pri0 = th.data.prom_act.price; | |
| 591 | + pri0 = parseFloat(pri0).toFixed(2); | |
| 592 | + var wd1 = th.data.screenWidth - ut.measureText(pri0, 31 * unit) - 25; | |
| 593 | + context.fillText("¥", wd1 - 15, 185 * unit); | |
| 594 | + context.setFontSize(31 * unit); | |
| 595 | + context.fillText(pri0, wd1, 185 * unit); | |
| 591 | 596 | |
| 592 | - // var tj_path = "../../../../images/share/q_tj.png"; | |
| 593 | - // context.drawImage(tj_path, 315 * unit, 158 * unit, 85 * unit, 30 * unit); | |
| 594 | - // context.setLineJoin('round'); //交点设置成圆角 | |
| 595 | - // context.setFontSize(18 * unit); | |
| 596 | - // context.setFillStyle("white"); | |
| 597 | - // context.fillText('参团价', 330 * unit, 179 * unit); | |
| 597 | + var tj_path = "../../../../images/share/q_tj.png"; | |
| 598 | + context.drawImage(tj_path, 315 * unit, 158 * unit, 85 * unit, 30 * unit); | |
| 599 | + context.setLineJoin('round'); //交点设置成圆角 | |
| 600 | + context.setFontSize(18 * unit); | |
| 601 | + context.setFillStyle("white"); | |
| 602 | + context.fillText('参团价', 330 * unit, 179 * unit); | |
| 598 | 603 | |
| 599 | - // //---市场价划掉--- | |
| 600 | - // context.setFillStyle("gray") | |
| 601 | - // context.setFontSize(22 * unit) | |
| 602 | - // pri0 = "零售价:¥" + th.data.luckyGoInfo.market_price.toFixed(2); | |
| 603 | - // var wd2 = th.data.screenWidth - ut.measureText(pri0, 22 * unit) - 25; | |
| 604 | - // context.fillText(pri0, wd2, 213 * unit); | |
| 604 | + //---市场价划掉--- | |
| 605 | + context.setFillStyle("gray"); | |
| 606 | + context.setFontSize(22 * unit); | |
| 607 | + pri0 = "零售价:¥" + th.data.luckyGoInfo.market_price.toFixed(2); | |
| 608 | + var wd2 = th.data.screenWidth - ut.measureText(pri0, 22 * unit) - 25; | |
| 609 | + context.fillText(pri0, wd2, 213 * unit); | |
| 605 | 610 | |
| 606 | - // context.setStrokeStyle('gray'); | |
| 607 | - // context.setLineWidth(1 * unit); | |
| 608 | - // context.moveTo(wd2 - 5, 206 * unit); | |
| 609 | - // context.lineTo(wd2 + ut.measureText(pri0, 22 * unit) + 5, 206 * unit); | |
| 610 | - // context.stroke(); | |
| 611 | + context.setStrokeStyle('gray'); | |
| 612 | + context.setLineWidth(1 * unit); | |
| 613 | + context.moveTo(wd2 - 5, 206 * unit); | |
| 614 | + context.lineTo(wd2 + ut.measureText(pri0, 22 * unit) + 5, 206 * unit); | |
| 615 | + context.stroke(); | |
| 611 | 616 | |
| 612 | - // } else if(type == 4 && type != 0) { | |
| 613 | - // context.setFillStyle("black"); | |
| 614 | - // context.setFontSize(21.3 * unit) | |
| 615 | - // th.draw_Text(context, share_title, | |
| 616 | - // 38 * unit, 170 * unit, 20 * unit, 300 * unit, unit); | |
| 617 | - // //------ 产品的价格 ----- | |
| 618 | - // var pri0 = th.data.prom_act.addmoney; | |
| 619 | - // var integral = th.data.prom_act.integral; | |
| 620 | - // var text = ""; | |
| 621 | - // if (integral) { text = integral + "积分"; } | |
| 622 | - // if (pri0 && integral) { text += "+"; } | |
| 623 | - // if (pri0) { text += "¥" + pri0; } | |
| 617 | + } else if(type == 4 && type != 0) { | |
| 618 | + context.setFillStyle("black"); | |
| 619 | + context.setFontSize(21.3 * unit); | |
| 620 | + th.draw_Text(context, share_title, | |
| 621 | + 38 * unit, 170 * unit, 20 * unit, 300 * unit, unit); | |
| 622 | + //------ 产品的价格 ----- | |
| 623 | + var pri0 = th.data.prom_act.addmoney; | |
| 624 | + var integral = th.data.prom_act.integral; | |
| 625 | + var text = ""; | |
| 626 | + if (integral) { text = integral + "积分"; } | |
| 627 | + if (pri0 && integral) { text += "+"; } | |
| 628 | + if (pri0) { text += "¥" + pri0; } | |
| 624 | 629 | |
| 625 | - // if (!pri0 && !integral) { text = "0积分"; } | |
| 626 | - // context.setFillStyle("red"); | |
| 627 | - // context.fillText(text, 38 * unit, 235 * unit); | |
| 630 | + if (!pri0 && !integral) { text = "0积分"; } | |
| 631 | + context.setFillStyle("red"); | |
| 632 | + context.fillText(text, 38 * unit, 235 * unit); | |
| 628 | 633 | |
| 629 | - // } | |
| 634 | + } | |
| 630 | 635 | |
| 631 | - // //---中间大图--- | |
| 632 | - // if(type != 0) { | |
| 633 | - // // context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); | |
| 634 | - // context.drawImage(th.data.luckyGoInfo.original_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); | |
| 635 | - // }; | |
| 636 | + //---中间大图--- | |
| 637 | + // if(type != 0) { | |
| 638 | + // ee.data.share_img_localpath | |
| 639 | + context.drawImage(that.data.share_img_localpath, 70 * unit, 250 * unit, 408 * unit, 408 * unit); | |
| 640 | + // wx.getImageInfo({ | |
| 641 | + // src: th.data.iurl + th.data.luckyGoInfo.original_img, | |
| 642 | + // ssuccess: function (res) { | |
| 643 | + // //res.path是网络图片的本地地址 | |
| 644 | + // console.log('res.path', res.path); | |
| 645 | + // context.drawImage(res.path, 70 * unit, 250 * unit, 408 * unit, 408 * unit); | |
| 646 | + // // ee.data.share_img_localpath = res.path; | |
| 647 | + // // tt(); | |
| 648 | + // }, | |
| 649 | + // fail: function (res) { | |
| 650 | + // // context.drawImage('../../../../images/share/default_g_img.gif', 70 * unit, 250 * unit, 408 * unit, 408 * unit); | |
| 651 | + // // ee.data.share_img_localpath= "../../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 | |
| 652 | + // // tt(); | |
| 653 | + // } | |
| 654 | + // }); | |
| 655 | + // context.drawImage(th.data.luckyGoInfo.original_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); | |
| 656 | + // }; | |
| 636 | 657 | |
| 637 | 658 | |
| 638 | 659 | |
| 639 | - // //-------大图后面就不一样了----------- | |
| 640 | - // switch (type) { | |
| 641 | - // case 0: break;//普通商品的展示 | |
| 642 | - // case 4: | |
| 643 | - // //中间的几个字 | |
| 644 | - // if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
| 645 | - // if (parseInt(th.data.poster.show_quality)) { | |
| 646 | - // var g_path = "../../../../images/share/s_gou.png"; | |
| 647 | - // context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 648 | - // context.setFillStyle("red") | |
| 649 | - // context.setFontSize(18 * unit) | |
| 650 | - // context.fillText("正品保证", 84 * unit, 690 * unit); | |
| 651 | - | |
| 652 | - // context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 653 | - // context.setFillStyle("red") | |
| 654 | - // context.setFontSize(18 * unit) | |
| 655 | - // context.fillText("纯实体店", 246 * unit, 690 * unit); | |
| 656 | - | |
| 657 | - // context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 658 | - // context.setFillStyle("red") | |
| 659 | - // context.setFontSize(18 * unit) | |
| 660 | - // context.fillText("官方验证", 420 * unit, 690 * unit); | |
| 661 | - // } | |
| 662 | - | |
| 663 | - // } else { | |
| 664 | - // var g_path = "../../../../images/share/s_gou.png"; | |
| 665 | - // context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 666 | - // context.setFillStyle("red") | |
| 667 | - // context.setFontSize(18 * unit) | |
| 668 | - // context.fillText("正品保证", 84 * unit, 690 * unit); | |
| 669 | - | |
| 670 | - // context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 671 | - // context.setFillStyle("red") | |
| 672 | - // context.setFontSize(18 * unit) | |
| 673 | - // context.fillText("纯实体店", 246 * unit, 690 * unit); | |
| 674 | - | |
| 675 | - // context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 676 | - // context.setFillStyle("red") | |
| 677 | - // context.setFontSize(18 * unit) | |
| 678 | - // context.fillText("官方验证", 420 * unit, 690 * unit); | |
| 679 | - // } | |
| 680 | - | |
| 681 | - | |
| 682 | - // //---画线--- | |
| 683 | - // context.setLineWidth(1 * unit) | |
| 684 | - // context.moveTo(32 * unit, 710 * unit) | |
| 685 | - // context.lineTo(520 * unit, 710 * unit) | |
| 686 | - // context.stroke(); | |
| 687 | - | |
| 688 | - // //---文字--- | |
| 689 | - // context.setFillStyle("black") | |
| 690 | - // context.setFontSize(22 * unit) | |
| 691 | - | |
| 692 | - // if (type == 0) { | |
| 693 | - // // 原来start ---> | |
| 694 | - // context.setFontSize(24 * unit) | |
| 695 | - // context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | |
| 696 | - | |
| 697 | - // context.setFontSize(22 * unit) | |
| 698 | - // context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 806 * unit); | |
| 699 | - // context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 846 * unit); | |
| 700 | - | |
| 701 | - // } else { | |
| 702 | - // context.setFontSize(24 * unit) | |
| 703 | - // context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | |
| 704 | - // context.setFontSize(22 * unit) | |
| 705 | - // context.fillText("长按识别二维码", 40 * unit, 806 * unit); | |
| 706 | - // context.fillText("立即开始兑换", 40 * unit, 846 * unit); | |
| 707 | - | |
| 708 | - // } | |
| 709 | - | |
| 710 | - // //---二维吗图--- | |
| 711 | - // //-- 自定义海报 -- | |
| 712 | - // if (th.data.poster) { | |
| 713 | - // var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 714 | - // var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 715 | - // context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | |
| 716 | - // } else { | |
| 717 | - // //---二维吗图--- | |
| 718 | - // context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit); | |
| 719 | - // }; | |
| 720 | - | |
| 721 | - // break; | |
| 722 | - // case 1: //秒杀商品的展示 | |
| 723 | - // //---画线--- | |
| 724 | - // context.setLineWidth(1 * unit) | |
| 725 | - // context.moveTo(32 * unit, 670 * unit) | |
| 726 | - // context.lineTo(520 * unit, 670 * unit) | |
| 727 | - // context.stroke(); | |
| 728 | - | |
| 729 | - // //画秒杀的图片 | |
| 730 | - // var miaos_path = '../../../../images/share/miao_share.png'; | |
| 731 | - // context.drawImage(miaos_path, 43 * unit, 700 * unit, 222 * unit, 40 * unit); | |
| 732 | - | |
| 733 | - // context.setFillStyle("black") | |
| 734 | - // context.setFontSize(24 * unit) | |
| 735 | - // context.fillText(th.data.sto_sele_name_1, 40 * unit, 786 * unit); | |
| 736 | - // //---文字--- | |
| 737 | - // context.setFontSize(22 * unit) | |
| 738 | - // context.setFillStyle("black") | |
| 739 | - // context.fillText("特惠好物,限时秒杀", 40 * unit, 826 * unit); | |
| 740 | - // context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 866 * unit); | |
| 741 | - | |
| 742 | - | |
| 743 | - // //---二维吗图--- | |
| 744 | - // //-- 自定义海报 -- | |
| 745 | - // if (th.data.poster) { | |
| 746 | - // var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 747 | - // var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 748 | - // context.drawImage(vpath, erm_x * unit, erm_y * unit, 135 * unit, 135 * unit); | |
| 749 | - // } else { | |
| 750 | - // //---二维吗图--- | |
| 751 | - // context.drawImage(vpath, 390 * unit, 726 * unit, 135 * unit, 135 * unit); | |
| 752 | - // } | |
| 753 | - // break; | |
| 754 | - | |
| 755 | - // case 2: //会员团和商家团的展示 | |
| 756 | - // //---画线--- | |
| 757 | - // context.setLineWidth(1 * unit) | |
| 758 | - // context.moveTo(32 * unit, 670 * unit) | |
| 759 | - // context.lineTo(520 * unit, 670 * unit) | |
| 760 | - // context.stroke(); | |
| 761 | - // //---文字--- | |
| 762 | - // context.setFillStyle("black") | |
| 763 | - // context.setFontSize(24 * unit) | |
| 764 | - // context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | |
| 765 | - | |
| 766 | - // //绘制成团图片 | |
| 767 | - // var ct_img = "../../../../images/share/ct_num.png"; | |
| 768 | - // context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit); | |
| 769 | - // var ct_num = th.data.prom_act.ct_num; | |
| 770 | - // context.setFontSize(14 * unit) | |
| 771 | - // // context.font = 'normal'; | |
| 772 | - // context.setFillStyle("red") | |
| 773 | - // if (ct_num < 10) { | |
| 774 | - // context.fillText(ct_num + "人拼团", 92 * unit, 760 * unit); | |
| 775 | - // } else { | |
| 776 | - // context.fillText(ct_num + "人拼团", 86 * unit, 760 * unit); | |
| 777 | - // } | |
| 778 | - // context.setFontSize(22 * unit) | |
| 779 | - // context.fillText("已拼" + th.data.prom_act.buy_num + "份", 166 * unit, 763 * unit); | |
| 780 | - | |
| 781 | - // context.setFillStyle("gray") | |
| 782 | - // context.fillText("快来和我一起拼团吧!", 40 * unit, 806 * unit); | |
| 783 | - // context.setFillStyle("black") | |
| 784 | - // // context.font = 'normal bold 18px sans-serif'; | |
| 785 | - // context.setFontSize(21.3 * unit) | |
| 786 | - // context.fillText("长按识别二维码,立即参团", 40 * unit, 836 * unit); | |
| 787 | - | |
| 788 | - | |
| 789 | - // //---二维吗图--- | |
| 790 | - // //-- 自定义海报 -- | |
| 791 | - // if (th.data.poster) { | |
| 792 | - // var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 793 | - // var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 794 | - // context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | |
| 795 | - // } else { | |
| 796 | - // //---二维吗图--- | |
| 797 | - // context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit); | |
| 798 | - // } | |
| 799 | - // break | |
| 800 | - // case 3: //阶梯团的展示 | |
| 801 | - // //---画线--- | |
| 802 | - // context.setLineWidth(1 * unit) | |
| 803 | - // context.moveTo(32 * unit, 670 * unit) | |
| 804 | - // context.lineTo(520 * unit, 670 * unit) | |
| 805 | - // context.stroke(); | |
| 806 | - // //---文字--- | |
| 807 | - // context.setFillStyle("black") | |
| 808 | - // context.setFontSize(24 * unit) | |
| 809 | - // context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | |
| 810 | - | |
| 811 | - // //---绘制中间阶梯的价格--- | |
| 812 | - // var list = th.data.prom_act.ct_rylist; | |
| 813 | - // for (var i = 0; i < list.length; i++) { | |
| 814 | - // var item = list[i]; | |
| 815 | - // var wi = i * 90 * unit; | |
| 816 | - // // context.font = 'normal'; | |
| 817 | - // context.setFontSize(16 * unit) | |
| 818 | - // context.setFillStyle("red") | |
| 819 | - // context.fillText("¥", 40 * unit + wi, 756 * unit); | |
| 820 | - // context.setFontSize(22 * unit) | |
| 821 | - // var pri = parseFloat(item.price).toFixed(2); | |
| 822 | - // context.fillText(pri, 56 * unit + wi, 756 * unit); | |
| 823 | - // context.setFillStyle("gray") | |
| 824 | - // context.fillText("满" + item.rynum + "人", 40 * unit + wi, 786 * unit); | |
| 825 | - // } | |
| 826 | - // //----------------下面部分---------------- | |
| 827 | - // // context.setFillStyle("gray") | |
| 828 | - // // context.fillText("快来和我一起拼团吧!", 40 * unit, 830 * unit); | |
| 829 | - // // context.setFillStyle("black") | |
| 830 | - // // context.font = 'normal bold 18px sans-serif'; | |
| 831 | - // // context.setFontSize(22 * unit) | |
| 832 | - // // context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit); | |
| 833 | - // //context.setFillStyle("gray") | |
| 834 | - // context.setFillStyle("black") | |
| 835 | - // context.fillText("快来和我一起拼团吧!", 40 * unit, 820 * unit); | |
| 836 | - // //context.font = 'normal bold 18px sans-serif'; | |
| 837 | - // context.setFontSize(21 * unit) | |
| 838 | - // context.fillText("长按识别二维码,立即参团", 40 * unit, 850 * unit); | |
| 839 | - | |
| 840 | - | |
| 841 | - // //-- 自定义海报 -- | |
| 842 | - // if (th.data.poster) { | |
| 843 | - // var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 844 | - // var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 845 | - // context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | |
| 846 | - // } else { | |
| 847 | - // //---二维吗图--- | |
| 848 | - // context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit); | |
| 849 | - // } | |
| 850 | - // break; | |
| 660 | + //-------大图后面就不一样了----------- | |
| 661 | + switch (type) { | |
| 662 | + case 9: | |
| 851 | 663 | |
| 852 | - | |
| 853 | - // case 9: | |
| 854 | - | |
| 855 | - // //---画线--- | |
| 856 | - // context.setLineWidth(1 * unit) | |
| 857 | - // context.moveTo(32 * unit, 680 * unit) | |
| 858 | - // context.lineTo(520 * unit, 680 * unit) | |
| 859 | - // context.stroke(); | |
| 664 | + //---画线--- | |
| 665 | + context.setLineWidth(1 * unit) | |
| 666 | + context.moveTo(32 * unit, 680 * unit) | |
| 667 | + context.lineTo(520 * unit, 680 * unit) | |
| 668 | + context.stroke(); | |
| 860 | 669 | |
| 861 | - // //---文字--- | |
| 862 | - // context.setFillStyle("black") | |
| 863 | - // context.setFontSize(24 * unit) | |
| 864 | - // // context.font = 'normal bold 18px'; | |
| 865 | - // // context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | |
| 670 | + //---文字--- | |
| 671 | + context.setFillStyle("black") | |
| 672 | + context.setFontSize(24 * unit) | |
| 673 | + // context.font = 'normal bold 18px'; | |
| 674 | + // context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | |
| 866 | 675 | |
| 867 | - // //还差N人,即可成团 | |
| 868 | - // let group_num = th.data.luckyGoInfo.group_num; | |
| 869 | - // let num_joined = th.data.luckyGoInfo.num; | |
| 870 | - // let delta1 = group_num - num_joined; | |
| 871 | - // let width_delta1 = ut.measureText(delta1, 15); | |
| 872 | - // context.setFillStyle("black"); | |
| 873 | - // context.setFontSize(21.3 * unit); | |
| 874 | - // context.fillText(group_num + "人团,还差", 40 * unit, 772 * unit); | |
| 875 | - // context.setFillStyle("#FF6768"); | |
| 876 | - // context.setFontSize(21.3 * unit); | |
| 877 | - // context.fillText(delta1, 160 * unit, 772 * unit); | |
| 878 | - // context.setFillStyle("black"); | |
| 879 | - // context.setFontSize(21.3 * unit); | |
| 880 | - // context.fillText("人,即可成团", (170 + width_delta1) * unit, 772 * unit); | |
| 676 | + //还差N人,即可成团 | |
| 677 | + let group_num = th.data.luckyGoInfo.group_num; | |
| 678 | + let num_joined = th.data.luckyGoInfo.num; | |
| 679 | + let delta1 = group_num - num_joined; | |
| 680 | + let width_delta1 = ut.measureText(delta1, 15); | |
| 681 | + context.setFillStyle("black"); | |
| 682 | + context.setFontSize(21.3 * unit); | |
| 683 | + context.fillText(group_num + "人团,还差", 40 * unit, 772 * unit); | |
| 684 | + context.setFillStyle("#FF6768"); | |
| 685 | + context.setFontSize(21.3 * unit); | |
| 686 | + context.fillText(delta1, 160 * unit, 772 * unit); | |
| 687 | + context.setFillStyle("black"); | |
| 688 | + context.setFontSize(21.3 * unit); | |
| 689 | + context.fillText("人,即可成团", (170 + width_delta1) * unit, 772 * unit); | |
| 881 | 690 | |
| 882 | - // // N人得商品,N人全额退款 | |
| 883 | - // let group_win = th.data.luckyGoInfo.group_win; | |
| 884 | - // let delta2 = group_num - group_win; | |
| 885 | - // let width_delta2 = ut.measureText(delta2, 16); | |
| 886 | - // let width_groupNum = ut.measureText(group_num, 15); | |
| 887 | - // let width_groupWin = ut.measureText(group_win, 15); | |
| 888 | - // context.setFillStyle("#FF6768"); | |
| 889 | - // context.setFontSize(21.3 * unit); | |
| 890 | - // context.fillText(group_win, 40 * unit, 806 * unit); | |
| 891 | - // context.setFillStyle("black"); | |
| 892 | - // context.setFontSize(21.3 * unit); | |
| 893 | - // context.fillText("人得商品,", (54 + width_groupWin) * unit, 806 * unit); | |
| 894 | - // context.setFillStyle("#FF6768"); | |
| 895 | - // context.setFontSize(21.3 * unit); | |
| 896 | - // context.fillText(delta2, 160 * unit, 806 * unit); | |
| 897 | - // context.setFillStyle("black"); | |
| 898 | - // context.setFontSize(21.3 * unit); | |
| 899 | - // context.fillText("人全额退款", (170 + width_delta2) * unit, 806 * unit); | |
| 691 | + // N人得商品,N人全额退款 | |
| 692 | + let group_win = th.data.luckyGoInfo.group_win; | |
| 693 | + let delta2 = group_num - group_win; | |
| 694 | + let width_delta2 = ut.measureText(delta2, 16); | |
| 695 | + let width_groupNum = ut.measureText(group_num, 15); | |
| 696 | + let width_groupWin = ut.measureText(group_win, 15); | |
| 697 | + context.setFillStyle("#FF6768"); | |
| 698 | + context.setFontSize(21.3 * unit); | |
| 699 | + context.fillText(group_win, 40 * unit, 806 * unit); | |
| 700 | + context.setFillStyle("black"); | |
| 701 | + context.setFontSize(21.3 * unit); | |
| 702 | + context.fillText("人得商品,", (54 + width_groupWin) * unit, 806 * unit); | |
| 703 | + context.setFillStyle("#FF6768"); | |
| 704 | + context.setFontSize(21.3 * unit); | |
| 705 | + context.fillText(delta2, 160 * unit, 806 * unit); | |
| 706 | + context.setFillStyle("black"); | |
| 707 | + context.setFontSize(21.3 * unit); | |
| 708 | + context.fillText("人全额退款", (170 + width_delta2) * unit, 806 * unit); | |
| 900 | 709 | |
| 901 | - // // 并得帮团惊喜礼品 | |
| 902 | - // context.setFillStyle("black") | |
| 903 | - // context.setFontSize(21.3 * unit) | |
| 904 | - // context.fillText("并得帮团", 40 * unit, 840 * unit); | |
| 905 | - // context.setFillStyle("#FF6768") | |
| 906 | - // context.setFontSize(21.3 * unit) | |
| 907 | - // context.fillText("惊喜礼品", 130 * unit, 840 * unit); | |
| 908 | - // context.setFillStyle("black") | |
| 909 | - // context.setFontSize(21.3 * unit) | |
| 910 | - // context.fillText("!", 220 * unit, 840 * unit); | |
| 710 | + // 并得帮团惊喜礼品 | |
| 711 | + context.setFillStyle("black") | |
| 712 | + context.setFontSize(21.3 * unit) | |
| 713 | + context.fillText("并得帮团", 40 * unit, 840 * unit); | |
| 714 | + context.setFillStyle("#FF6768") | |
| 715 | + context.setFontSize(21.3 * unit) | |
| 716 | + context.fillText("惊喜礼品", 130 * unit, 840 * unit); | |
| 717 | + context.setFillStyle("black") | |
| 718 | + context.setFontSize(21.3 * unit) | |
| 719 | + context.fillText("!", 220 * unit, 840 * unit); | |
| 911 | 720 | |
| 912 | 721 | |
| 913 | - // //---二维吗图--- | |
| 914 | - // //-- 自定义海报 -- | |
| 915 | - // if (th.data.poster) { | |
| 916 | - // var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 917 | - // var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 918 | - // context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | |
| 919 | - // } else { | |
| 920 | - // //---二维吗图--- | |
| 921 | - // context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit); | |
| 922 | - // } | |
| 722 | + //---二维吗图--- | |
| 723 | + //-- 自定义海报 -- | |
| 724 | + if (th.data.poster) { | |
| 725 | + var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 726 | + var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 727 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | |
| 728 | + } else { | |
| 729 | + //---二维吗图--- | |
| 730 | + context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit); | |
| 731 | + } | |
| 923 | 732 | |
| 924 | - // break; | |
| 733 | + break; | |
| 925 | 734 | |
| 926 | 735 | |
| 927 | - // } | |
| 736 | + } | |
| 928 | 737 | |
| 929 | 738 | |
| 930 | - // //--- 如果是自定义海报的时候 --- | |
| 931 | - // if(type != 0) { | |
| 739 | + //--- 如果是自定义海报的时候 --- | |
| 740 | + if(type != 0) { | |
| 932 | 741 | |
| 933 | - // if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
| 742 | + if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
| 934 | 743 | |
| 935 | - // //如果显示会员信息的话 | |
| 936 | - // if (parseInt(th.data.poster.show_headpic)) { | |
| 937 | - // //获取坐标 | |
| 938 | - // var x = parseFloat(th.data.poster.head_x) * 2; | |
| 939 | - // var y = parseFloat(th.data.poster.head_y) * 2; | |
| 940 | - // //---绘制圆形要放在最后---- | |
| 941 | - // context.save(); | |
| 942 | - // context.beginPath(); | |
| 943 | - // var h_x = x * unit; | |
| 944 | - // var h_y = y * unit; | |
| 945 | - // var h_r = 40 * unit; | |
| 946 | - // var cx = h_x + h_r; | |
| 947 | - // var cy = h_y + h_r; | |
| 948 | - // context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
| 949 | - // context.closePath(); | |
| 950 | - // context.fill(); | |
| 951 | - // context.clip(); | |
| 952 | - // context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
| 953 | - // context.restore(); | |
| 954 | - // } | |
| 744 | + //如果显示会员信息的话 | |
| 745 | + if (parseInt(th.data.poster.show_headpic)) { | |
| 746 | + //获取坐标 | |
| 747 | + var x = parseFloat(th.data.poster.head_x) * 2; | |
| 748 | + var y = parseFloat(th.data.poster.head_y) * 2; | |
| 749 | + //---绘制圆形要放在最后---- | |
| 750 | + context.save(); | |
| 751 | + context.beginPath(); | |
| 752 | + var h_x = x * unit; | |
| 753 | + var h_y = y * unit; | |
| 754 | + var h_r = 40 * unit; | |
| 755 | + var cx = h_x + h_r; | |
| 756 | + var cy = h_y + h_r; | |
| 757 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
| 758 | + context.closePath(); | |
| 759 | + context.fill(); | |
| 760 | + context.clip(); | |
| 761 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
| 762 | + context.restore(); | |
| 763 | + } | |
| 955 | 764 | |
| 956 | - // } else { | |
| 957 | - // //---绘制圆形要放在最后---- | |
| 958 | - // // context.save(); | |
| 959 | - // // context.beginPath(); | |
| 960 | - // // var h_x = 60 * unit; | |
| 961 | - // // var h_y = 24 * unit; | |
| 962 | - // // var h_r = 40 * unit; | |
| 963 | - // // var cx = h_x + h_r; | |
| 964 | - // // var cy = h_y + h_r; | |
| 965 | - // // context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
| 966 | - // // context.closePath(); | |
| 967 | - // // context.fill(); | |
| 968 | - // // context.clip(); | |
| 969 | - // // context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
| 970 | - // // context.restore(); | |
| 971 | - // } | |
| 765 | + } else { | |
| 766 | + //---绘制圆形要放在最后---- | |
| 767 | + context.save(); | |
| 768 | + context.beginPath(); | |
| 769 | + var h_x = 60 * unit; | |
| 770 | + var h_y = 24 * unit; | |
| 771 | + var h_r = 40 * unit; | |
| 772 | + var cx = h_x + h_r; | |
| 773 | + var cy = h_y + h_r; | |
| 774 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
| 775 | + context.closePath(); | |
| 776 | + context.fill(); | |
| 777 | + context.clip(); | |
| 778 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
| 779 | + context.restore(); | |
| 780 | + } | |
| 972 | 781 | |
| 973 | - // }; | |
| 782 | + }; | |
| 974 | 783 | |
| 975 | 784 | |
| 976 | 785 | |
| ... | ... | @@ -1001,10 +810,7 @@ Page({ |
| 1001 | 810 | return false; |
| 1002 | 811 | } |
| 1003 | 812 | |
| 1004 | - // wx.previewImage({ | |
| 1005 | - // //将图片预览出来 | |
| 1006 | - // urls: [that.data.shareImgPath] | |
| 1007 | - // }); | |
| 813 | + | |
| 1008 | 814 | that.setData({ |
| 1009 | 815 | showPoster: true, |
| 1010 | 816 | }); |
| ... | ... | @@ -1020,7 +826,7 @@ Page({ |
| 1020 | 826 | }); |
| 1021 | 827 | }, |
| 1022 | 828 | fail: function (res) { |
| 1023 | - console.log(res); | |
| 829 | + // console.log(res); | |
| 1024 | 830 | wx.hideLoading(); |
| 1025 | 831 | |
| 1026 | 832 | } |
| ... | ... | @@ -1069,9 +875,11 @@ Page({ |
| 1069 | 875 | }, |
| 1070 | 876 | |
| 1071 | 877 | go_goodsinfo:function (e) { |
| 1072 | - var gid=e.currentTarget.dataset.gid; | |
| 1073 | - var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gid; | |
| 1074 | - wx.navigateTo({ url: url, }) //跳到非tabbar页 | |
| 878 | + var gid=e.currentTarget.dataset.gid; | |
| 879 | + var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gid; | |
| 880 | + wx.navigateTo({ | |
| 881 | + url: url, | |
| 882 | + })//跳到非tabbar页 | |
| 1075 | 883 | }, |
| 1076 | 884 | |
| 1077 | 885 | gohome:function () { |
| ... | ... | @@ -1080,32 +888,32 @@ Page({ |
| 1080 | 888 | |
| 1081 | 889 | //--获取头像的本地缓存,回调写法-- |
| 1082 | 890 | get_head_temp:function (tt,func) { |
| 1083 | - var ee=this; | |
| 1084 | - if(ee.data.share_head){ | |
| 1085 | - tt(func); | |
| 1086 | - return false; | |
| 1087 | - } | |
| 1088 | - //---获取分享图片的本地地址,头像和商品图片---- | |
| 1089 | - var path2 = getApp().globalData.userInfo.head_pic; | |
| 1090 | - if(path2==""){ | |
| 1091 | - ee.data.share_head ="../../../../images/share/hui_hear_pic.png"; | |
| 1092 | - tt(func); | |
| 1093 | - }else { | |
| 1094 | - path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn"); | |
| 1095 | - path2=path2.replace("https://thirdwx.qlogo.cn","https://wx.qlogo.cn"); | |
| 1096 | - wx.getImageInfo({ | |
| 1097 | - src: path2, | |
| 1098 | - success: function (res) { | |
| 1099 | - //res.path是网络图片的本地地址 | |
| 1100 | - ee.data.share_head = res.path; | |
| 1101 | - tt(func);; | |
| 1102 | - }, | |
| 1103 | - fail: function (res) { | |
| 1104 | - ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 | |
| 1105 | - tt(func); | |
| 1106 | - } | |
| 1107 | - }); | |
| 1108 | - } | |
| 891 | + var ee=this; | |
| 892 | + if(ee.data.share_head) { | |
| 893 | + tt(func); | |
| 894 | + return false; | |
| 895 | + } | |
| 896 | + //---获取分享图片的本地地址,头像和商品图片---- | |
| 897 | + var path2 = getApp().globalData.userInfo.head_pic; | |
| 898 | + if(path2=="") { | |
| 899 | + ee.data.share_head ="../../../../images/share/hui_hear_pic.png"; | |
| 900 | + tt(func); | |
| 901 | + } else { | |
| 902 | + path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn"); | |
| 903 | + path2=path2.replace("https://thirdwx.qlogo.cn","https://wx.qlogo.cn"); | |
| 904 | + wx.getImageInfo({ | |
| 905 | + src: path2, | |
| 906 | + success: function (res) { | |
| 907 | + //res.path是网络图片的本地地址 | |
| 908 | + ee.data.share_head = res.path; | |
| 909 | + tt(func);; | |
| 910 | + }, | |
| 911 | + fail: function (res) { | |
| 912 | + ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 | |
| 913 | + tt(func); | |
| 914 | + } | |
| 915 | + }); | |
| 916 | + }; | |
| 1109 | 917 | }, |
| 1110 | 918 | |
| 1111 | 919 | //--获取商品图片的本地缓存,回调写法-- |
| ... | ... | @@ -1180,13 +988,13 @@ Page({ |
| 1180 | 988 | |
| 1181 | 989 | send() { |
| 1182 | 990 | this.setData({ |
| 1183 | - share_hidden:false, | |
| 991 | + share_hidden: false, | |
| 1184 | 992 | }); |
| 1185 | 993 | }, |
| 1186 | 994 | |
| 1187 | 995 | cancel() { |
| 1188 | 996 | this.setData({ |
| 1189 | - share_hidden:false, | |
| 997 | + share_hidden: false, | |
| 1190 | 998 | }); |
| 1191 | 999 | }, |
| 1192 | 1000 | |
| ... | ... | @@ -1313,6 +1121,7 @@ Page({ |
| 1313 | 1121 | }); |
| 1314 | 1122 | }, |
| 1315 | 1123 | |
| 1124 | + // 获取幸运购参团情况 | |
| 1316 | 1125 | async get_team_info () { |
| 1317 | 1126 | var th = this; |
| 1318 | 1127 | // 幸运购成团信息 |
| ... | ... | @@ -1326,7 +1135,7 @@ Page({ |
| 1326 | 1135 | }).then(res => { |
| 1327 | 1136 | var luckyGoInfo = res.data.data.pageData[0]; |
| 1328 | 1137 | var team_id = luckyGoInfo.team_id; |
| 1329 | - console.log('成团信息====>', luckyGoInfo); | |
| 1138 | + | |
| 1330 | 1139 | th.setData({ |
| 1331 | 1140 | luckyGoInfo, |
| 1332 | 1141 | team_id, |
| ... | ... | @@ -1341,23 +1150,14 @@ Page({ |
| 1341 | 1150 | data: team_id, |
| 1342 | 1151 | }); |
| 1343 | 1152 | } else { |
| 1344 | - // if(th.data.param.from = 'list') { | |
| 1345 | - // th.setData({ | |
| 1346 | - // team_id: 0, | |
| 1347 | - // }); | |
| 1348 | - // } else { | |
| 1349 | - let team_id = wx.getStorageSync('team_id'); | |
| 1350 | - th.setData({ | |
| 1351 | - team_id: team_id, | |
| 1352 | - isSuccess: true, | |
| 1353 | - }); | |
| 1354 | - // }; | |
| 1355 | - | |
| 1153 | + let team_id = wx.getStorageSync('team_id'); | |
| 1154 | + th.setData({ | |
| 1155 | + team_id: team_id, | |
| 1156 | + isSuccess: true, | |
| 1157 | + }); | |
| 1356 | 1158 | }; |
| 1357 | - | |
| 1358 | - | |
| 1359 | - }) | |
| 1360 | - | |
| 1159 | + | |
| 1160 | + }); | |
| 1361 | 1161 | |
| 1362 | 1162 | // 幸运购成团成员 |
| 1363 | 1163 | await getApp().request.promiseGet("/api/weshop/prom/luckyOrder/page", { |
| ... | ... | @@ -1366,11 +1166,11 @@ Page({ |
| 1366 | 1166 | team_id: this.data.team_id, |
| 1367 | 1167 | } |
| 1368 | 1168 | }).then(res => { |
| 1369 | - console.log('成团成员====>', res.data.data.pageData); | |
| 1370 | 1169 | th.setData({ |
| 1371 | 1170 | luckyGoMembers: res.data.data.pageData, |
| 1372 | 1171 | }); |
| 1373 | - }) | |
| 1172 | + }); | |
| 1173 | + | |
| 1374 | 1174 | }, |
| 1375 | 1175 | |
| 1376 | 1176 | ... | ... |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml
| ... | ... | @@ -245,11 +245,11 @@ |
| 245 | 245 | <view class='clear'></view> |
| 246 | 246 | |
| 247 | 247 | <!----//大家都在团----> |
| 248 | - <view class='goodslist'> | |
| 249 | - <view class='goodslisttop'> | |
| 248 | + <!-- <view class='goodslist'> | |
| 249 | + <view class='goodslisttop'> --> | |
| 250 | 250 | <!-- <view class='goodslistspan fs24'>大家都在团</view> --> |
| 251 | 251 | <!-- 推荐商品 --> |
| 252 | - <view class="flex-center rel xc-linellae-frame"> | |
| 252 | + <!-- <view class="flex-center rel xc-linellae-frame"> | |
| 253 | 253 | <view class="xc-linellae"></view> |
| 254 | 254 | <view class="abs flex-center xc-recommend-frame "> |
| 255 | 255 | <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png"></image> |
| ... | ... | @@ -282,14 +282,15 @@ |
| 282 | 282 | </view> |
| 283 | 283 | </view> |
| 284 | 284 | </view> |
| 285 | - </view> | |
| 285 | + </view> --> | |
| 286 | 286 | </view> |
| 287 | 287 | |
| 288 | 288 | |
| 289 | 289 | |
| 290 | 290 | |
| 291 | 291 | <!--二维码显示页面--> |
| 292 | -<canvas canvas-id='share' style='width:750rpx;height:1217rpx;' wx:if='{{canvasHidden}}'></canvas> | |
| 292 | +<canvas class="mycanvas" canvas-id='share' style='width:750rpx;height:1217rpx;'></canvas> | |
| 293 | +<!-- <canvas canvas-id='share' style='width:750rpx;height:1217rpx;' wx:if='{{canvasHidden}}'></canvas> --> | |
| 293 | 294 | <!--拼团玩法弹出框--> |
| 294 | 295 | <!----弹起的----> |
| 295 | 296 | <block wx:if="{{pd_xx}}"> | ... | ... |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxss
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -4569,14 +4569,14 @@ Page({ |
| 4569 | 4569 | context.fillText(app.globalData.userInfo.nickname, 152 * unit, 60 * unit); |
| 4570 | 4570 | var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; |
| 4571 | 4571 | //强烈推荐 改许程 |
| 4572 | - var tj_path = "../../../../images/share/q_tj.png"; | |
| 4573 | - let txt_gn = th.data.luckGoInfo.group_num + '人团'; | |
| 4574 | - let width_gn = ut.measureText(txt_gn, 15); | |
| 4575 | - context.drawImage(tj_path, 152 * unit + width, 54 * unit, (width_gn + 20) * unit, 30 * unit); | |
| 4576 | - context.setFontSize(16 * unit); | |
| 4577 | - context.setLineJoin('round'); //交点设置成圆角 | |
| 4578 | - context.setFillStyle("white"); | |
| 4579 | - context.fillText(txt_gn, 149 * unit + width + 15 * unit, 75 * unit); | |
| 4572 | + // var tj_path = "../../../../images/share/q_tj.png"; | |
| 4573 | + // let txt_gn = th.data.luckGoInfo.group_num + '人团'; | |
| 4574 | + // let width_gn = ut.measureText(txt_gn, 15); | |
| 4575 | + // context.drawImage(tj_path, 152 * unit + width, 54 * unit, (width_gn + 20) * unit, 30 * unit); | |
| 4576 | + // context.setFontSize(16 * unit); | |
| 4577 | + // context.setLineJoin('round'); //交点设置成圆角 | |
| 4578 | + // context.setFillStyle("white"); | |
| 4579 | + // context.fillText(txt_gn, 149 * unit + width + 15 * unit, 75 * unit); | |
| 4580 | 4580 | // 发出幸运购活动邀请 |
| 4581 | 4581 | context.setFillStyle("#7f7f7f") |
| 4582 | 4582 | context.setFontSize(21.3 * unit) |
| ... | ... | @@ -4588,7 +4588,7 @@ Page({ |
| 4588 | 4588 | |
| 4589 | 4589 | |
| 4590 | 4590 | |
| 4591 | - var share_title = th.data.data.goods_name; | |
| 4591 | + var share_title = th.data.data.goods_name; | |
| 4592 | 4592 | if (th.data.prom_type == 1 || th.data.prom_type == 6 || th.data.prom_type == 4) { |
| 4593 | 4593 | share_title = th.data.prom_act.share_title; |
| 4594 | 4594 | if (!share_title) share_title = th.data.prom_act.title; |
| ... | ... | @@ -4601,7 +4601,7 @@ Page({ |
| 4601 | 4601 | context.setFillStyle("black"); |
| 4602 | 4602 | context.setFontSize(21.3 * unit) |
| 4603 | 4603 | th.draw_Text(context, share_title, |
| 4604 | - 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit); | |
| 4604 | + 38 * unit, 180 * unit, 220 * unit, 220 * unit, unit); | |
| 4605 | 4605 | |
| 4606 | 4606 | //------产品的价格------- |
| 4607 | 4607 | context.setFontSize(23 * unit) |
| ... | ... | @@ -4620,9 +4620,9 @@ Page({ |
| 4620 | 4620 | var tj_path = "../../../../images/share/q_tj.png"; |
| 4621 | 4621 | context.drawImage(tj_path, 315 * unit, 158 * unit, 85 * unit, 30 * unit); |
| 4622 | 4622 | context.setLineJoin('round'); //交点设置成圆角 |
| 4623 | - context.setFontSize(22 * unit); | |
| 4624 | - context.setFillStyle("blue"); | |
| 4625 | - context.fillText('参团价', 320 * unit, 168 * unit); | |
| 4623 | + context.setFontSize(18 * unit); | |
| 4624 | + context.setFillStyle("white"); | |
| 4625 | + context.fillText('参团价', 330 * unit, 179 * unit); | |
| 4626 | 4626 | |
| 4627 | 4627 | //---市场价划掉--- |
| 4628 | 4628 | context.setFillStyle("gray") |
| ... | ... | @@ -4888,6 +4888,7 @@ Page({ |
| 4888 | 4888 | //---文字--- |
| 4889 | 4889 | context.setFillStyle("black") |
| 4890 | 4890 | context.setFontSize(24 * unit) |
| 4891 | + context.font = 'normal bold 18px'; | |
| 4891 | 4892 | context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); |
| 4892 | 4893 | |
| 4893 | 4894 | //还差N人,即可成团 |
| ... | ... | @@ -4897,13 +4898,13 @@ Page({ |
| 4897 | 4898 | let width_delta1 = ut.measureText(delta1, 15); |
| 4898 | 4899 | context.setFillStyle("black"); |
| 4899 | 4900 | context.setFontSize(21.3 * unit); |
| 4900 | - context.fillText("还差", 40 * unit, 772 * unit); | |
| 4901 | + context.fillText(group_num + "人团,还差", 40 * unit, 772 * unit); | |
| 4901 | 4902 | context.setFillStyle("#FF6768"); |
| 4902 | 4903 | context.setFontSize(21.3 * unit); |
| 4903 | - context.fillText(delta1, 86 * unit, 772 * unit); | |
| 4904 | + context.fillText(delta1, 160 * unit, 772 * unit); | |
| 4904 | 4905 | context.setFillStyle("black"); |
| 4905 | 4906 | context.setFontSize(21.3 * unit); |
| 4906 | - context.fillText("人,即可成团", (95 + width_delta1) * unit, 772 * unit); | |
| 4907 | + context.fillText("人,即可成团", (170 + width_delta1) * unit, 772 * unit); | |
| 4907 | 4908 | |
| 4908 | 4909 | // N人得商品,N人全额退款 |
| 4909 | 4910 | let group_win = th.data.luckGoInfo.group_win; | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
| ... | ... | @@ -889,7 +889,7 @@ |
| 889 | 889 | </view> |
| 890 | 890 | <!-- data-ind="2" --> |
| 891 | 891 | <!-- openSpecModel_pt --> |
| 892 | - <view class="btn-red f1 flex ai-center jc-center" bindtap="openSpecModel_pt" data-openSpecModal_ind="{{openSpecModal_ind}}" data-action="buy" data-ind="0">立即参团2</view> | |
| 892 | + <view class="btn-red f1 flex ai-center jc-center" bindtap="openSpecModel_pt" data-openSpecModal_ind="{{openSpecModal_ind}}" data-action="buy" data-ind="0">立即参团</view> | |
| 893 | 893 | <!-- <view class="btn-red f1 flex ai-center jc-center" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" data-action="buy">立即参团</view> --> |
| 894 | 894 | </view> |
| 895 | 895 | <!-- <view bindtap="openSpecModel" data-ind="1" class="btn-buy flex fdc jc-center"> | ... | ... |
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js
| 1 | -var t = require("../../../../utils/util.js"), | |
| 2 | - ut = t, | |
| 3 | - e = require("../../../../utils/common.js"), | |
| 4 | - a = require("../../../../utils/wxParse/wxParse.js"), | |
| 5 | - s = getApp(), | |
| 6 | - i = s.request, | |
| 7 | - rq = i, | |
| 8 | - oo = s.globalData, | |
| 9 | - o = s.globalData.setting, | |
| 10 | - os = o; | |
| 11 | -var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
| 12 | -var e = getApp(),oo = e.globalData.setting; | |
| 13 | - | |
| 14 | - | |
| 15 | 1 | const app = getApp(); |
| 16 | 2 | let self = null; |
| 17 | 3 | |
| 18 | 4 | Page({ |
| 19 | 5 | data: { |
| 20 | - // wu:false, | |
| 21 | - // imageurl: os.imghost,//有礼派图片地址, | |
| 22 | - // iurl: os.imghost,//有礼派图片地址, | |
| 23 | - // pt_state:0, | |
| 24 | - // order : null,//订单数据 | |
| 25 | - // currentTab: 0, | |
| 26 | - // current:0, | |
| 27 | - // ordertx:[],//头像 | |
| 28 | - // baseUrl: "/api/weshop/order/page?1=1", | |
| 29 | - // resourceUrl: e.globalData.setting.resourceUrl, | |
| 30 | - // currentPage: 1, | |
| 31 | - // requestData: null, | |
| 32 | - // original_img:null, | |
| 33 | - // timer:null, | |
| 34 | - | |
| 35 | - | |
| 36 | - | |
| 37 | - | |
| 38 | 6 | tabArr: ['全部','参团中','已团中','未团中'], |
| 39 | 7 | currentTabIndex: 0, |
| 40 | 8 | |
| ... | ... | @@ -82,7 +50,6 @@ Page({ |
| 82 | 50 | isLogin: true, |
| 83 | 51 | }); |
| 84 | 52 | |
| 85 | - | |
| 86 | 53 | let data = { |
| 87 | 54 | store_id: app.globalData.setting.stoid, |
| 88 | 55 | user_id: this.data.userInfo.user_id, |
| ... | ... | @@ -146,11 +113,11 @@ Page({ |
| 146 | 113 | break; |
| 147 | 114 | }; |
| 148 | 115 | case 2: { |
| 149 | - currentData.team_status = 1; | |
| 116 | + currentData.team_status = 2; | |
| 150 | 117 | break; |
| 151 | 118 | }; |
| 152 | 119 | case 3: { |
| 153 | - currentData.team_status = 2; | |
| 120 | + currentData.team_status = 1; | |
| 154 | 121 | break; |
| 155 | 122 | }; |
| 156 | 123 | }; |
| ... | ... | @@ -239,27 +206,10 @@ Page({ |
| 239 | 206 | //查看奖励 |
| 240 | 207 | showReward: function(e) { |
| 241 | 208 | this.setData({ |
| 242 | - // showReward: true, | |
| 243 | 209 | currentItemIndex: e.target.dataset.index, |
| 244 | 210 | currentItemAid: e.target.dataset.aid, |
| 245 | 211 | }); |
| 246 | 212 | this.getPrizes(this.data.currentItemIndex); |
| 247 | - | |
| 248 | - // Promise.resolve(this.getPrizes(this.data.currentItemIndex)) | |
| 249 | - // .then((data)=> { | |
| 250 | - // // self.setData({ | |
| 251 | - // // prizesArr: data, | |
| 252 | - // // showReward: true, | |
| 253 | - // // }); | |
| 254 | - // console.dir(data); | |
| 255 | - // setTimeout(function() { | |
| 256 | - // self.setData({ | |
| 257 | - // prizesArr: data, | |
| 258 | - // showReward: true, | |
| 259 | - // },3000); | |
| 260 | - // }); | |
| 261 | - | |
| 262 | - // }); | |
| 263 | 213 | }, |
| 264 | 214 | |
| 265 | 215 | //关闭奖励 |
| ... | ... | @@ -349,18 +299,8 @@ Page({ |
| 349 | 299 | showReward: true, |
| 350 | 300 | }); |
| 351 | 301 | }); |
| 352 | - | |
| 353 | - | |
| 354 | - | |
| 302 | + | |
| 355 | 303 | }); |
| 356 | - | |
| 357 | - | |
| 358 | - | |
| 359 | - | |
| 360 | - | |
| 361 | - | |
| 362 | - | |
| 363 | - | |
| 364 | 304 | }, |
| 365 | 305 | |
| 366 | 306 | // 将type字符串分割成数组 |
| ... | ... | @@ -372,213 +312,8 @@ Page({ |
| 372 | 312 | index = parseInt(item); |
| 373 | 313 | newTypeArr.push(index); |
| 374 | 314 | }); |
| 375 | - // console.log('newTypeArr', newTypeArr); | |
| 376 | 315 | return newTypeArr; |
| 377 | 316 | }, |
| 378 | 317 | |
| 379 | - | |
| 380 | - | |
| 381 | - | |
| 382 | - | |
| 383 | - | |
| 384 | - | |
| 385 | - | |
| 386 | - | |
| 387 | - | |
| 388 | - | |
| 389 | - | |
| 390 | - | |
| 391 | - | |
| 392 | - | |
| 393 | - | |
| 394 | - | |
| 395 | - /** | |
| 396 | - * 点击tab切换 | |
| 397 | - */ | |
| 398 | - // swichNav: function (e) { | |
| 399 | - // this.data.requestData=[]; | |
| 400 | - // this.data.currentPage=1; | |
| 401 | - // var that = this; | |
| 402 | - | |
| 403 | - // if (that.data.order == null){ | |
| 404 | - // that.setData({ | |
| 405 | - // wu:true | |
| 406 | - // }) | |
| 407 | - // } | |
| 408 | - | |
| 409 | - // if (this.data.currentTab === e.target.dataset.current) { | |
| 410 | - // return false; | |
| 411 | - // } else { | |
| 412 | - // that.setData({ | |
| 413 | - // currentTab: e.target.dataset.current, | |
| 414 | - // }) | |
| 415 | - // that.init(e.target.dataset.current); | |
| 416 | - // } | |
| 417 | - // }, | |
| 418 | - | |
| 419 | - // async init(current) { | |
| 420 | - // var where="1=1"; | |
| 421 | - // var user_id = getApp().globalData.user_id; | |
| 422 | - // switch (current){ | |
| 423 | - // case "1": | |
| 424 | - // where+="&pt_status=1"; | |
| 425 | - // break; | |
| 426 | - // case "2": | |
| 427 | - // where += "&pt_ok=1"; | |
| 428 | - // break; | |
| 429 | - // case "3": | |
| 430 | - // where += "&pt_status=3"; | |
| 431 | - // break; | |
| 432 | - // } | |
| 433 | - | |
| 434 | - // var goods_id = 0,//商品ID, | |
| 435 | - // original_img = [],//商品图片 | |
| 436 | - // ee = this, | |
| 437 | - // ordertx=[],//头像 | |
| 438 | - // order = null,//订单数据 | |
| 439 | - // goods = null,//商品数据 | |
| 440 | - // users = null,//会员数据 | |
| 441 | - // order_goods=null;//订单商品表 | |
| 442 | - | |
| 443 | - // //获取订单表的信息根据活动user_id,pt_prom_id>0 AND pay_time>0 | |
| 444 | - // /*--- | |
| 445 | - // await getApp().request.promiseGet("/api/weshop/order/page?"+where, { | |
| 446 | - // data: { is_pt:1,store_id: os.stoid, user_id: user_id, pageSize: 6, page: this.data.currentPage,} | |
| 447 | - // }).then(res => { | |
| 448 | - // order = res.data.data.pageData; | |
| 449 | - // this.data.currentPage++; | |
| 450 | - // })--*/ | |
| 451 | - | |
| 452 | - // await getApp().request.promiseGet("/api/weshop/order/pageTuan?"+where, { | |
| 453 | - // data: { is_pt:1,store_id: os.stoid, user_id: user_id, pageSize: 6, page: this.data.currentPage,} | |
| 454 | - // }).then(res => { | |
| 455 | - // order = res.data.data.pageData; | |
| 456 | - // this.data.currentPage++; | |
| 457 | - // }) | |
| 458 | - | |
| 459 | - | |
| 460 | - // wx.showLoading({ title: "加载中"}); | |
| 461 | - // for (i = 0; i < order.length; i++) { | |
| 462 | - // //获取订单从表信息 | |
| 463 | - // await getApp().request.promiseGet("/api/weshop/ordergoods/pageGoods", { | |
| 464 | - // data: { store_id: os.stoid, order_id: order[i].order_id } | |
| 465 | - // }).then(res => { | |
| 466 | - // order_goods = res.data.data.pageData; | |
| 467 | - // order[i].order_goods = order_goods; | |
| 468 | - // order[i].gimage = ee.data.imageurl + order_goods[0].original_img; | |
| 469 | - // }) | |
| 470 | - | |
| 471 | - | |
| 472 | - // //获取订单表信息根据上面查询的订单号order[i].pt_listno | |
| 473 | - // await getApp().request.promiseGet("/api/weshop/order/pagePtList", { | |
| 474 | - // data: { store_id: os.stoid, pt_listno: order[i].pt_listno,pageSize:60,page:1} | |
| 475 | - // }).then(res => { | |
| 476 | - // //console.log("ordertx"); | |
| 477 | - // ordertx = res.data.data.pageData; | |
| 478 | - // //console.log(ordertx); | |
| 479 | - // order[i].tx=ordertx; | |
| 480 | - // }) | |
| 481 | - | |
| 482 | - | |
| 483 | - | |
| 484 | - // if (order[i].is_zsorder== 4) { | |
| 485 | - // var num = 0; | |
| 486 | - // var jt_data = JSON.parse(order[i].ct_rylist); | |
| 487 | - // for (var m in jt_data) { | |
| 488 | - // if (jt_data[m].rynum > num) num = jt_data[m].rynum; | |
| 489 | - // } | |
| 490 | - // order[i].max_ct_num = num; | |
| 491 | - // } | |
| 492 | - | |
| 493 | - // var sf_num = order[i].ct_num; | |
| 494 | - // if (order[i].ct_num>=3){ sf_num=3;} | |
| 495 | - // sf_num=sf_num-ordertx.length; | |
| 496 | - // if(sf_num>0) { | |
| 497 | - // var arr = []; | |
| 498 | - // for(var j=0;j<sf_num;j++){ | |
| 499 | - // arr.push(j); | |
| 500 | - // } | |
| 501 | - // order[i].sf_num=arr; | |
| 502 | - // } | |
| 503 | - | |
| 504 | - // } | |
| 505 | - // //设置值 | |
| 506 | - // for (var ii = 0; ii < order.length;ii++){ | |
| 507 | - // this.data.requestData.push(order[ii]); | |
| 508 | - // } | |
| 509 | - | |
| 510 | - // wx.hideLoading(); | |
| 511 | - // ee.setData({ order: this.data.requestData, ordertx: ordertx, isgo:1}); | |
| 512 | - // }, | |
| 513 | - | |
| 514 | - // //---滚动到底部加载更多--- | |
| 515 | - // onReachBottom: function () { | |
| 516 | - // this.init(this.data.currentTab); | |
| 517 | - // }, | |
| 518 | - | |
| 519 | - // resetData: function () { | |
| 520 | - // n.resetConfig(), this.data.order = null, this.data.currentPage = 1; | |
| 521 | - // }, | |
| 522 | - | |
| 523 | - // //----跳转到拼单success展示----- | |
| 524 | - // go_team_success:function(e) { | |
| 525 | - // var order_sn=e.currentTarget.dataset.ordsn; | |
| 526 | - // wx.navigateTo({ | |
| 527 | - // url: "/pages/team/team_success/team_success?ordersn=" + order_sn, | |
| 528 | - // }); | |
| 529 | - // }, | |
| 530 | - | |
| 531 | - // onHide:function(){ | |
| 532 | - // //--清理定时器-- | |
| 533 | - // clearInterval(this.timer); | |
| 534 | - // }, | |
| 535 | - | |
| 536 | - // //----倒计时函数----- | |
| 537 | - // countDown() { | |
| 538 | - // var th=this; | |
| 539 | - // // 获取当前时间,同时得到活动结束时间数组 | |
| 540 | - // let newTime =ut.gettimestamp(); | |
| 541 | - // var endTimeList = this.data.order; | |
| 542 | - | |
| 543 | - // if(endTimeList==null) return null | |
| 544 | - // // 对结束时间进行处理渲染到页面 | |
| 545 | - // for (var i = 0; i < endTimeList.length;i++){ | |
| 546 | - // var o = endTimeList[i]; | |
| 547 | - // if(o.kt_end_time==undefined) continue; | |
| 548 | - // var endTime = o.kt_end_time; | |
| 549 | - // let obj = null; | |
| 550 | - // // 如果活动未结束,对时间进行处理 | |
| 551 | - // if (endTime - newTime > 0){ | |
| 552 | - // let time = (endTime - newTime); | |
| 553 | - // // 获取天、时、分、秒 | |
| 554 | - // let day = parseInt(time / (60 * 60 * 24)); | |
| 555 | - // let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 556 | - // let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 557 | - // let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 558 | - // obj = { | |
| 559 | - // day: this.timeFormat(day), hou: this.timeFormat(hou), min: this.timeFormat(min), sec: this.timeFormat(sec) | |
| 560 | - // } | |
| 561 | - // }else{ | |
| 562 | - // //活动已结束,全部设置为'00' | |
| 563 | - // obj = { day: '00', hou: '00', min: '00', sec: '00' } | |
| 564 | - // } | |
| 565 | - | |
| 566 | - // var txt ="order["+i+"].djs"; | |
| 567 | - // th.setData({ [txt]: obj}); | |
| 568 | - // } | |
| 569 | - // }, | |
| 570 | - // //---小于10的格式化函数---- | |
| 571 | - // timeFormat(param) { | |
| 572 | - // return param < 10 ? '0' + param : param; | |
| 573 | - // }, | |
| 574 | - | |
| 575 | - images_err:function(e){ | |
| 576 | - var txt = e.currentTarget.dataset.err; | |
| 577 | - var ob={}; | |
| 578 | - ob[txt] = this.data.imageurl + "/miniapp/images/default_g_img.gif"; | |
| 579 | - this.setData(ob); | |
| 580 | - } | |
| 581 | - | |
| 582 | - | |
| 583 | 318 | }) |
| 584 | 319 | ... | ... |
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxml
| ... | ... | @@ -10,8 +10,8 @@ |
| 10 | 10 | <!-- <view class="list-item" wx:for="{{list.pageData}}"> --> |
| 11 | 11 | <view class="pd20" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}"> |
| 12 | 12 | <view class="pdr40 arrow" wx:if="{{item.team_status == 0}}">参团中,还差<text class="c-red">{{filters.difference(item.num, item.group_num)}}</text>人</view> |
| 13 | - <view class="pdr40 arrow" wx:elif="{{item.team_status == 1}}">已团中,{{item.shipping_status == 0 ? '待发货':'已发货'}}</view> | |
| 14 | - <view class="pdr40 arrow" wx:elif="{{item.team_status == 2}}">未团中,已退款</view> | |
| 13 | + <view class="pdr40 arrow" wx:elif="{{item.team_status == 2}}">已团中,{{item.shipping_status == 0 ? '待发货':'已发货'}}</view> | |
| 14 | + <view class="pdr40 arrow" wx:elif="{{item.team_status == 1}}">未团中,已退款</view> | |
| 15 | 15 | </view> |
| 16 | 16 | <view class="flex pd20"> |
| 17 | 17 | <view class="img-container"> |
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | <text class="rmb fs40 c-red">{{filters.price(item.group_price)}}</text> |
| 25 | 25 | <view class="fs24 del pdl10 c-c7">零售价<text class="rmb">{{item.market_price}}</text></view> |
| 26 | 26 | </view> |
| 27 | - <view class="c-red fs24">未团中可获得帮团奖励</view> | |
| 27 | + <view class="c-red fs24" wx:if="{{item.team_status != 2}}">未团中可获得帮团奖励</view> | |
| 28 | 28 | </view> |
| 29 | 29 | </view> |
| 30 | 30 | <view class="flex ai-center pd20 bdt fs24 jc_sb"> |
| ... | ... | @@ -32,10 +32,7 @@ |
| 32 | 32 | <view class="flex"> |
| 33 | 33 | <view class="btn gray" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}&team_status={{item.team_status}}">查看订单</view> |
| 34 | 34 | <view class="btn c-red mgl20" wx:if="{{item.team_status == 0}}" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?group_id={{item.aid}}&goods_id={{item.goods_id}}&goods_name={{item.goods_name}}&team_id={{item.team_id}}&&from=list">邀请好友</view> |
| 35 | - | |
| 36 | - <!-- type=1&ordersn=" + data.data + "&group_id=" + th.data.param.group_id + "&goods_id=" + th.data.param.goods_id + "&goods_name=" --> | |
| 37 | - <!-- "&group_id=" + th.data.param.group_id + "&goods_id=" + th.data.param.goods_id + "&goods_name=" + th.data.bn_goods.goods_name --> | |
| 38 | - <view class="btn c-red mgl20" wx:if="{{item.team_status == 2}}" bindtap="showReward" data-index="{{index}}" data-aid="{{item.aid}}">查看奖励</view> | |
| 35 | + <view class="btn c-red mgl20" wx:if="{{item.team_status == 1}}" bindtap="showReward" data-index="{{index}}" data-aid="{{item.aid}}">查看奖励</view> | |
| 39 | 36 | </view> |
| 40 | 37 | </view> |
| 41 | 38 | </view> |
| ... | ... | @@ -43,8 +40,6 @@ |
| 43 | 40 | </view> |
| 44 | 41 | |
| 45 | 42 | |
| 46 | - | |
| 47 | - | |
| 48 | 43 | <view class="popup-container" wx:if="{{showReward}}"> |
| 49 | 44 | <view class="popup"> |
| 50 | 45 | <view class="pd20 flex jc_sb"> |
| ... | ... | @@ -52,12 +47,11 @@ |
| 52 | 47 | <text class="iconfont icon-close fs32 c-7b" bindtap="closeReward"></text> |
| 53 | 48 | </view> |
| 54 | 49 | <view class="popup-list"> |
| 55 | - | |
| 56 | 50 | <block wx:for="{{prizesArr}}"> |
| 57 | 51 | <!-- 优惠券奖励 --> |
| 58 | 52 | <block wx:if="{{item.type == 3}}"> |
| 59 | 53 | <view class="popup-list-item" wx:for="{{item.couponList}}" wx:for-item="i"> |
| 60 | - <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view> | |
| 54 | + <view class="img-container"><image class="img-block" src="{{imghost + 'miniapp/images/luckDraw/yhq.png'}}"></image></view> | |
| 61 | 55 | <view class="f1"> |
| 62 | 56 | <view class="ellipsis-2 popup-title">优惠券-{{i.name}}</view> |
| 63 | 57 | <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">{{i.num}}</text></view> |
| ... | ... | @@ -67,7 +61,7 @@ |
| 67 | 61 | <!-- 服务项目奖励 --> |
| 68 | 62 | <block wx:elif="{{item.type == 4}}"> |
| 69 | 63 | <view class="popup-list-item" wx:for="{{item.serviceList}}" wx:for-item="i"> |
| 70 | - <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view> | |
| 64 | + <view class="img-container"><image class="img-block" src="{{imghost + 'miniapp/images/luckDraw/fw.png'}}"></image></view> | |
| 71 | 65 | <view class="f1"> |
| 72 | 66 | <view class="ellipsis-2 popup-title">服务项目-{{i.name}}</view> |
| 73 | 67 | <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">{{i.num}}</text></view> |
| ... | ... | @@ -77,7 +71,7 @@ |
| 77 | 71 | <!-- 预存金额 --> |
| 78 | 72 | <block wx:elif="{{item.type == 5}}"> |
| 79 | 73 | <view class="popup-list-item"> |
| 80 | - <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view> | |
| 74 | + <view class="img-container"><image class="img-block" src="{{imghost + 'miniapp/images/luckDraw/jf.png'}}"></image></view> | |
| 81 | 75 | <view class="f1"> |
| 82 | 76 | <view class="ellipsis-2 popup-title">{{list.pageData[currentItemIndex][item.name]}}</view> |
| 83 | 77 | <view class="fs24 t-r pdt16 c-7b">金额:<text class="c-red">{{filters.div100(list.pageData[currentItemIndex][item.num])}}</text></view> |
| ... | ... | @@ -87,7 +81,10 @@ |
| 87 | 81 | <!-- 其他奖励 --> |
| 88 | 82 | <block wx:else> |
| 89 | 83 | <view class="popup-list-item"> |
| 90 | - <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view> | |
| 84 | + <view class="img-container"> | |
| 85 | + <image class="img-block" src="{{imghost + 'miniapp/images/luckDraw/lb.png'}}" wx:if="{{item.type == 1}}"></image> | |
| 86 | + <image class="img-block" src="{{imghost + 'miniapp/images/luckDraw/czz.png'}}" wx:elif="{{item.type == 2}}"></image> | |
| 87 | + </view> | |
| 91 | 88 | <view class="f1"> |
| 92 | 89 | <view class="ellipsis-2 popup-title">{{item.name}}</view> |
| 93 | 90 | <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">{{list.pageData[currentItemIndex][item.num]}}</text></view> | ... | ... |
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxss
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml
| ... | ... | @@ -19,8 +19,8 @@ |
| 19 | 19 | <view class="shop_name">门店:{{order.pickname}}</view> |
| 20 | 20 | <!-- <view>{{order.order_status_detail}}</view> --> |
| 21 | 21 | <view wx:if="{{team_status == 0}}">参团中</view> |
| 22 | - <view wx:elif="{{team_status == 1}}">已团中 | {{order.shipping_status == 0 ? '待发货':'已发货'}}</view> | |
| 23 | - <view wx:elif="{{team_status == 2}}">未团中 | 已退款</view> | |
| 22 | + <view wx:elif="{{team_status == 2}}">已团中 | {{order.shipping_status == 0 ? '待发货':'已发货'}}</view> | |
| 23 | + <view wx:elif="{{team_status == 1}}">未团中 | 已退款</view> | |
| 24 | 24 | </view> |
| 25 | 25 | <!--wx:if="{{item.return_btn!=4}}" --> |
| 26 | 26 | <view class="order-detail pd20" wx:for="{{order.order_goods}}" wx:key="{{index}}" > |
| ... | ... | @@ -152,16 +152,17 @@ |
| 152 | 152 | </view> |
| 153 | 153 | |
| 154 | 154 | <!-- 幸运购 --> |
| 155 | - <view class="price-information information"> | |
| 155 | + <view class="price-information information" wx:if="{{order.is_back == 1}}"> | |
| 156 | 156 | <view class="title">退款信息</view> |
| 157 | 157 | |
| 158 | 158 | <view class="item"> |
| 159 | 159 | <view>退款金额</view> |
| 160 | - <view>¥0.01</view> | |
| 160 | + <view wx:if="{{order.tail_pay_type==1}}">¥{{filters.toFix(order.user_money+order.pt_tail_money,2)}}</view> | |
| 161 | + <view wx:else>¥{{filters.toFix(order.user_money,2)}}</view> | |
| 161 | 162 | </view> |
| 162 | 163 | <view class="item"> |
| 163 | 164 | <view>退款时间</view> |
| 164 | - <view>2021-10-11 18:00:00</view> | |
| 165 | + <view>{{filters.format_time(order.is_back_time, 1)}}</view> | |
| 165 | 166 | </view> |
| 166 | 167 | <view class="item"> |
| 167 | 168 | <view>退款方式</view> | ... | ... |
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxss
pages/index/index/index.wxml
| ... | ... | @@ -230,7 +230,7 @@ |
| 230 | 230 | |
| 231 | 231 | <!--幸运购--> |
| 232 | 232 | <!--幸运购--> |
| 233 | - <view class="seckill"> | |
| 233 | + <view class="seckill" wx:if="{{luckGo_list && luckGo_list.length != 0}}"> | |
| 234 | 234 | <navigator bindtap="go_url" data-url="/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList" hover-class="none"> |
| 235 | 235 | <view class="seckill-time"> |
| 236 | 236 | <view class="classname flex ai_c"> |
| ... | ... | @@ -244,7 +244,7 @@ |
| 244 | 244 | </view> |
| 245 | 245 | </navigator> |
| 246 | 246 | <view class="seckill-list luck"> |
| 247 | - <view class="list-item" wx:for="{{luckGo_list}}" bindtap="go_url" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{item.goods_id}}&group_id={{item.id}}"> | |
| 247 | + <view class="list-item" wx:for="{{luckGo_list}}" bindtap="go_url" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{item.goods_id}}&group_id={{item.id}}" wx:if="{{item.status == 1}}"> | |
| 248 | 248 | <view class="flex ai-center"> |
| 249 | 249 | <view class="img-container"><image class="img-block" src="{{url + item.original_img}}" data-val="{{item.original_img}}" |
| 250 | 250 | data-errorimg="luckGo_list[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image></view> | ... | ... |