Authored by 李奇

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

... ... @@ -413,9 +413,13 @@
}
});
const href = location.href;
const mark = /\?/.test(href) ? '&' : '?';
const channel = cookie.get('_Channel') || 'men';
share({
title: this.entity.product_name,
link: `${location.href}?channel=${cookie.get('_Channel') || 'men'}`,
link: `${href}${mark}channel=${channel}`,
desc: '我在BLK发现了一个不错的商品,快来看看吧!',
imgUrl: this.firstImage.replace(/(\{width}|\{height}|\{mode})/g, function($0) {
const dict = {
... ...
... ... @@ -83,11 +83,15 @@
},
methods: {
share() {
const href = location.href;
const mark = /\?/.test(href) ? '&' : '?';
const channel = cookie.get('_Channel') || 'men';
yoho.goShare({
title: this.shareTitle || '',
des: '我在BLK发现了一个不错的商品,快来看看吧!',
img: location.protocol + this.shareImg,
url: `${location.href}?channel=${cookie.get('_Channel') || 'men'}`
url: `${href}${mark}channel=${channel}`
});
},
toggleFavorite: function() {
... ...