diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js index 8eebb31..38586b9 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js @@ -6870,10 +6870,11 @@ Page({ if (getApp().globalData.groupchat_id) { pagePath+="&groupchat_id="+getApp().globalData.groupchat_id } - + let imgPath = this.data.iurl + this.data.luckGoInfo.original_img; return { title: this.data.data.goods_name + '-' + store_name, - imageUrl: this.data.gallery[0].image_url, + // imageUrl: this.data.gallery[0].image_url, + imageUrl: imgPath, query: pagePath } }, diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js index 34f98c0..a2825ec 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.js +++ b/packageC/pages/presell/goodsInfo/goodsInfo.js @@ -4492,11 +4492,12 @@ Page({ if (getApp().globalData.groupchat_id) { url+="&groupchat_id="+getApp().globalData.groupchat_id } - + let img = this.data.data.original_img; return { title: this.data.data.goods_name + '-' + store_name, query: 'first_leader='+user_id+url, - imageUrl: this.data.gallery[0].image_url, + // imageUrl: this.data.gallery[0].image_url, + imageUrl: img } }, diff --git a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js index d847d98..85fbbe5 100644 --- a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js +++ b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js @@ -301,6 +301,7 @@ Page({ arr2[j].giftTitle=arr2[j].act_name arr2[j].virtualsales=arr2[j].virtualSales arr2[j].lbnum=arr2[j].lbNum + } if(arr2.length>0){ var monthgiftbag =arr2[0]; @@ -320,6 +321,7 @@ Page({ isStart, monthgiftbag: monthgiftbag, sele_g: monthgiftbag, + default_color:monthgiftbag.bg_color }) th.init() }else{ diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index a870b8c..dd3abd7 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -8044,9 +8044,25 @@ Page({ url += "&groupchat_id=" + getApp().globalData.groupchat_id } + //获取有活动的取活动图片,没有活动的取主图 + var img = th.data.sele_g.original_img; + if(th.data.new_share_imgurl){ + img = th.data.iurl + th.data.new_share_imgurl + } + if (th.data.prom_type == 6 || th.data.prom_type == 1 || th.data.prom_type == 4) { + // title = th.data.prom_act.share_title; + // if (!title) title = th.data.prom_act.title; + // if (th.data.prom_type == 4) title = th.data.prom_act.name; + + if (th.data.prom_act.share_imgurl) + img = th.data.iurl + th.data.prom_act.share_imgurl; + } + let user_id = getApp().globalData.user_id + console.error(img); return { title: this.data.data.goods_name + '-' + store_name, - imageUrl: this.data.gallery[0].image_url, + // imageUrl: this.data.gallery[0].image_url, + imageUrl: img, query: 'first_leader=' + user_id + url } }, diff --git a/pages/goods/goodsList/goodsList.js b/pages/goods/goodsList/goodsList.js index 765e2e7..225beed 100644 --- a/pages/goods/goodsList/goodsList.js +++ b/pages/goods/goodsList/goodsList.js @@ -43,10 +43,16 @@ Page({ fil_price_state:0, limit_num:0, gr_fir:0, //分组第一次 + share_imgurl:'', //分享图片 }, onLoad: function(t) { + //----------商品分组自定义分享图片---------- + if (t.gid) { + this.get_share_imgurl(t.gid) //获取分享图片 + } + //---------------------end------------ this.data.rq_data=t; //接受有没有导购的参数 @@ -241,6 +247,18 @@ Page({ onShow:function () { getApp().check_can_share(); }, + //获取商品分组分享图片 + get_share_imgurl(gid){ + getApp().request.promiseGet("/api/weshop/goodsGroup/get/" + oo.stoid + "/" + gid, {}).then(res => { + if (res.data.code == 0) { + let prom = res.data.data; + let share_imgurl =prom.share_imgurl + this.setData({ + share_imgurl + }) + } + }) + }, //获取优惠活动 async getprom(prom_id){ await getApp().request.promiseGet("/api/weshop/promgoods/get/" + oo.stoid + "/" + prom_id, {}).then(res => { @@ -487,9 +505,11 @@ Page({ } } console.log("11-11"+pagePath); + let share_imgurl=this.data.iurl + this.data.share_imgurl return { title: "商品列表", path:pagePath, + imageUrl:share_imgurl } }, //---图片失败,默认图片---