Authored by 郭成尧

Merge branch 'hotfix/guangShare' into 'hotfix/removeCapture'

逛分享



See merge request !58
... ... @@ -232,14 +232,34 @@ const packageData = (id, isApp, isWeixin, channel, isShare) => {
});
}
if (isShare) {
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++;
preCount = i + 1;
}
}
... ... @@ -247,15 +267,6 @@ const packageData = (id, isApp, isWeixin, channel, isShare) => {
shareCode: datas[5]
});
// if (isWeixin && datas[5]) {
// getArticleContent.splice(preCount, 0, {
// shareCode: datas[5]
// });
// } else if (!isWeixin && datas[4]) {
// getArticleContent.splice(preCount, 0, {
// shareCode: datas[4]
// });
// }
}
if (datas[0]) {
... ...