Authored by 沈志敏

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

... ... @@ -16,6 +16,7 @@ const camelCase = global.yoho.camelCase;
*/
const component = {
index(req, res) {
res.locals.title = req.query.shareTitle;
res.render('detail', {
module: 'editorial',
page: 'detail',
... ...
... ... @@ -25,7 +25,8 @@ exports.applySuccuss = function(type, applyId) {
header.title.des = `${kind.name}状态`;
return yoho.goNewPage({
header: header,
url: location.origin + kind.detailUrl
url: location.origin + kind.detailUrl,
backThrough: '1'
});
};
... ...
... ... @@ -29,6 +29,12 @@
};
</script>
<style>
.blk-header-wrap.ghost {
.blk-header {
background-color: transparent;
transition: 0.3s all;
}
}
.blk-header {
box-sizing: content-box;
position: fixed;
... ...
... ... @@ -216,7 +216,6 @@
if (article && article.code === 200 && article.data) {
this.article = article.data;
document.title = this.article.articleTitle;
}
if (content && content.code === 200 && content.data) {
... ...
... ... @@ -38,7 +38,7 @@
.title {
background: #fff;
font-size: 42px;
line-height: 45px;
line-height: 46px;
font-weight: 700;
padding: 10px 20px;
}
... ... @@ -129,12 +129,13 @@
/* 分享资讯 */
share(title, des, img, id) {
title = title.substr(0,15)+'...';
img = util.getImgUrl(img, 300, 300, 2);
yoho.goShare({
title: title,
des: des,
img: img,
url: `${location.origin}/editorial/${id}.html`
url: `${location.origin}/editorial/${id}.html?$shareTitle=${title}`
});
}
},
... ...
... ... @@ -91,11 +91,13 @@
});
},
share: function() {
const title = this.article.articleTitle.substr(0,15)+'...';
yoho.goShare({
title: this.article.articleTitle,
title,
des: '优质精选,BLK潮流资讯为你呈现',
img: util.getImgUrl(this.article.coverImage, 300, 300, 2),
url: `${location.origin}/editorial/${this.article.id}.html`
url: `${location.origin}/editorial/${this.article.id}.html?shareTitle=${title}`
});
}
},
... ...
... ... @@ -24,10 +24,6 @@
</a>
</show-box>
<div class="separator" v-if="isApp"><span>继续拖动,查看商品信息</span>
<hr/>
</div>
<show-box v-if="intro.productDescBo">
<h2>商品信息</h2>
<i>DESCRIPTION</i>
... ... @@ -238,27 +234,6 @@
}
}
.separator {
text-align: center;
color: #c4c4c4;
height: 110px;
line-height: 110px;
margin-bottom: -20px;
span {
background: #f6f6f6;
padding: 0 15px;
}
hr {
max-width: 512px;
margin-top: -55px;
border: none;
border-top: 1px solid #eee;
}
}
i.info {
font-style: normal;
color: #b0b0b0;
... ... @@ -514,7 +489,6 @@
created() {
const self = this;
const pid = app.data('pid');
let loadIntroDeferred;
// 显示商品特征选择组件
this.$on('feature.close', function() {
... ... @@ -549,19 +523,10 @@
return result;
}).then((result)=> {
loadIntroDeferred = () => {
// 读取商品详情
$.get(`/product/product/intro_${pid}.json`, {skn: result.productPriceBo.productSkn}).then(intro => {
this.intro = intro;
});
};
});
$(window).on('scroll', ()=> {
if ($(window).scrollTop() > 200 && loadIntroDeferred) {
loadIntroDeferred();
loadIntroDeferred = null;
}
});
// 读取购物车数量
... ...
<template>
<cheader :title="sortName" class="top-nav">
<cheader title="商品详情" class="top-nav">
<i class="icon icon-share" slot="right" @click="share()"></i>
</cheader>
</template>
... ...
<template>
<div v-if="shopInfo.isBlkShop" class="brand-top-box" v-lazy:background-image="shopInfo.shopBg | resize 750 478">
<div class="brand-bottom">
<img v-if="shopInfo.shopLogo" v-lazy="shopInfo.shopLogo.replace('background/d2hpdGU=/', '') | resize 120 80" alt="{{ shopInfo.shopName }}">
<img v-if="shopInfo.shopLogo" v-lazy="shopInfo.shopLogo.split('?')[0] + '?imageMogr2/thumbnail/{width}x{height}' | resize 120 80" alt="{{ shopInfo.shopName }}">
<div v-else class="brand-title">{{ shopInfo.shopName }}</div>
<hr>
<div v-show="showMore" transition="brand-intro" v-bind:class="{ 'brand-short': !showMore }">{{ shopInfo.shopIntro }}</div>
... ...