Authored by 李奇

fixed: 分享链接添加频道参数再修改

@@ -413,9 +413,13 @@ @@ -413,9 +413,13 @@
413 } 413 }
414 }); 414 });
415 415
  416 + const href = location.href;
  417 + const mark = /\?/.test(href) ? '&' : '?';
  418 + const channel = cookie.get('_Channel') || 'men';
  419 +
416 share({ 420 share({
417 title: this.entity.product_name, 421 title: this.entity.product_name,
418 - link: `${location.href}?channel=${cookie.get('_Channel') || 'men'}`, 422 + link: `${href}${mark}channel=${channel}`,
419 desc: '我在BLK发现了一个不错的商品,快来看看吧!', 423 desc: '我在BLK发现了一个不错的商品,快来看看吧!',
420 imgUrl: this.firstImage.replace(/(\{width}|\{height}|\{mode})/g, function($0) { 424 imgUrl: this.firstImage.replace(/(\{width}|\{height}|\{mode})/g, function($0) {
421 const dict = { 425 const dict = {
@@ -83,11 +83,15 @@ @@ -83,11 +83,15 @@
83 }, 83 },
84 methods: { 84 methods: {
85 share() { 85 share() {
  86 + const href = location.href;
  87 + const mark = /\?/.test(href) ? '&' : '?';
  88 + const channel = cookie.get('_Channel') || 'men';
  89 +
86 yoho.goShare({ 90 yoho.goShare({
87 title: this.shareTitle || '', 91 title: this.shareTitle || '',
88 des: '我在BLK发现了一个不错的商品,快来看看吧!', 92 des: '我在BLK发现了一个不错的商品,快来看看吧!',
89 img: location.protocol + this.shareImg, 93 img: location.protocol + this.shareImg,
90 - url: `${location.href}?channel=${cookie.get('_Channel') || 'men'}` 94 + url: `${href}${mark}channel=${channel}`
91 }); 95 });
92 }, 96 },
93 toggleFavorite: function() { 97 toggleFavorite: function() {