From edf149699ade025988ae540aedcb178f3d00c116 Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Thu, 27 Jul 2023 10:04:43 +0800 Subject: [PATCH] oa单普通商品详情页面分享 --- pages/goods/goodsInfo/goodsInfo.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 0ca5cc1..fa186be 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -272,6 +272,7 @@ Page({ sec_i: -1, //选中分类门店 下标 cx_prom_group: [], //促销活动,用于显示和判断默认要用什么促销活动 showFold:true, + new_share_imgurl:'', //普通商品分享图片 }, //------初始化加载---------- @@ -2926,8 +2927,12 @@ Page({ price = th.data.prom_act.price; } + var title = th.data.sele_g.goods_name; 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; @@ -3035,7 +3040,11 @@ Page({ if (e.data.code == 0) arrdata = e.data.data.pageData; }) if (!arrdata) return false; - + if(arrdata[0]){ + tt.setData({ + new_share_imgurl:arrdata[0].share_imgurl + }) + } var arrsku = new Array(); var gitem = null; var gb = 1, @@ -6650,6 +6659,9 @@ Page({ if ((this.data.prom_type == 1 || this.data.prom_type == 6) && this.data.prom_act.share_imgurl) { img_url = this.data.iurl + this.data.prom_act.share_imgurl; } + if (this.data.new_share_imgurl) { + img_url=this.data.iurl + this.data.new_share_imgurl + } //获取商品是分享图信息 wx.getImageInfo({ @@ -7894,6 +7906,7 @@ Page({ }, send() { + this.setData({ share_hidden: false, }); -- libgit2 0.21.4