From b1a1d6a109f5459d51defd886de314cb2e5ea776 Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Thu, 15 Sep 2022 15:13:10 +0800 Subject: [PATCH] OA 单 海报优化 --- packageC/pages/presell/goodsInfo/goodsInfo.js | 18 ++++++++++++++++++ pages/goods/goodsInfo/goodsInfo.js | 15 ++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js index 357861e..ffa4834 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.js +++ b/packageC/pages/presell/goodsInfo/goodsInfo.js @@ -2894,7 +2894,25 @@ Page({ //share_goods_img?share_goods_img:th.data.data.share_goods_img; //---中间大图--- context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); + //---自定义海报 产品质量保证 + if(th.data.poster.show_quality==1 ){ + var g_path = "/images/share/s_gou.png"; + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); + context.setFillStyle("red") + context.setFontSize(18 * unit) + context.fillText("正品保证", 84 * unit, 690 * unit); + + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); + context.setFillStyle("red") + context.setFontSize(18 * unit) + context.fillText("纯实体店", 246 * unit, 690 * unit); + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); + context.setFillStyle("red") + context.setFontSize(18 * unit) + context.fillText("官方验证", 420 * unit, 690 * unit); + + } //---画线--- context.setLineWidth(1 * unit) diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 1de29b5..5a0fc2f 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -5041,10 +5041,14 @@ Page({ //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 var type = this.data.prom_type; - if (type == 2) type = -1; + console.log('商品类型-----'); + console.log(type); + // if (type == 2) type = -1; + if (type == 4) type = 0; + if (type == 2) type = 0; if (type == 6) type = 2; // 6拼团 2团购 if (type == 10) type = -1; - + if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; console.log('商品类型。。。。。'); @@ -5096,9 +5100,10 @@ Page({ pg_path = th.data.share_b_img; } // context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); + console.log('海报类型-----') + console.log(type); - - if ( !th.data.share_b_img && (type == 0 || type == 1 || type == 2 || type == 3)){ // 如果是普通商品,绘制新海报 + if ( !th.data.share_b_img && (type == 0 || type == 1 || type == 2 || type == 3 )){ // 如果是普通商品,绘制新海报 th.drawPoster(context, unit, th.data.share_goods_img, vpath, type); } else { context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); @@ -5237,7 +5242,7 @@ Page({ ; //---自定义海报 产品质量保证 - if(th.data.share_b_img && th.data.poster.show_quality==1 && type==0){ + if(th.data.share_b_img && th.data.poster.show_quality==1 ){ var g_path = "../../../images/share/s_gou.png"; context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); context.setFillStyle("red") -- libgit2 0.21.4