Authored by 李靖

Merge branch 'feature/mip' of git.yoho.cn:fe/yohobuywap-node into feature/mip

... ... @@ -65,7 +65,7 @@ module.exports = {
// mip-iframe
$('iframe').each(function() {
let $this = $(this);
let mipIframe = `<mip-iframe layout="responsive" width="350" height="263" src="${$this.attr('src')}"></mip-iframe>`; // eslint-disable-line
let mipIframe = `<mip-iframe layout="responsive" width="350" height="263" src="${$this.attr('src')}" class="${$this.attr('class') || ''}"></mip-iframe>`; // eslint-disable-line
$this.replaceWith(mipIframe);
});
... ...
... ... @@ -24,8 +24,11 @@
{{/if}}
{{#if bigImage}}
<div class="big-pic">
<mip-img class="pic" src="{{image2 bigImage q=60}}">
</mip-img>
{{#if isGif}}
<mip-anim class="pic" src="{{image2 bigImage q=60}}"></mip-anim>
{{else}}
<mip-img class="pic" src="{{image2 bigImage q=60}}"></mip-img>
{{/if}}
{{#if tagList}}
<div class="tag-list-box">
{{#each tagList}}
... ... @@ -49,8 +52,11 @@
{{#if smallImage}}
<div class="small-pic">
{{# smallImage}}
<mip-img class="pic" src="{{image2 src q=60}}">
</mip-img>
{{#if isGif}}
<mip-anim class="pic" src="{{image2 src q=60}}"></mip-anim>
{{else}}
<mip-img class="pic" src="{{image2 src q=60}}"></mip-img>
{{/if}}
{{/ smallImage}}
</div>
{{/if}}
... ... @@ -83,7 +89,7 @@
{{#if moreLink}}
<mip-link class="more-goods" href="{{moreLink}}">更多商品</mip-link>
{{/if}}
{{#if recommendProducts}}
{{#if recommendProducts}}
<div class="recommend-goods">
<div class="good-scroll">
{{#each recommendProducts}}
... ...
... ... @@ -104,7 +104,7 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid) => {
};
let originUrl = helpers.urlFormat(colparam.urlpath || '/author/index', null, 'guang'); // 跳转回的链接
// 根据用户是否登录做处理的链接
let collectUrl = 'javascript:;'; // eslint-disable-line
let collectUrl = 'javascript:;'; // eslint-disable-line
if (!uid) {
let playUrlEncode = `${originUrl}${colparam.param}`.replace(/\//g, '\\\/');
... ... @@ -247,7 +247,8 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
finalDetail.push({
bigImage: helpers.image(_.get(value, 'singleImage.data[0].src', ''), 640, 640),
noLazy: index <= 3,
tagList: tagList
tagList: tagList,
isGif: /\.gif/i.test(_.get(value, 'singleImage.data[0].src', ''))
});
}
... ... @@ -256,12 +257,14 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
finalDetail.push({
smallImage: [
{
src: helpers.image(_.get(value, 'smallPic.data[0].src', ''), 315, 420)
src: helpers.image(_.get(value, 'smallPic.data[0].src', ''), 315, 420),
isGif: /\.gif/i.test(_.get(value, 'smallPic.data[0].src', ''))
},
{
src: helpers.image(_.get(value, 'smallPic.data[1].src', ''), 315, 420)
src: helpers.image(_.get(value, 'smallPic.data[1].src', ''), 315, 420),
isGif: /\.gif/i.test(_.get(value, 'smallPic.data[0].src', ''))
}
],
]
});
}
... ...