Authored by zhangxiaoru

editorial样式

... ... @@ -171,7 +171,7 @@ const detail = (req, res, next) => {
link = 'http://www.yohoblk.com/lifestyle';
}
editorialModel.getDetailData(id, uid, udid, appType).then((result) => {
editorialModel.getDetailData(id, appType, uid, udid).then((result) => {
res.display('detail', {
module: 'editorial',
page: 'detail',
... ... @@ -200,11 +200,6 @@ const detail = (req, res, next) => {
userInfo: result.head,
comment: result.comment,
brands: result.brands,
// article: {
// nextChapter: '来来来,让我们好好聊聊',
// lastChapter: '除了黑白灰'
// },
nextArticle: result.nextArticle,
perArticle: result.perArticle,
share: {
... ... @@ -212,8 +207,6 @@ const detail = (req, res, next) => {
shareDesc: result.head.title,
weixinUrl: result.head.weixinUrl
}
},
helpers: {
// import component, path depends on your project
... ...
... ... @@ -344,10 +344,9 @@ const _processContentData = (list) => {
* @returns {*}
*/
const _getHeadData = (id, uid, udid, appType) => {
const _getHeadData = (id, appType, uid, udid) => {
let par = {
id: id,
udid: udid,
app_type: appType
};
... ... @@ -355,6 +354,10 @@ const _getHeadData = (id, uid, udid, appType) => {
par.uid = uid;
}
if (udid) {
par.udid = udid;
}
return serviceAPI.get('/guang/api/*/article/getArticleBaseInfo', par).then((result) => {
if (result && result.code === 200) {
return result.data;
... ... @@ -458,18 +461,19 @@ const _getArticlePre = (id, appType) => {
id: id,
app_type: appType
}).then((result) => {
console.log(result);
console.log(result.message);
if (result && result.code === 200) {
let perArticle = {};
let id = result.data.articleIdPre;
perArticle.href = `${config.siteUrl}/editorial/${result.data.articleIdPre}.html`;
_getHeadData(result.data.articleIdPre, appType).then((list) => {
console.log()
_getHeadData(id, appType).then((list) => {
console.log(list)
perArticle.lastChapter = list.title;
}).then(() => {
console.log(perArticle)
return perArticle;
});
... ... @@ -491,7 +495,7 @@ const _getArticleNext = (id, appType) => {
id: id,
app_type: appType
}).then((result) => {
// console.log(result)
if (result && result.code === 200) {
let nextArticle = {};
... ... @@ -624,7 +628,7 @@ const shareData = () => {
*/
const getDetailData = (id, uid, udid, appType) => {
return co(function *() {
let result = yield Promise.all([_getHeadData(id, uid, udid, appType),
let result = yield Promise.all([_getHeadData(id, appType, uid, udid),
_getArticleData(id),
_getContentData(id),
_getCommentsData(id),
... ...
... ... @@ -18,9 +18,9 @@
<a class="author-name" href="{{authorUrl}}">{{name}}</a>
</div>
<div class="article-status">
<span class="article-time">{{time}}</span>
<span class="article-browse">浏览:{{click}}</span>
<span class="article-comments">评论:{{commentNum}}</span>
<span class="article-time font">{{time}}</span>
<span class="article-browse font">浏览:{{click}}</span>
<span class="article-comments font">评论:{{commentNum}}</span>
</div>
</div>
{{/ header}}
... ... @@ -37,7 +37,7 @@
{{# text}}
<div class="article-text block">
{{# data}}
<p>{{{text}}}</p>
{{{text}}}
{{/ data}}
</div>
{{/ text}}
... ...
... ... @@ -14,7 +14,7 @@
</div>
<div class="comment-info">
<p class="comment-content">{{content}}</p>
<p class="comment-time">{{createTime}}</p>
<p class="comment-time font">{{createTime}}</p>
</div>
</li>
{{/ list}}
... ...
<div class="content-msg clearfix" data-id="{{id}}">
<div class="msg-left"><i class="iconfont">&#xe606;</i> <b class="time-word">{{publishTime}}</b></div>
<div class="msg-left"><i class="iconfont">&#xe606;</i> <span class="time-word font">{{publishTime}}</span></div>
<div class="msg-right">
<a class="msg-title" href="/editorial/{{id}}.html" target="_blank">{{title}}</a>
<a href="/editorial/{{id}}.html" target="_blank">
... ... @@ -9,7 +9,7 @@
<div class="msg-app">
<span class="like-comment">
<i class="iconfont like-icon {{#if isPraise}}liked{{/if}}">&#xe60e;</i>
<b class="like-num">{{praiseNum}}</b>
<b class="like-num font">{{praiseNum}}</b>
</span>
</div>
</div>
... ...
... ... @@ -729,6 +729,12 @@ const getExchangeDetailData = (id, uid) => {
if (result[0] && result[0].data) {
let data = result[0].data;
//console.log(data)
_.forEach(data.goods_list, function(value) {
_.forEach(value.evidence_images, function(list, index) {
value.evidence_images[index] = list.substring(0, list.indexOf('?'));
});
});
data.expressId = data.notice.express_id;
... ...
... ... @@ -59,7 +59,7 @@
</div>
{{^}}
<div class="favorite-empty">
<p>您还没有收藏的资讯, 去<a href="{{siteUrl}}/editorial">首页</a>看看吧</p>
<p>您还没有收藏的资讯, 去<a href="{{siteUrl}}/editorial">资讯频道</a>看看吧</p>
</div>
{{/if}}
{{/data}}
... ...
... ... @@ -158,7 +158,7 @@
<div class="evidence">
{{# evidenceImages}}
<a href="{{.}}" target="_blank">
<img src="{{image . 70 90}}">
<img src="{{.}}">
</a>
{{/ evidenceImages}}
</div>
... ...
... ... @@ -3,7 +3,11 @@
.detail-body {
width: 990px;
margin: 0 auto;
margin: 30px auto;
}
.font {
font-family: '黑体';
}
.detail-title {
... ... @@ -81,8 +85,10 @@
}
.article-text {
p {
width: 700px;
margin: 25px auto;
p {
text-align: center;
display: block;
width: 700px;
... ... @@ -205,9 +211,8 @@
.brands {
width: 960px;
padding: 30px 0 30px 30px;
padding: 30px 0 0 30px;
overflow: hidden;
}
.brand {
... ... @@ -527,6 +532,12 @@
.share {
padding-left: 30px;
width: 330px;
margin-top: 30px;
margin-bottom: 15px;
.share-title {
margin-right: 5px;
}
}
.hide {
... ...
... ... @@ -19,6 +19,15 @@
width: 300px;
height: 40px;
}
.font {
font-family: '黑体';
}
.paging {
margin-top: 40px;
margin-bottom: 80px;
}
}
@import "msg";
... ...
... ... @@ -7,7 +7,7 @@
float: left;
width: 200px;
height: 30px;
margin-right: 80px;
margin-right: 90px;
line-height: 30px;
text-align: center;
border-bottom: 1px solid #bbb;
... ... @@ -56,13 +56,18 @@
font-size: 14px;
line-height: 24px;
word-wrap: break-word;
margin-top: 10px;
margin-top: 15px;
overflow: hidden;
word-wrap: break-word;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.msg-app {
height: 45px;
line-height: 45px;
height: 50px;
line-height: 50px;
font-size: 14px;
}
... ...
... ... @@ -109,15 +109,18 @@
.goods-info:hover,
.goods-info.choose {
.choose-icon {
display: block;
}
.tool-area {
.btn {
display: inline-block;
}
}
}
.goods-info.choose {
.choose-icon {
display: block;
}
}
}
}
... ...