Commit a88ad32a22fb91beb67c478dc9e6f8515e5a7bcc
1 parent
4ba83eed
预售自定义分享的优化,商品分享的优化
Showing
2 changed files
with
29 additions
and
23 deletions
packageA/pages/goodsInfo/goodsInfo.js
| @@ -3843,7 +3843,7 @@ Page({ | @@ -3843,7 +3843,7 @@ Page({ | ||
| 3843 | 80 * unit, 160 * unit, 200 * unit, 279 * unit, unit); | 3843 | 80 * unit, 160 * unit, 200 * unit, 279 * unit, unit); |
| 3844 | 3844 | ||
| 3845 | //------产品的价格------- | 3845 | //------产品的价格------- |
| 3846 | - context.setFontSize(22 * unit) | 3846 | + context.setFontSize(23 * unit) |
| 3847 | context.setFillStyle("red") | 3847 | context.setFillStyle("red") |
| 3848 | 3848 | ||
| 3849 | // 7.商品价格 | 3849 | // 7.商品价格 |
| @@ -3856,7 +3856,7 @@ Page({ | @@ -3856,7 +3856,7 @@ Page({ | ||
| 3856 | 3856 | ||
| 3857 | var wd1 = th.data.screenWidth - ut.measureText(price, 31 * unit) - 25; | 3857 | var wd1 = th.data.screenWidth - ut.measureText(price, 31 * unit) - 25; |
| 3858 | context.fillText("¥", wd1 - 15, 160 * unit); | 3858 | context.fillText("¥", wd1 - 15, 160 * unit); |
| 3859 | - context.setFontSize(22 * unit) | 3859 | + context.setFontSize(31 * unit) |
| 3860 | context.fillText(price, wd1, 165 * unit); | 3860 | context.fillText(price, wd1, 165 * unit); |
| 3861 | 3861 | ||
| 3862 | //---市场价划掉--- | 3862 | //---市场价划掉--- |
| @@ -3875,8 +3875,9 @@ Page({ | @@ -3875,8 +3875,9 @@ Page({ | ||
| 3875 | // context.stroke(); | 3875 | // context.stroke(); |
| 3876 | 3876 | ||
| 3877 | //-- 零售价的优化 -- | 3877 | //-- 零售价的优化 -- |
| 3878 | - var wp= th.data.screenWidth - ut.measureText(price, 22 * unit) - 50; | ||
| 3879 | - var hp= 180 * unit | 3878 | + var wp = wd1; |
| 3879 | + var hp = 203 * unit; | ||
| 3880 | + if (th.data.prom_type != 4) wp -= 12; | ||
| 3880 | th.draw_pos_price(context,wp,hp,th.data.data.show_price,unit); | 3881 | th.draw_pos_price(context,wp,hp,th.data.data.show_price,unit); |
| 3881 | 3882 | ||
| 3882 | 3883 | ||
| @@ -3884,24 +3885,24 @@ Page({ | @@ -3884,24 +3885,24 @@ Page({ | ||
| 3884 | //let share_goods_img=th.data.presellForm.share_img; | 3885 | //let share_goods_img=th.data.presellForm.share_img; |
| 3885 | //share_goods_img?share_goods_img:th.data.data.share_goods_img; | 3886 | //share_goods_img?share_goods_img:th.data.data.share_goods_img; |
| 3886 | //---中间大图--- | 3887 | //---中间大图--- |
| 3887 | - context.drawImage(th.data.share_goods_img, 70 * unit, 210 * unit, 408 * unit, 408 * unit); | 3888 | + context.drawImage(th.data.share_goods_img, 70 * unit, 220 * unit, 408 * unit, 408 * unit); |
| 3888 | //---自定义海报 产品质量保证 | 3889 | //---自定义海报 产品质量保证 |
| 3889 | if(th.data.poster.show_quality==1 ){ | 3890 | if(th.data.poster.show_quality==1 ){ |
| 3890 | - var g_path = "/images/share/s_gou.png"; | ||
| 3891 | - context.drawImage(g_path, 56 * unit, 630 * unit, 22 * unit, 22 * unit); | 3891 | + var g_path = "../../../images/share/s_gou.png"; |
| 3892 | + context.drawImage(g_path, 56 * unit, 644 * unit, 22 * unit, 22 * unit); | ||
| 3892 | context.setFillStyle("red") | 3893 | context.setFillStyle("red") |
| 3893 | context.setFontSize(18 * unit) | 3894 | context.setFontSize(18 * unit) |
| 3894 | - context.fillText("正品保证", 84 * unit, 650 * unit); | 3895 | + context.fillText("正品保证", 84 * unit, 664 * unit); |
| 3895 | 3896 | ||
| 3896 | - context.drawImage(g_path, 218 * unit, 630 * unit, 22 * unit, 22 * unit); | 3897 | + context.drawImage(g_path, 218 * unit, 644 * unit, 22 * unit, 22 * unit); |
| 3897 | context.setFillStyle("red") | 3898 | context.setFillStyle("red") |
| 3898 | context.setFontSize(18 * unit) | 3899 | context.setFontSize(18 * unit) |
| 3899 | - context.fillText("纯实体店", 246 * unit, 650 * unit); | 3900 | + context.fillText("纯实体店", 246 * unit, 664 * unit); |
| 3900 | 3901 | ||
| 3901 | - context.drawImage(g_path, 388 * unit, 630 * unit, 22 * unit, 22 * unit); | 3902 | + context.drawImage(g_path, 388 * unit, 644 * unit, 22 * unit, 22 * unit); |
| 3902 | context.setFillStyle("red") | 3903 | context.setFillStyle("red") |
| 3903 | context.setFontSize(18 * unit) | 3904 | context.setFontSize(18 * unit) |
| 3904 | - context.fillText("官方验证", 420 * unit, 650 * unit); | 3905 | + context.fillText("官方验证", 420 * unit, 664 * unit); |
| 3905 | 3906 | ||
| 3906 | } | 3907 | } |
| 3907 | 3908 | ||
| @@ -3911,20 +3912,16 @@ Page({ | @@ -3911,20 +3912,16 @@ Page({ | ||
| 3911 | // context.lineTo(520 * unit, 662 * unit) | 3912 | // context.lineTo(520 * unit, 662 * unit) |
| 3912 | // context.stroke(); | 3913 | // context.stroke(); |
| 3913 | 3914 | ||
| 3914 | - | ||
| 3915 | //-- 图片底部文字 -- | 3915 | //-- 图片底部文字 -- |
| 3916 | switch (type){ | 3916 | switch (type){ |
| 3917 | case 0: | 3917 | case 0: |
| 3918 | //---文字--- | 3918 | //---文字--- |
| 3919 | - context.setFillStyle("black") | ||
| 3920 | - // context.setFontSize(22 * unit) | ||
| 3921 | - context.setFontSize(24 * unit) | ||
| 3922 | - context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | 3919 | + //---文字--- |
| 3920 | + context.setFillStyle("black"); | ||
| 3921 | + context.setFontSize(22 * unit); | ||
| 3923 | 3922 | ||
| 3924 | - context.setFillStyle("black") | ||
| 3925 | - context.setFontSize(22 * unit) | ||
| 3926 | - context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 800 * unit); | ||
| 3927 | - context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 840 * unit); | 3923 | + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 776 * unit); |
| 3924 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 826 * unit); | ||
| 3928 | 3925 | ||
| 3929 | break; | 3926 | break; |
| 3930 | 3927 |
pages/goods/goodsInfo/goodsInfo.js
| @@ -6859,8 +6859,17 @@ Page({ | @@ -6859,8 +6859,17 @@ Page({ | ||
| 6859 | // context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 816 * unit); | 6859 | // context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 816 * unit); |
| 6860 | // context.setFontSize(18 * unit) | 6860 | // context.setFontSize(18 * unit) |
| 6861 | // context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 850 * unit); | 6861 | // context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 850 * unit); |
| 6862 | - //---二维吗图--- | ||
| 6863 | - context.drawImage(vpath, 380 * unit, 736 * unit, 120 * unit, 120 * unit); | 6862 | + |
| 6863 | + if (th.data.share_b_img || th.data.poster) { | ||
| 6864 | + var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | ||
| 6865 | + var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | ||
| 6866 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | ||
| 6867 | + }else{ | ||
| 6868 | + //---二维吗图--- | ||
| 6869 | + context.drawImage(vpath, 380 * unit, 736 * unit, 120 * unit, 120 * unit); | ||
| 6870 | + } | ||
| 6871 | + | ||
| 6872 | + | ||
| 6864 | break; //普通商品的展示 | 6873 | break; //普通商品的展示 |
| 6865 | case 4: | 6874 | case 4: |
| 6866 | 6875 |