Commit 01648a789f7c5275d1a320f5f96eb98f88df7aed
Merge branch 'dev_oa_luo14' into dev
Showing
5 changed files
with
45 additions
and
5 deletions
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -6870,10 +6870,11 @@ Page({ |
| 6870 | 6870 | if (getApp().globalData.groupchat_id) { |
| 6871 | 6871 | pagePath+="&groupchat_id="+getApp().globalData.groupchat_id |
| 6872 | 6872 | } |
| 6873 | - | |
| 6873 | + let imgPath = this.data.iurl + this.data.luckGoInfo.original_img; | |
| 6874 | 6874 | return { |
| 6875 | 6875 | title: this.data.data.goods_name + '-' + store_name, |
| 6876 | - imageUrl: this.data.gallery[0].image_url, | |
| 6876 | + // imageUrl: this.data.gallery[0].image_url, | |
| 6877 | + imageUrl: imgPath, | |
| 6877 | 6878 | query: pagePath |
| 6878 | 6879 | } |
| 6879 | 6880 | }, | ... | ... |
packageC/pages/presell/goodsInfo/goodsInfo.js
| ... | ... | @@ -4492,11 +4492,12 @@ Page({ |
| 4492 | 4492 | if (getApp().globalData.groupchat_id) { |
| 4493 | 4493 | url+="&groupchat_id="+getApp().globalData.groupchat_id |
| 4494 | 4494 | } |
| 4495 | - | |
| 4495 | + let img = this.data.data.original_img; | |
| 4496 | 4496 | return { |
| 4497 | 4497 | title: this.data.data.goods_name + '-' + store_name, |
| 4498 | 4498 | query: 'first_leader='+user_id+url, |
| 4499 | - imageUrl: this.data.gallery[0].image_url, | |
| 4499 | + // imageUrl: this.data.gallery[0].image_url, | |
| 4500 | + imageUrl: img | |
| 4500 | 4501 | } |
| 4501 | 4502 | }, |
| 4502 | 4503 | ... | ... |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
| ... | ... | @@ -301,6 +301,7 @@ Page({ |
| 301 | 301 | arr2[j].giftTitle=arr2[j].act_name |
| 302 | 302 | arr2[j].virtualsales=arr2[j].virtualSales |
| 303 | 303 | arr2[j].lbnum=arr2[j].lbNum |
| 304 | + | |
| 304 | 305 | } |
| 305 | 306 | if(arr2.length>0){ |
| 306 | 307 | var monthgiftbag =arr2[0]; |
| ... | ... | @@ -320,6 +321,7 @@ Page({ |
| 320 | 321 | isStart, |
| 321 | 322 | monthgiftbag: monthgiftbag, |
| 322 | 323 | sele_g: monthgiftbag, |
| 324 | + default_color:monthgiftbag.bg_color | |
| 323 | 325 | }) |
| 324 | 326 | th.init() |
| 325 | 327 | }else{ | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -8044,9 +8044,25 @@ Page({ |
| 8044 | 8044 | url += "&groupchat_id=" + getApp().globalData.groupchat_id |
| 8045 | 8045 | } |
| 8046 | 8046 | |
| 8047 | + //获取有活动的取活动图片,没有活动的取主图 | |
| 8048 | + var img = th.data.sele_g.original_img; | |
| 8049 | + if(th.data.new_share_imgurl){ | |
| 8050 | + img = th.data.iurl + th.data.new_share_imgurl | |
| 8051 | + } | |
| 8052 | + if (th.data.prom_type == 6 || th.data.prom_type == 1 || th.data.prom_type == 4) { | |
| 8053 | + // title = th.data.prom_act.share_title; | |
| 8054 | + // if (!title) title = th.data.prom_act.title; | |
| 8055 | + // if (th.data.prom_type == 4) title = th.data.prom_act.name; | |
| 8056 | + | |
| 8057 | + if (th.data.prom_act.share_imgurl) | |
| 8058 | + img = th.data.iurl + th.data.prom_act.share_imgurl; | |
| 8059 | + } | |
| 8060 | + let user_id = getApp().globalData.user_id | |
| 8061 | + console.error(img); | |
| 8047 | 8062 | return { |
| 8048 | 8063 | title: this.data.data.goods_name + '-' + store_name, |
| 8049 | - imageUrl: this.data.gallery[0].image_url, | |
| 8064 | + // imageUrl: this.data.gallery[0].image_url, | |
| 8065 | + imageUrl: img, | |
| 8050 | 8066 | query: 'first_leader=' + user_id + url |
| 8051 | 8067 | } |
| 8052 | 8068 | }, | ... | ... |
pages/goods/goodsList/goodsList.js
| ... | ... | @@ -43,10 +43,16 @@ Page({ |
| 43 | 43 | fil_price_state:0, |
| 44 | 44 | limit_num:0, |
| 45 | 45 | gr_fir:0, //分组第一次 |
| 46 | + share_imgurl:'', //分享图片 | |
| 46 | 47 | }, |
| 47 | 48 | |
| 48 | 49 | onLoad: function(t) { |
| 50 | + //----------商品分组自定义分享图片---------- | |
| 51 | + if (t.gid) { | |
| 52 | + this.get_share_imgurl(t.gid) //获取分享图片 | |
| 53 | + } | |
| 49 | 54 | |
| 55 | + //---------------------end------------ | |
| 50 | 56 | this.data.rq_data=t; |
| 51 | 57 | |
| 52 | 58 | //接受有没有导购的参数 |
| ... | ... | @@ -241,6 +247,18 @@ Page({ |
| 241 | 247 | onShow:function () { |
| 242 | 248 | getApp().check_can_share(); |
| 243 | 249 | }, |
| 250 | + //获取商品分组分享图片 | |
| 251 | + get_share_imgurl(gid){ | |
| 252 | + getApp().request.promiseGet("/api/weshop/goodsGroup/get/" + oo.stoid + "/" + gid, {}).then(res => { | |
| 253 | + if (res.data.code == 0) { | |
| 254 | + let prom = res.data.data; | |
| 255 | + let share_imgurl =prom.share_imgurl | |
| 256 | + this.setData({ | |
| 257 | + share_imgurl | |
| 258 | + }) | |
| 259 | + } | |
| 260 | + }) | |
| 261 | + }, | |
| 244 | 262 | //获取优惠活动 |
| 245 | 263 | async getprom(prom_id){ |
| 246 | 264 | await getApp().request.promiseGet("/api/weshop/promgoods/get/" + oo.stoid + "/" + prom_id, {}).then(res => { |
| ... | ... | @@ -487,9 +505,11 @@ Page({ |
| 487 | 505 | } |
| 488 | 506 | } |
| 489 | 507 | console.log("11-11"+pagePath); |
| 508 | + let share_imgurl=this.data.iurl + this.data.share_imgurl | |
| 490 | 509 | return { |
| 491 | 510 | title: "商品列表", |
| 492 | 511 | path:pagePath, |
| 512 | + imageUrl:share_imgurl | |
| 493 | 513 | } |
| 494 | 514 | }, |
| 495 | 515 | //---图片失败,默认图片--- | ... | ... |