Commit c4c7bb7d84bfc472e388032c33c82fd0c5d737fb
1 parent
049a3dde
分享图片的优化
Showing
1 changed file
with
11 additions
and
3 deletions
pages/goods/goodsList/goodsList.js
@@ -509,12 +509,20 @@ Page({ | @@ -509,12 +509,20 @@ Page({ | ||
509 | } | 509 | } |
510 | } | 510 | } |
511 | console.log("11-11"+pagePath); | 511 | console.log("11-11"+pagePath); |
512 | - let share_imgurl=this.data.iurl + this.data.share_imgurl | ||
513 | - return { | 512 | + |
513 | + | ||
514 | + //分享的数组 | ||
515 | + let share_dd={ | ||
514 | title: "商品列表", | 516 | title: "商品列表", |
515 | path:pagePath, | 517 | path:pagePath, |
516 | - imageUrl:share_imgurl | ||
517 | } | 518 | } |
519 | + //有图片才分享图片 | ||
520 | + if(this.data.share_imgurl){ | ||
521 | + let share_imgurl=this.data.iurl + this.data.share_imgurl; | ||
522 | + share_dd.imageUrl=share_imgurl; | ||
523 | + } | ||
524 | + | ||
525 | + return share_dd; | ||
518 | }, | 526 | }, |
519 | //---图片失败,默认图片--- | 527 | //---图片失败,默认图片--- |
520 | bind_bnerr2: function (e) { | 528 | bind_bnerr2: function (e) { |