Authored by 王水玲

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

... ... @@ -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,20 @@ 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(list);
perArticle.lastChapter = list.title;
}).then(() => {
console.log(perArticle);
return perArticle;
});
... ... @@ -491,7 +496,7 @@ const _getArticleNext = (id, appType) => {
id: id,
app_type: appType
}).then((result) => {
// console.log(result)
if (result && result.code === 200) {
let nextArticle = {};
... ... @@ -624,7 +629,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>
... ...
... ... @@ -730,6 +730,13 @@ 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;
if (result[1] && result[1].data) {
... ...
... ... @@ -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>
... ...
... ... @@ -32,7 +32,7 @@ const _doPassportCallback = (req, res, user) => {
refer = !BlockRedirectFilter.test(decodeURI(refer)) ? decodeURI(refer) : config.siteUrl;
if (user.openId && user.nickname) {
if (user.openId) {
let signinByOpenID = LoginService.signinByOpenIDAsync(
_.trim(user.nickname), _.trim(user.openId),
_.trim(user.sourceType), _.trim(shoppingKey),
... ...
... ... @@ -30,9 +30,9 @@ module.exports = {
useOneapm: false,
useCache: false,
memcache: {
master: ['192.168.102.205:12111'],
slave: ['192.168.102.205:12111'],
session: ['192.168.102.205:12111'],
master: ['127.0.0.1:11211'],
slave: ['127.0.0.1:11211'],
session: ['127.0.0.1:11211'],
timeout: 1000,
retries: 0
},
... ...
var _alert = require('../plugins/dialog').Alert;
var lazyLoad = require('yoho-jquery-lazyload');
var Confirm = require('../plugins/dialog').Confirm;
lazyLoad($('img.banner-img'));
... ... @@ -7,24 +8,27 @@ lazyLoad($('img.banner-img'));
require('./me');
$('.cancel-apply').on('click', function() {
var id = $(this).data('applyId');
var type = $(this).data('type');
var $this = $(this);
$.ajax({
url: '/me/return/cancel',
method: 'POST',
data: {
type: type,
id: id
new Confirm({
content: '<h1 class="title">取消申请</h1><p>您确定要取消申请么?</p>',
cb: function() {
$.ajax({
url: '/me/return/cancel',
method: 'POST',
data: {
type: $this.data('applyId'),
id: $this.data('type')
}
}).done(function(result) {
if (result.code === 200) {
location.reload();
} else {
new _alert(result.message).show();
}
}).fail(function() {
new _alert('出错了').show();
});
}
}).done(function(result) {
if (result.code === 200) {
location.reload();
} else {
new _alert(result.message).show();
}
}).fail(function(err) {
console.log(err);
new _alert('出错了').show();
});
}).show();
});
... ...
... ... @@ -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;
}
}
}
}
... ...
... ... @@ -150,6 +150,7 @@
.with-bottom-space {
margin-bottom: $smallSpace;
line-height: 20px;
}
span {
... ... @@ -180,6 +181,7 @@
&.last {
border-bottom: none;
line-height: 20px;
}
}
}
... ... @@ -219,6 +221,7 @@
p {
margin-bottom: $space;
line-height: 20px;
}
.pay-operation {
... ...