Authored by 姜枫

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0

... ... @@ -53,8 +53,6 @@ const _processListData = (list) => {
return listData;
};
/**
* 首页、列表页列表相关
* @param type
... ... @@ -121,7 +119,7 @@ const getListData = (appType, pageNum, limit, udid, gender, tag, authorId) => {
*/
const _getAuthorData = (id) => {
return serviceAPI.get('/guang/service/*/author/getAuthor', {
return serviceAPI.get('guang/service/*/author/getAuthor', {
author_id: id
}).then((result) => {
if (result && result.code === 200) {
... ... @@ -182,7 +180,6 @@ const _processHeadData = (list) => {
}
if (index === 2) {
newData.headData = _.assign(newData.headData, {
commentNum: data.total
... ... @@ -358,7 +355,7 @@ const _getHeadData = (id, appType, uid, udid) => {
par.udid = udid;
}
return serviceAPI.get('/guang/api/*/article/getArticleBaseInfo', par).then((result) => {
return serviceAPI.get('guang/api/*/article/getArticleBaseInfo', par).then((result) => {
if (result && result.code === 200) {
return result.data;
} else {
... ... @@ -374,7 +371,7 @@ const _getHeadData = (id, appType, uid, udid) => {
* @returns {*}
*/
const _getContentData = (id) => {
return serviceAPI.get('/guang/service/*/article/getArticleContent', {
return serviceAPI.get('guang/service/*/article/getArticleContent', {
article_id: id
}).then((result) => {
if (result && result.code === 200) {
... ... @@ -392,7 +389,7 @@ const _getContentData = (id) => {
* @returns {*}
*/
const _getArticleData = (id) => {
return serviceAPI.get('/guang/service/v2/article/getArticle', {
return serviceAPI.get('guang/service/v2/article/getArticle', {
article_id: id
}).then((result) => {
if (result && result.code === 200) {
... ... @@ -410,7 +407,7 @@ const _getArticleData = (id) => {
* @returns {*}
*/
const _getCommentsData = (id) => {
return serviceAPI.get('/guang/api/*/comments/getList', {
return serviceAPI.get('guang/api/*/comments/getList', {
article_id: id
}).then((result) => {
if (result && result.code === 200) {
... ... @@ -457,7 +454,7 @@ const _getRelateBrand = (id) => {
* @returns {*}
*/
const _getArticlePre = (id, appType) => {
return serviceAPI.get('/guang/api/*/article/getArticlePre', {
return serviceAPI.get('guang/api/*/article/getArticlePre', {
id: id,
app_type: appType
}).then((result) => {
... ... @@ -491,7 +488,7 @@ const _getArticlePre = (id, appType) => {
* @returns {*}
*/
const _getArticleNext = (id, appType) => {
return serviceAPI.get('/guang/api/*/article/getArticleNext', {
return serviceAPI.get('guang/api/*/article/getArticleNext', {
id: id,
app_type: appType
}).then((result) => {
... ... @@ -534,7 +531,7 @@ const setCollect = (id, uid, appType) => {
message: '未登录'
});
}
return serviceAPI.get('/guang/api/*/favorite/setFavorite', {
return serviceAPI.get('guang/api/*/favorite/setFavorite', {
article_id: id,
uid: uid,
app_type: appType
... ... @@ -554,7 +551,7 @@ const cancelCollect = (id, uid, appType) => {
message: '未登录'
});
}
return serviceAPI.get('/guang/api/*/favorite/cancelFavorite', {
return serviceAPI.get('guang/api/*/favorite/cancelFavorite', {
article_id: id,
uid: uid,
app_type: appType
... ... @@ -569,7 +566,7 @@ const cancelCollect = (id, uid, appType) => {
*/
const setPraise = (id, udid, appType) => {
return serviceAPI.get('/guang/api/v2/praise/setPraise', {
return serviceAPI.get('guang/api/v2/praise/setPraise', {
article_id: id,
udid: udid,
app_type: appType
... ... @@ -584,7 +581,7 @@ const setPraise = (id, udid, appType) => {
*/
const cancelPraise = (id, udid, appType) => {
return serviceAPI.get('/guang/api/v2/praise/cancel', {
return serviceAPI.get('guang/api/v2/praise/cancel', {
article_id: id,
udid: udid,
app_type: appType
... ... @@ -605,7 +602,7 @@ const addComment = (id, uid, comment) => {
message: '未登录'
});
}
return serviceAPI.get('/guang/api/*/comments/add', {
return serviceAPI.get('guang/api/*/comments/add', {
article_id: id,
uid: uid,
content: comment
... ... @@ -613,7 +610,7 @@ const addComment = (id, uid, comment) => {
};
const shareData = () => {
return serviceAPI.get('/guang/api/*/share/guang', {}).then((result) => {
return serviceAPI.get('guang/api/*/share/guang', {}).then((result) => {
if (result && result.code === 200) {
return camelCase(result.data);
} else {
... ...
... ... @@ -18,9 +18,9 @@
<a class="author-name" href="{{authorUrl}}">{{name}}</a>
</div>
<div class="article-status">
<span class="article-time font">{{time}}</span>
<span class="article-browse font">浏览:{{click}}</span>
<span class="article-comments font">评论:{{commentNum}}</span>
<span class="article-time brown-light">{{time}}</span>
<span class="article-browse">浏览:<b class=" brown-light">{{click}}</b></span>
<span class="article-comments">评论:<b class="brown-light">{{commentNum}}</b></span>
</div>
</div>
{{/ header}}
... ...
... ... @@ -15,7 +15,7 @@
</div>
<div class="comment-info">
<p class="comment-content">{{content}}</p>
<p class="comment-time font">{{createTime}}</p>
<p class="comment-time brown-light">{{createTime}}</p>
</div>
</li>
{{/ list}}
... ...
<div class="content-msg clearfix" data-id="{{id}}">
<div class="msg-left"><i class="iconfont">&#xe606;</i> <span class="time-word font">{{publishTime}}</span></div>
<div class="msg-left"><i class="iconfont">&#xe606;</i> <span class="time-word font brown-light">{{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 font">{{praiseNum}}</b>
<b class="like-num brown-light font">{{praiseNum}}</b>
</span>
</div>
</div>
... ...
... ... @@ -196,6 +196,12 @@ const favorite = {
editorialList: data.data
};
_.forEach(retData.editorialList, function(val){
val.publishTime = val.publishTime.replace(/年|月/g, '/');
val.publishTime = val.publishTime.replace(/日/g, '');
})
retData.total = data.total;
retData.paginationData = {
page: page,
... ...
... ... @@ -23,9 +23,9 @@
</div>
<div class="editorial-some">
<span class="author">{{author.name}}</span>
<span class="time">{{publishTime}}</span>
<span>浏览: {{viewsNum}}</span>
<span>评论: {{praiseNum}}</span>
<span class="time brown-light">{{publishTime}}</span>
<span>浏览: <b class="brown-light">{{viewsNum}}</b></span>
<span>评论: <b class="brown-light">{{praiseNum}}</b></span>
</div>
<p class="summer">
{{intro}}
... ...
... ... @@ -121,7 +121,7 @@ function comment() {
var commentInfo = $('#comment-info').val();
if (commentInfo === '') {
new _alert('评论不能为空').show();
// new _alert('评论不能为空').show();
return false;
}
commenting = true;
... ...
... ... @@ -20,10 +20,6 @@
height: 40px;
}
.font {
font-family: '黑体';
}
.paging {
margin-top: 40px;
margin-bottom: 80px;
... ...
... ... @@ -11,7 +11,7 @@
line-height: 30px;
text-align: center;
border-bottom: 1px solid #bbb;
color: #a0a0a0;
color: #999;
}
.msg-right {
... ... @@ -30,7 +30,7 @@
.msg-title {
font-size: 20px;
color: #333;
color: #1b1b1b;
line-height: 30px;
max-height: 64px;
overflow: hidden;
... ... @@ -42,7 +42,7 @@
}
.msg-title:hover {
color: #ff1414;
color: #379ed6;
}
.lazy {
... ... @@ -86,7 +86,7 @@
}
.like-comment {
color: #a6a6a6;
color: #999;
cursor: pointer;
font-size: 14px;
... ...