diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js index f83e6cd..53ac4f3 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.js +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -1104,6 +1104,10 @@ Page({ context.fillText(price_txt, 54 * unit, 735 * unit); + var wp= 62 * unit; + var hp=765 * unit + this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit); + // 8.商品标题 context.setFontSize(20 * unit); context.setFillStyle('#898989'); @@ -1122,6 +1126,26 @@ Page({ context.fill(); }, + + //---市场价划掉--- + draw_pos_price(context,w,h,market_price,unit){ + + if(!this.is_retail_price) return false; + + context.setFillStyle("gray") + context.setFontSize(22 * unit) + var pri0 = "¥" + market_price.toFixed(2); + context.fillText(pri0, w, h); + + var c_h=h-6; + context.setStrokeStyle('gray'); + context.setLineWidth(1 * unit); + context.moveTo(w - 5, c_h); + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h); + context.stroke(); + + }, + //--获取商品图片的本地缓存,回调写法-- get_goods_temp: function (tt) { var ee = this;