Authored by 沈志敏

merge master to bigdata_burying

... ... @@ -1524,7 +1524,10 @@ let getNewProductAsyncData = (data) => {
}
params.is_student = data.isStudent ? 1 : 0;
params.current_vip_level = data.vipLevel;
if (!params.is_student) {
params.current_vip_level = data.vipLevel;
}
return api.get('', params, {
code: 200,
... ... @@ -1658,6 +1661,10 @@ let _detailDataPkgAsync = (origin, uid, vipLevel, ua) => {
goodsPrice.previousPrice = origin.format_market_price;
}
if (origin.student_price) {
goodsPrice.studentPrice = origin.student_price;
}
dest.goodsPrice = goodsPrice;
if (origin.is_secKill) {
... ... @@ -1746,7 +1753,7 @@ let _detailDataPkgAsync = (origin, uid, vipLevel, ua) => {
};
allSizeList[sizeName] = (allSizeList[sizeName] === null ||
typeof allSizeList[sizeName] === 'undefined') ? build : allSizeList[sizeName];
typeof allSizeList[sizeName] === 'undefined') ? build : allSizeList[sizeName];
colorStorageNum += parseInt(size.storage_number, 10);
colorStorageGroup[value.product_skc][sizeName] = parseInt(size.storage_number, 10);
});
... ...
... ... @@ -31,10 +31,10 @@ module.exports = {
// service: 'http://192.168.102.205:8080/gateway/',
// search: 'http://192.168.102.216:8080/yohosearch/'
//api: 'http://api.yoho.yohoops.org/',
//service: 'http://service.yoho.yohoops.org/',
//liveApi: 'http://api.live.yoho.cn/',
//singleApi: 'http://single.yoho.cn/'
// api: 'http://api.yoho.yohoops.org/',
// service: 'http://service.yoho.yohoops.org/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/'
// api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
... ... @@ -122,7 +122,7 @@ if (isProduction) {
open: false,
url: 'http://123.206.2.55/strategy'
},
zookeeperServer: 'zookeeper.web.yohoops.org:2181'
zookeeperServer: 'web.zookeeper.yohoops.org:2181'
});
} else if (isTest) {
Object.assign(module.exports, {
... ...
... ... @@ -4,8 +4,8 @@ const cookie = global.yoho.cookie;
module.exports = () => {
return (req, res, next) => {
// 从 SESSION 中获取到当前登录用户的 UID
if (req.session && _.isNumber(req.session._LOGIN_UID)) {
req.user.uid = req.session._LOGIN_UID;
if (req.session && _.isNumber(req.session.LOGIN_UID)) {
req.user.uid = req.session.LOGIN_UID;
}
// session 没有读取到的时候,从 cookie 读取 UID
... ...
... ... @@ -35,7 +35,11 @@
{{#ifor localCss vue}}
<link rel="stylesheet" media="all" href="//{{devHost}}:5001/bundle/{{module}}.{{page}}.css">
{{^}}
<link rel="stylesheet" media="all" href="//{{devHost}}:5001/bundle/index.css">
{{#if shopPage}}
<link rel="stylesheet" media="all" href="//{{devHost}}:5001/bundle/shop.css">
{{^}}
<link rel="stylesheet" media="all" href="//{{devHost}}:5001/bundle/index.css">
{{/if}}
{{/ifor}}
{{^}}
... ... @@ -45,7 +49,11 @@
{{#ifor localCss vue}}
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/{{module}}.{{page}}.css">
{{^}}
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/index.css">
{{#if shopPage}}
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/shop.css">
{{^}}
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/index.css">
{{/if}}
{{/ifor}}
{{/if}}
<link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
... ...
... ... @@ -16,8 +16,9 @@ var $nav = $('.category-nav'),
require('../common');
function resetHeight() {
var h = document.body.scrollHeight - $search.outerHeight() - $nav.outerHeight();
$contents.height(h);
var h = document.body.scrollHeight - $search.outerHeight() - $nav.outerHeight();
$contents.height(h);
}
resetHeight();
... ... @@ -73,7 +74,7 @@ $categoryContainer.on('touchend', function(e) {
$subLevel.eq(index).removeClass('hide');
}
if ($this.find('a').attr('href')) {
if ($this[0] && $this[0].tagName === 'LI' && $this.find('a').attr('href')) {
location.href = $this.find('a').attr('href');
}
});
... ...
... ... @@ -113,7 +113,7 @@ function subClassifyTapEvt($this) {
fCbFn({
type: $sub.data('type'),
id: id
});
}, true);
}
if (hCbFn) {
... ...
... ... @@ -244,7 +244,7 @@ C_ID = window._ChannelVary[window.cookie('_Channel')];
* 需要执行search的场景:1.点选筛选项;2.relaod为true时切换导航;3.下拉加载
* @param opt {type, id}
*/
function search(opt) {
function search(opt, filtering) {
var setting = {},
ext,
att,
... ... @@ -465,7 +465,7 @@ function search(opt) {
argument = setting;
if (!firstScreen) {
if (filtering) {
$fsgc.addClass('hide');
}
... ... @@ -854,7 +854,7 @@ $newList.on('touchstart', 'li', function(e) {
break;
}
$pre = $firstLiDom;
search();
search({}, true);
});
$(document).on('touchstart', function(e) {
... ...