Authored by 李靖

Merge branch 'master' into feature/guangV3

... ... @@ -344,7 +344,12 @@ const listNew = (req, res, next) => {
}
if (params.sort_name) {
seoTitle = decodeURIComponent(params.sort_name);
try {
seoTitle = decodeURIComponent(params.sort_name);
} catch (e) {
logger.error('decodeURIComponent seoTitle: ' + e);
return res.redirect('/');
}
}
try {
... ...
... ... @@ -69,6 +69,7 @@ module.exports = () => {
let appUid = req.query.uid || req.cookies.app_uid;
let appVersion = req.cookies.app_version || req.query.app_version || config.appVersion;
let appSessionType = req.query.client_type || req.cookies.app_client_type;
let sessionKey = req.query.session_key || req.cookies.app_session_key;
if (req.query.app_version && req.query.client_type) {
logger.warn(`app session from querystring, url:${req.originalUrl}`);
... ... @@ -79,6 +80,7 @@ module.exports = () => {
return _.parseInt(appUid);
},
appVersion: appVersion,
sessionKey: sessionKey,
appSessionType: appSessionType
};
... ...
{
"name": "yohobuywap-node",
"version": "6.2.33",
"version": "6.2.34",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -3,7 +3,7 @@
{
"name": "yohobuywap-node",
"script": "app.js",
"instances": "8",
"instances": "4",
"exec_mode": "cluster",
"merge_logs": true,
"log_date_format": "YYYY-MM-DD HH:mm:ss Z",
... ...
... ... @@ -28,7 +28,7 @@
</span>
{{/ comments}}
</div>
<a class="comment-content-footer tap-hightlight" href="{{commentsUrl}}">
<a class="comment-content-footer tap-hightlight" href="{{commentsUrl}}" rel="nofollow">
查看更多
<span class="iconfont">&#xe604;</span>
</a>
... ...
... ... @@ -203,12 +203,12 @@ module.exports = function(likeParameter) {
loading.hideLoadingMask();
page++;
$('.good-detail-text .name').each(function() {
let $this = $(this),
$title = $this.find('a');
// $('.good-detail-text .name').each(function() {
// let $this = $(this),
// $title = $this.find('a');
$title[0].mlellipsis(2);
});
// $title[0].mlellipsis(2);
// });
// 为您优选埋点 start
$(data).closest('.good-info').each(function() {
... ...
... ... @@ -257,7 +257,6 @@ $('.wei-share').on('touchend', function(e) {
// 接口暴露在HTML中,使用压缩名
(function() {
let isweixin = navigator.userAgent.indexOf('MicroMessenger') ? true : false;
let $this, $title;
// pagecache 前端判断是否显示头
let param = location.search;
... ... @@ -272,14 +271,14 @@ $('.wei-share').on('touchend', function(e) {
ellipsis.init();
if ($('.good-detail-text .name').length > 0) {
$('.good-detail-text .name').each(function() {
$this = $(this);
$title = $this.find('a');
// if ($('.good-detail-text .name').length > 0) {
// $('.good-detail-text .name').each(function() {
// $this = $(this);
// $title = $this.find('a');
$title[0].mlellipsis(2);
});
}
// $title[0].mlellipsis(2);
// });
// }
lazyLoad($('.lazy'));
// offset.left约等于marginLeft的值则表示介绍被换行,则清除intro的paddingTop让其更靠近头像和作者名
... ...
... ... @@ -26,7 +26,7 @@ let jumpToApp = $('#jump-to-app').val();
let mIntro, aIntro, logoImg;
let likeHammer, $goodName, $title;
let likeHammer;
require('plugin/wx-share');
require('common');
... ... @@ -41,14 +41,14 @@ lazyLoad($('img.lazy'));
$('.logo').attr('src', logoImg);
if ($('.good-detail-text .name').length > 0) {
$('.good-detail-text .name').each(function() {
$goodName = $(this);
$title = $goodName.find('a');
// if ($('.good-detail-text .name').length > 0) {
// $('.good-detail-text .name').each(function() {
// $goodName = $(this);
// $title = $goodName.find('a');
$title[0].mlellipsis(2);
});
}
// $title[0].mlellipsis(2);
// });
// }
// 获取截取文字和完整文字
setTimeout(function() {
... ...
... ... @@ -64,8 +64,6 @@ ListData.prototype.getListData = function(page) {
},
dataType: 'html',
success: function(data) {
let $this, $title;
self.opt.stopLoading = false;
if (data === '') {
... ... @@ -98,13 +96,13 @@ ListData.prototype.getListData = function(page) {
}
}
if ($('.good-detail-text').length > 0) {
$('.good-detail-text .name').each(function() {
$this = $(this);
$title = $this.find('a');
$title[0].mlellipsis(2);
});
}
// if ($('.good-detail-text').length > 0) {
// $('.good-detail-text .name').each(function() {
// $this = $(this);
// $title = $this.find('a');
// $title[0].mlellipsis(2);
// });
// }
loading.hideLoadingMask();
},
... ...
... ... @@ -113,14 +113,14 @@ let installment = {
});
},
setDetailText: function() { // 标题限制行数
let $this, $title;
// let $this, $title;
$('.good-detail-text .name').each(function() {
$this = $(this);
$title = $this.find('a');
// $('.good-detail-text .name').each(function() {
// $this = $(this);
// $title = $this.find('a');
$title[0].mlellipsis(2);
});
// $title[0].mlellipsis(2);
// });
},
tabChangeAction: function(dom) {
let self = this,
... ...
... ... @@ -276,12 +276,12 @@ function search(opt) {
lazyLoad($container.find('.good-info:gt(' + (num - 1) + ') .lazy'));
}
$('.good-detail-text .name').each(function() {
let $this = $(this),
$title = $this.find('a');
// $('.good-detail-text .name').each(function() {
// let $this = $(this),
// $title = $this.find('a');
$title[0].mlellipsis(2);
});
// $title[0].mlellipsis(2);
// });
}
nav.reload = false;
... ...
... ... @@ -60,12 +60,12 @@ $(function() {
$vipFloor.html(res).addClass('goods-container');
lazyload($vipFloor.find('img.lazy'));
$('.good-detail-text .name').each(function() {
let $this = $(this),
$title = $this.find('a');
// $('.good-detail-text .name').each(function() {
// let $this = $(this),
// $title = $this.find('a');
$title[0].mlellipsis(2);
});
// $title[0].mlellipsis(2);
// });
$vipFloor.css('padding-bottom', '0.75rem');
}
... ...
... ... @@ -334,12 +334,12 @@ function search(opt, params, isScroll) {
window.rePosFooter();
$('.good-detail-text .name').each(function() {
let $this = $(this),
$title = $this.find('a');
// $('.good-detail-text .name').each(function() {
// let $this = $(this),
// $title = $this.find('a');
$title[0].mlellipsis(2);
});
// $title[0].mlellipsis(2);
// });
},
error: function() {
tip.show('网络断开连接了~');
... ...
... ... @@ -302,8 +302,6 @@ function search(opt) {
nav,
navType,
page,
$this,
$title,
params;
if (searching) {
... ... @@ -696,12 +694,12 @@ function search(opt) {
firstScreen = false;
$('.good-detail-text .name').each(function() {
$this = $(this);
$title = $this.find('a');
// $('.good-detail-text .name').each(function() {
// $this = $(this);
// $title = $this.find('a');
$title[0].mlellipsis(2);
});
// $title[0].mlellipsis(2);
// });
// 用于统计点击了商品列表的第几个商品,序号从1开始计算。
if (window._yas) {
... ...
... ... @@ -222,8 +222,6 @@ function search(opt) {
nav,
navType,
page,
$this,
$title,
params;
if (searching) {
... ... @@ -535,12 +533,12 @@ function search(opt) {
window.rePosFooter();
$('.good-detail-text .name').each(function() {
$this = $(this);
$title = $this.find('a');
// $('.good-detail-text .name').each(function() {
// $this = $(this);
// $title = $this.find('a');
$title[0].mlellipsis(2);
});
// $title[0].mlellipsis(2);
// });
// 用于统计点击了商品列表的第几个商品,序号从1开始计算。
if (window._yas) {
... ...