Authored by 陈峰

guang remove sharecode

... ... @@ -267,7 +267,6 @@ class DetailModel extends global.yoho.BaseModel {
promises.push(
this._getLeftNav(navGender),
this._getShareData(id)
);
}
... ... @@ -314,46 +313,6 @@ class DetailModel extends global.yoho.BaseModel {
});
}
if (isShare && datas[5]) {
if (datas[5].wechatShareImgUrl) {
datas[5].wechatShareImgUrl =
datas[5].wechatShareImgUrl.substring(datas[5].wechatShareImgUrl.indexOf('//'));
if (datas[5].wechatShareImgUrl.indexOf('?') === -1) {
datas[5].wechatShareImgUrl = datas[5].wechatShareImgUrl +
'?imageView2/2/interlace/1/q/75';
}
} else if (datas[5].qqShareImgUrl) {
datas[5].qqShareImgUrl =
datas[5].qqShareImgUrl.substring(datas[5].qqShareImgUrl.indexOf('//'));
if (datas[5].qqShareImgUrl.indexOf('?') === -1) {
datas[5].qqShareImgUrl = datas[5].wechatShareImgUrl + '?imageView2/2/interlace/1/q/75';
}
} else if (datas[5].showShareImgUrl) {
datas[5].showShareImgUrl =
datas[5].showShareImgUrl.substring(datas[5].showShareImgUrl.indexOf('//'));
if (datas[5].showShareImgUrl.indexOf('?') === -1) {
datas[5].showShareImgUrl = datas[5].showShareImgUrl + '?imageView2/2/interlace/1/q/75';
}
}
let preCount = 0;
let i;
for (i = 0; i < getArticleContent.length; i++) {
if (getArticleContent[i].singleImage ||
getArticleContent[i].text || getArticleContent[i].smallPic) {
preCount = i + 1;
}
}
getArticleContent.splice(preCount, 0, {
shareCode: datas[5]
});
}
if (datas[0]) {
result.getAuthor = datas[0].data;
}
... ...
... ... @@ -73,14 +73,6 @@
</div>
{{/if}}
{{#if shareCode}}
<div class="share-code">
{{# shareCode}}
<img class="wei-share" src="{{image2 codeShare q=60}}"></img>
{{/ shareCode}}
</div>
{{/if}}
{{#video}}
<video src="{{src}}" controls="controls" poster="{{image2 cover_image q=60}}" preload="none">不好意思,您的浏览器不支持此视频!</video>
{{/video}}
... ... @@ -256,6 +248,10 @@
if (isWechat || isqq || isWeibo) {
document.getElementById('guang-header').classList.remove('hide');
document.getElementById('yoho-header').classList.add('hide');
const $header = document.getElementById('yoho-header');
if ($header) {
$header.classList.add('hide');
}
}
</script>
... ...
... ... @@ -241,7 +241,6 @@ class DetailModel extends global.yoho.BaseModel {
promises.push(
this._getLeftNav(navGender),
this._getShareData(id)
);
}
... ... @@ -276,46 +275,6 @@ class DetailModel extends global.yoho.BaseModel {
});
}
if (isShare && datas[5]) {
if (datas[5].wechatShareImgUrl) {
datas[5].wechatShareImgUrl =
datas[5].wechatShareImgUrl.substring(datas[5].wechatShareImgUrl.indexOf('//'));
if (datas[5].wechatShareImgUrl.indexOf('?') === -1) {
datas[5].wechatShareImgUrl = datas[5].wechatShareImgUrl +
'?imageView2/2/interlace/1/q/75';
}
} else if (datas[5].qqShareImgUrl) {
datas[5].qqShareImgUrl =
datas[5].qqShareImgUrl.substring(datas[5].qqShareImgUrl.indexOf('//'));
if (datas[5].qqShareImgUrl.indexOf('?') === -1) {
datas[5].qqShareImgUrl = datas[5].wechatShareImgUrl + '?imageView2/2/interlace/1/q/75';
}
} else if (datas[5].showShareImgUrl) {
datas[5].showShareImgUrl =
datas[5].showShareImgUrl.substring(datas[5].showShareImgUrl.indexOf('//'));
if (datas[5].showShareImgUrl.indexOf('?') === -1) {
datas[5].showShareImgUrl = datas[5].showShareImgUrl + '?imageView2/2/interlace/1/q/75';
}
}
let preCount = 0;
let i;
for (i = 0; i < getArticleContent.length; i++) {
if (getArticleContent[i].singleImage ||
getArticleContent[i].text || getArticleContent[i].smallPic) {
preCount = i + 1;
}
}
getArticleContent.splice(preCount, 0, {
shareCode: datas[5]
});
}
if (datas[0]) {
result.getAuthor = datas[0].data;
}
... ...
... ... @@ -334,30 +334,6 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
});
}
// 分享?
if (_.get(value, 'shareCode', false)) {
let shareCode = false;
if (isWeixin) {
shareCode = _.get(value, 'shareCode.wechatShareImgUrl', false);
}
if (isqq) {
shareCode = _.get(value, 'shareCode.qqShareImgUrl', false);
}
if (isWeibo) {
shareCode = _.get(value, 'shareCode.showShareImgUrl', false);
}
if (shareCode) {
finalDetail.push({
shareCode: [{
codeShare: shareCode
}]
});
}
}
// 改变关联商品显示形式,false:默认单列多行,true:改成俩列多行
let changeDisplayType = _.get(value, 'goods.display_template') === '2';
... ...