Commit 5202680bf159faf435c5dbe9d1e5ecfe7fe0b814
1 parent
d321ab60
OA单的优化
Showing
1 changed file
with
24 additions
and
0 deletions
pages/giftpack/giftpacklist/giftpacklist.js
| ... | ... | @@ -1104,6 +1104,10 @@ Page({ | 
| 1104 | 1104 | context.fillText(price_txt, 54 * unit, 735 * unit); | 
| 1105 | 1105 | |
| 1106 | 1106 | |
| 1107 | + var wp= 62 * unit; | |
| 1108 | + var hp=765 * unit | |
| 1109 | + this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit); | |
| 1110 | + | |
| 1107 | 1111 | // 8.商品标题 | 
| 1108 | 1112 | context.setFontSize(20 * unit); | 
| 1109 | 1113 | context.setFillStyle('#898989'); | 
| ... | ... | @@ -1122,6 +1126,26 @@ Page({ | 
| 1122 | 1126 | context.fill(); | 
| 1123 | 1127 | }, | 
| 1124 | 1128 | |
| 1129 | + | |
| 1130 | + //---市场价划掉--- | |
| 1131 | + draw_pos_price(context,w,h,market_price,unit){ | |
| 1132 | + | |
| 1133 | + if(!this.is_retail_price) return false; | |
| 1134 | + | |
| 1135 | + context.setFillStyle("gray") | |
| 1136 | + context.setFontSize(22 * unit) | |
| 1137 | + var pri0 = "¥" + market_price.toFixed(2); | |
| 1138 | + context.fillText(pri0, w, h); | |
| 1139 | + | |
| 1140 | + var c_h=h-6; | |
| 1141 | + context.setStrokeStyle('gray'); | |
| 1142 | + context.setLineWidth(1 * unit); | |
| 1143 | + context.moveTo(w - 5, c_h); | |
| 1144 | + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h); | |
| 1145 | + context.stroke(); | |
| 1146 | + | |
| 1147 | + }, | |
| 1148 | + | |
| 1125 | 1149 | //--获取商品图片的本地缓存,回调写法-- | 
| 1126 | 1150 | get_goods_temp: function (tt) { | 
| 1127 | 1151 | var ee = this; | ... | ... | 
