Commit 580c8345b40a55ef18c924118ec5f765966c01c1

Authored by taiyuan
2 parents 42faa03b 2eaa2e90

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

components/diy_goodsGroup/diy_goodsGroup.wxml
... ... @@ -624,11 +624,12 @@
624 624 <view class="sp">
625 625 <swiper-item class="s_it" wx:for="{{goods_array}}">
626 626 <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
627   - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" >
628   - <view class='one'>
  627 + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" style="width: 32%" >
  628 + <view class='one' style="margin-left: 10rpx">
629 629 <view class='sp_top'>
630   - <view class='s_img' style="position: relative;">
631   - <image src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].goods_img" binderror="bind_bnerr3" lazy-load="true"></image>
  630 + <view class='s_img' style="position: relative; width: 100%">
  631 + <image src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].goods_img"
  632 + binderror="bind_bnerr3" lazy-load="true" style="width: 100%"></image>
632 633  
633 634 <block wx:if="{{object.goodicon==3}}">
634 635 <image class='{{g_filter.get_class(object.column,object.position)}}'
... ...
components/diy_goodsGroup/diy_goodsGroup.wxss
... ... @@ -808,5 +808,6 @@ top: 10rpx;
808 808 position: absolute;
809 809 right: 0rpx;
810 810 bottom: 10rpx;
  811 +}
811 812  
812   -}
813 813 \ No newline at end of file
  814 +.s_prom{ margin-left: -8rpx}
814 815 \ No newline at end of file
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -1990,9 +1990,12 @@ Page({
1990 1990 }
1991 1991 var title= th.data.data.goods_name;
1992 1992 var img=th.data.data.original_img;
1993   - if(th.data.prom_type==6){
  1993 + if(th.data.prom_type==6 || th.data.prom_type==1){
  1994 +
1994 1995 title=th.data.prom_act.share_title;
1995   - img=th.data.iurl+th.data.prom_act.share_imgurl;
  1996 + if(!title) title=th.data.prom_act.title;
  1997 + if(th.data.prom_act.share_imgurl)
  1998 + img=th.data.iurl+th.data.prom_act.share_imgurl;
1996 1999 }
1997 2000  
1998 2001  
... ... @@ -3963,14 +3966,19 @@ Page({
3963 3966 context.setFillStyle("white");
3964 3967 context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit);
3965 3968 }
3966   -
3967   -
  3969 +
  3970 + var share_title=th.data.data.goods_name;
  3971 + if(th.data.prom_type==1 || th.data.prom_type==4){
  3972 + share_title=th.data.prom_act.share_title;
  3973 + if(!share_title) share_title=th.data.prom_act.title;
  3974 + }
  3975 +
3968 3976 //---产品名称---
3969 3977 //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度
3970 3978 if(type!=4){
3971 3979 context.setFillStyle("black");
3972 3980 context.setFontSize(21.3 * unit)
3973   - th.draw_Text(context, th.data.data.goods_name,
  3981 + th.draw_Text(context, share_title,
3974 3982 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit);
3975 3983 //------产品的价格-------
3976 3984 context.setFontSize(23 * unit)
... ... @@ -4431,18 +4439,23 @@ Page({
4431 4439 tt();
4432 4440 return false;
4433 4441 }
  4442 +
  4443 + var img_url=ee.data.data.original_img;
  4444 + if((this.data.prom_type==1 && this.data.prom_type==6) || this.data.prom_act.share_imgurl){
  4445 + img_url=this.data.iurl+this.data.prom_act.share_imgurl;
  4446 + }
  4447 +
4434 4448 //获取商品是分享图信息
4435 4449 wx.getImageInfo({
4436   - src: ee.data.data.original_img,
  4450 + src: img_url,
4437 4451 success: function(res) {
4438   - //res.path是网络图片的本地地址
4439   - ee.data.share_goods_img = res.path;
4440   - tt();
  4452 + //res.path是网络图片的本地地址
  4453 + ee.data.share_goods_img = res.path;
  4454 + tt();
4441 4455 },
4442 4456 fail: function(res) {
4443   -
4444   - ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的
4445   - tt();
  4457 + ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的
  4458 + tt();
4446 4459 }
4447 4460 });
4448 4461 },
... ...