Commit b1a1d6a109f5459d51defd886de314cb2e5ea776
1 parent
41acdb61
OA 单 海报优化
Showing
2 changed files
with
28 additions
and
5 deletions
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -2894,7 +2894,25 @@ Page({ | @@ -2894,7 +2894,25 @@ Page({ | ||
2894 | //share_goods_img?share_goods_img:th.data.data.share_goods_img; | 2894 | //share_goods_img?share_goods_img:th.data.data.share_goods_img; |
2895 | //---中间大图--- | 2895 | //---中间大图--- |
2896 | context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); | 2896 | context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); |
2897 | + //---自定义海报 产品质量保证 | ||
2898 | + if(th.data.poster.show_quality==1 ){ | ||
2899 | + var g_path = "/images/share/s_gou.png"; | ||
2900 | + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2901 | + context.setFillStyle("red") | ||
2902 | + context.setFontSize(18 * unit) | ||
2903 | + context.fillText("正品保证", 84 * unit, 690 * unit); | ||
2904 | + | ||
2905 | + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2906 | + context.setFillStyle("red") | ||
2907 | + context.setFontSize(18 * unit) | ||
2908 | + context.fillText("纯实体店", 246 * unit, 690 * unit); | ||
2897 | 2909 | ||
2910 | + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2911 | + context.setFillStyle("red") | ||
2912 | + context.setFontSize(18 * unit) | ||
2913 | + context.fillText("官方验证", 420 * unit, 690 * unit); | ||
2914 | + | ||
2915 | + } | ||
2898 | 2916 | ||
2899 | //---画线--- | 2917 | //---画线--- |
2900 | context.setLineWidth(1 * unit) | 2918 | context.setLineWidth(1 * unit) |
pages/goods/goodsInfo/goodsInfo.js
@@ -5041,10 +5041,14 @@ Page({ | @@ -5041,10 +5041,14 @@ Page({ | ||
5041 | 5041 | ||
5042 | //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 | 5042 | //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 |
5043 | var type = this.data.prom_type; | 5043 | var type = this.data.prom_type; |
5044 | - if (type == 2) type = -1; | 5044 | + console.log('商品类型-----'); |
5045 | + console.log(type); | ||
5046 | + // if (type == 2) type = -1; | ||
5047 | + if (type == 4) type = 0; | ||
5048 | + if (type == 2) type = 0; | ||
5045 | if (type == 6) type = 2; // 6拼团 2团购 | 5049 | if (type == 6) type = 2; // 6拼团 2团购 |
5046 | if (type == 10) type = -1; | 5050 | if (type == 10) type = -1; |
5047 | - | 5051 | + |
5048 | 5052 | ||
5049 | if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; | 5053 | if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; |
5050 | console.log('商品类型。。。。。'); | 5054 | console.log('商品类型。。。。。'); |
@@ -5096,9 +5100,10 @@ Page({ | @@ -5096,9 +5100,10 @@ Page({ | ||
5096 | pg_path = th.data.share_b_img; | 5100 | pg_path = th.data.share_b_img; |
5097 | } | 5101 | } |
5098 | // context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | 5102 | // context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); |
5103 | + console.log('海报类型-----') | ||
5104 | + console.log(type); | ||
5099 | 5105 | ||
5100 | - | ||
5101 | - if ( !th.data.share_b_img && (type == 0 || type == 1 || type == 2 || type == 3)){ // 如果是普通商品,绘制新海报 | 5106 | + if ( !th.data.share_b_img && (type == 0 || type == 1 || type == 2 || type == 3 )){ // 如果是普通商品,绘制新海报 |
5102 | th.drawPoster(context, unit, th.data.share_goods_img, vpath, type); | 5107 | th.drawPoster(context, unit, th.data.share_goods_img, vpath, type); |
5103 | } else { | 5108 | } else { |
5104 | context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | 5109 | context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); |
@@ -5237,7 +5242,7 @@ Page({ | @@ -5237,7 +5242,7 @@ Page({ | ||
5237 | ; | 5242 | ; |
5238 | 5243 | ||
5239 | //---自定义海报 产品质量保证 | 5244 | //---自定义海报 产品质量保证 |
5240 | - if(th.data.share_b_img && th.data.poster.show_quality==1 && type==0){ | 5245 | + if(th.data.share_b_img && th.data.poster.show_quality==1 ){ |
5241 | var g_path = "../../../images/share/s_gou.png"; | 5246 | var g_path = "../../../images/share/s_gou.png"; |
5242 | context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | 5247 | context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); |
5243 | context.setFillStyle("red") | 5248 | context.setFillStyle("red") |