Authored by 郭成尧

Merge remote-tracking branch 'origin/master' into feature/coupon

{
"extends": "yoho",
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module"
},
... ... @@ -10,4 +11,4 @@
"camelcase": "off"
}
}
\ No newline at end of file
}
... ...
... ... @@ -59,7 +59,7 @@ exports.submit = (req, res) => {
if (geetestRes) {
logger.info('geetest success');
let remoteIp = req.get('X-Forwarded-For') || req.ip;
let remoteIp = req.yoho.clientIp;
if (remoteIp.indexOf(',') > 0) {
let arr = remoteIp.split(',');
... ... @@ -67,7 +67,25 @@ exports.submit = (req, res) => {
remoteIp = arr[0];
}
let operations = [cache.delAsync(`${config.app}:limiter:${remoteIp}`)];
// pc:limiter:IP 和PC端共用
let operations = [cache.delAsync(`pc:limiter:${remoteIp}`)];
// 验证码之后一小时之内不再限制qps
if (req.session.apiLimitValidate) {
operations.push(cache.setAsync(
`${config.app}:limiter:api:ishuman:${remoteIp}`,
1,
config.LIMITER_IP_TIME
));
} else {
operations.push(cache.setAsync(
`${config.app}:limiter:ishuman:${remoteIp}`,
1,
config.LIMITER_IP_TIME
));
}
delete req.session.apiLimitValidate;
if (req.body.pid) {
let riskPid = decodeURIComponent(req.body.pid) + ':' + _.get(req.yoho, 'clientIp', '');
... ...
... ... @@ -117,39 +117,39 @@ router.get('/onlineservice', onlineService.getOnlineServiceInfo);
router.get('/onlineservicedetail', onlineService.getOnlineServiceDetail);
// 分期付款
router.get('/installment/index', installment.sessionKeyAuth, installment.index); // 开通分期首页
router.get('/installment/review', installment.sessionKeyAuth, installment.review); // 开通分期首页
router.get('/installment/starting-service', installment.sessionKeyAuth, installment.startingService); // 分期付款开通
router.get('/installment/starting-service/verify-code', installment.sessionKeyAuth, installment.verifyCode);
router.get('/installment/starting-service/check-verify-code', installment.sessionKeyAuth, installment.checkVerifyCode);
router.get('/installment/get-goods', installment.sessionKeyAuth, installment.getInstallmentGoods); // ajax请求分期专享商品数据
router.get('/installment/repay/overdue', installment.sessionKeyAuth, installment.overdueList); // 逾期未还款列表
router.get('/installment/repay/7daylist', installment.sessionKeyAuth, installment.sevenDayList); // 7日待还款列表
router.get('/installment/repay/month', installment.sessionKeyAuth, installment.monthRepayList); // 本月待还款列表
router.get('/installment/repay/total', installment.sessionKeyAuth, installment.totalRepayList); // 待还总金额列表
router.get('/installment/repay/record', installment.sessionKeyAuth, installment.repayRecordPage); // 还款记录
router.get('/installment/repay/get-record', installment.sessionKeyAuth, installment.getRepayRecord); // ajax请求还款记录
router.get('/installment/repay/detail', installment.sessionKeyAuth, installment.repayDetail); // 还款详情
router.get('/installment/account', installment.sessionKeyAuth, installment.account); // 账户管理
router.get('/installment/bind-card', installment.sessionKeyAuth, installment.bindCard); // 添加新银行卡
router.get('/installment/post-account', installment.sessionKeyAuth, installment.postAccount); // 添加新卡请求
router.get('/installment/bank-info', installment.sessionKeyAuth, installment.getBankInfo);
router.post('/installment/activate-service', installment.sessionKeyAuth, installment.activateService);
router.get('/installment/order', installment.sessionKeyAuth, installment.orderIndex);
router.get('/installment/order.html', installment.sessionKeyAuth, installment.orderList);
router.get('/installment/order/:id', installment.sessionKeyAuth, installment.orderDetail);
router.get('/installment/total-amount.json', installment.sessionKeyAuth, installment.totalAmount);
router.get('/installment/index', auth, installment.index); // 开通分期首页
router.get('/installment/review', auth, installment.review); // 开通分期首页
router.get('/installment/starting-service', auth, installment.startingService); // 分期付款开通
router.get('/installment/starting-service/verify-code', auth, installment.verifyCode);
router.get('/installment/starting-service/check-verify-code', auth, installment.checkVerifyCode);
router.get('/installment/get-goods', auth, installment.getInstallmentGoods); // ajax请求分期专享商品数据
router.get('/installment/repay/overdue', auth, installment.overdueList); // 逾期未还款列表
router.get('/installment/repay/7daylist', auth, installment.sevenDayList); // 7日待还款列表
router.get('/installment/repay/month', auth, installment.monthRepayList); // 本月待还款列表
router.get('/installment/repay/total', auth, installment.totalRepayList); // 待还总金额列表
router.get('/installment/repay/record', auth, installment.repayRecordPage); // 还款记录
router.get('/installment/repay/get-record', auth, installment.getRepayRecord); // ajax请求还款记录
router.get('/installment/repay/detail', auth, installment.repayDetail); // 还款详情
router.get('/installment/account', auth, installment.account); // 账户管理
router.get('/installment/bind-card', auth, installment.bindCard); // 添加新银行卡
router.get('/installment/post-account', auth, installment.postAccount); // 添加新卡请求
router.get('/installment/bank-info', auth, installment.getBankInfo);
router.post('/installment/activate-service', auth, installment.activateService);
router.get('/installment/order', auth, installment.orderIndex);
router.get('/installment/order.html', auth, installment.orderList);
router.get('/installment/order/:id', auth, installment.orderDetail);
router.get('/installment/total-amount.json', auth, installment.totalAmount);
router.get('/installment/help', installment.sessionKeyAuth, installment.help);// 帮助静态页面
router.get('/installment/agreement', installment.sessionKeyAuth, installment.agreement);// 服务协议静态页面
router.get('/installment/server-crash', installment.sessionKeyAuth, installment.serverCrash); // 服务器崩溃
router.get('/installment/bank-card', installment.sessionKeyAuth, installment.bankCard); // 银行卡列表
router.get('/installment/card-detail', installment.sessionKeyAuth, installment.cardDetail); // 银行卡详情
router.get('/installment/delBankCard', installment.sessionKeyAuth, installment.delBankCard); // 删除绑定
router.get('/installment/setMasterCard', installment.sessionKeyAuth, installment.setMasterCard); // 切换主卡
router.get('/installment/bank-card', auth, installment.bankCard); // 银行卡列表
router.get('/installment/card-detail', auth, installment.cardDetail); // 银行卡详情
router.get('/installment/delBankCard', auth, installment.delBankCard); // 删除绑定
router.get('/installment/setMasterCard', auth, installment.setMasterCard); // 切换主卡
router.get('/getaddress.json', addressController.newGetAddress); // TODO 模拟省数据
... ...
... ... @@ -45,7 +45,8 @@ module.exports = class extends global.yoho.BaseModel {
sales: 'Y',
outlets: 2,
stocknumber: 1,
need_filter: 'no'
need_filter: 'no',
from: 'fuzzySearch'
};
finalParams = _.assign(finalParams, searchProcess.getSearchParamsWithoutMethod(params));
... ...
... ... @@ -255,6 +255,10 @@ module.exports = class extends global.yoho.BaseModel {
method = 'app.search.li';
}
if (method === 'web.search.search') {
params.from = 'categoryList';
}
let paramsForApi = searchProcess.getSearchParamsWithoutMethod(params);
return this.get({
... ...
... ... @@ -160,6 +160,7 @@ module.exports = {
// 100s 最多访问200次
600: 200
},
LIMITER_IP_TIME: 3600, // 超出访问限制ip限制访问1小时
superCapture: '93c70db61fe276f93ce781ad17dc47cd',
from: from
};
... ...
... ... @@ -4,8 +4,10 @@
*/
const headerModel = require('../models/header');
const logger = global.yoho.logger;
const cache = global.yoho.cache.master;
const helpers = global.yoho.helpers;
const sender = global.yoho.apmSender;
const config = global.yoho.config;
const hostname = require('os').hostname();
const routeEncode = require('./route-encode');
const _ = require('lodash');
... ... @@ -20,6 +22,51 @@ const forceNoCache = (res) => {
}
};
const _err510 = (req, res, code, err) => {
res.status(code);
if (req.xhr) {
return res.json({
code: err.code,
message: '服务器繁忙请稍后重试!'
});
}
return res.render('error/510', {
err: err,
module: 'common',
page: 'error',
title: '服务器繁忙 | Yoho!Buy有货 | 潮流购物逛不停',
pageHeader: headerModel.setNav({
navTitle: '服务器繁忙请稍后重试!'
}),
pageFooter: true,
isErr: true
});
};
const _err500 = (req, res, code, err) => {
res.status(code);
if (req.xhr) {
return res.json({
code: err.code,
message: '服务器错误!'
});
}
return res.render('error/500', {
err: err,
module: 'common',
page: 'error',
title: '服务器错误 | Yoho!Buy有货 | 潮流购物逛不停',
pageHeader: headerModel.setNav({
navTitle: '服务器错误!'
}),
pageFooter: true,
isErr: true
});
};
exports.notFound = () => {
return (req, res) => {
... ... @@ -51,11 +98,12 @@ exports.notFound = () => {
* @return {[type]}
*/
exports.serverError = () => {
return (err, req, res, next) => {
forceNoCache(res);
return async(err, req, res, next) => {
const uid = req.user ? req.user.uid : 0;
const udid = _.get(req, 'cookies.udid', 'yoho');
forceNoCache(res);
err.code = err.code || err.statusCode || 500;
if (req.isApmReport && err.code !== 401) {
... ... @@ -63,7 +111,7 @@ exports.serverError = () => {
sender.addMessage({
measurement: 'error-report',
tags: {
app: global.yoho.config.appName, // 应用名称
app: config.appName, // 应用名称
hostname,
type: 'server',
route: `[${req.method}]${_.get(req, 'route.path', '')}`, // 请求路由
... ... @@ -106,33 +154,45 @@ exports.serverError = () => {
refer: req.originalUrl
}));
}
}
} else if (err.code === 9999991 || err.code === 9999992) {
let remoteIp = req.yoho.clientIp;
logger.error(`error at path: ${req.url}`);
logger.error(err);
const isHuman = await cache.getAsync(`${config.app}:limiter:api:ishuman:${remoteIp}`);
if (!res.headersSent) {
res.status(err.code);
if (!isHuman) {
if (remoteIp.indexOf(',') > 0) {
let arr = remoteIp.split(',');
if (req.xhr) {
return res.json({
code: err.code,
message: '服务器错误!'
remoteIp = arr[0];
}
cache.setAsync(`${config.app}:limiter:${remoteIp}`, 1, config.LIMITER_IP_TIME);
let limitAPI = helpers.urlFormat('/3party/check', {refer: req.get('Referer') || ''});
let limitPage = helpers.urlFormat('/3party/check', {
refer: req.protocol + '://' + req.get('host') + req.originalUrl
});
req.session.apiLimitValidate = true;
if (req.xhr) {
return res.status(510).json({
code: err.code,
data: {refer: limitAPI}
});
}
return res.redirect(limitPage);
}
return res.render('error/500', {
err: err,
module: 'common',
page: 'error',
title: '服务器错误 | Yoho!Buy有货 | 潮流购物逛不停',
pageHeader: headerModel.setNav({
navTitle: '服务器错误!'
}),
pageFooter: true,
isErr: true
});
return _err510(req, res, 510, err);
}
logger.error(`error at path: ${req.url}`);
logger.error(err);
if (!res.headersSent) {
return _err500(req, res, err.code, err);
}
next(err);
return next(err);
};
};
... ...
... ... @@ -70,7 +70,7 @@ module.exports = (req, res, next) => {
// 排除条件:ip白名单/路径白名单/异步请求/登录用户
const excluded = _.includes(IP_WHITE_LIST, remoteIp) ||
_.includes(PATH_WHITE_LIST, req.path) || req.xhr || !_.isEmpty(_.get(req, 'user.uid'));
const enabled = !_.get(req.app.locals, 'wap.sys.noLimite');
const enabled = !_.get(req.app.locals, 'wap.sys.noLimiter');
logger.debug(`request remote ip: ${remoteIp}; excluded: ${excluded}; enabled: ${enabled}`);
... ...
... ... @@ -2,6 +2,7 @@
const helpers = global.yoho.helpers;
const _ = require('lodash');
const WHITE_LIST = [
'/3party/check',
'/3party/check/submit',
... ... @@ -27,8 +28,7 @@ module.exports = (req, res, next) => {
}
if (req.xhr) {
return res.json({
code: 400,
return res.status(510).json({
data: {refer: limitAPI}
});
}
... ...
... ... @@ -26,9 +26,9 @@ function isNormalSpider(userAgent) {
module.exports = (limiter, policy) => {
const ua = limiter.req.header('User-Agent');
const synchronizeKey = `wap:limiter:synchronize:${limiter.remoteIp}`; // 同步
const asynchronousKey = `wap:limiter:asynchronous:${limiter.remoteIp}`; // 异步
const spiderKey = `wap:limiter:spider:${limiter.remoteIp}`; // 异步
const synchronizeKey = `pc:limiter:synchronize:${limiter.remoteIp}`; // 同步
const asynchronousKey = `pc:limiter:asynchronous:${limiter.remoteIp}`; // 异步
const spiderKey = `pc:limiter:spider:${limiter.remoteIp}`; // 异步
// 正常蜘蛛直接过
if (isNormalSpider(ua)) {
... ...
... ... @@ -9,7 +9,7 @@ module.exports = (limiter, policy) => {
res = limiter.res,
next = limiter.next; // eslint-disable-line
const key = `wap:limiter:faker:${limiter.remoteIp}`;
const key = `pc:limiter:faker:${limiter.remoteIp}`;
if (req.header('X-Requested-With') === 'XMLHttpRequest') {
cache.decrAsync(key, 1);
... ...
... ... @@ -10,9 +10,6 @@ const cache = global.yoho.cache.master;
const config = global.yoho.config;
const _ = require('lodash');
// 超出访问限制ip限制访问1小时
const limiterIpTime = 3600;
// 页面访问限制
const MAX_TIMES = config.REQUEST_LIMIT;
... ... @@ -27,12 +24,18 @@ module.exports = (limiter, policy) => {
getOp[key] = cache.getAsync(ruleKeys[key]);
});
getOp.human = cache.getAsync(`${config.app}:limiter:ishuman:${limiter.remoteIp}`);
return Promise.props(getOp).then((results) => {
logger.debug(MAX_TIMES);
logger.debug(_.values(ruleKeys));
logger.debug(results);
if (results.human) { // 经过验证码之后1小时有效期内不再验证qps
return Promise.resolve(true);
}
// 遍历限制规则,若满足返回相应处理策略, 否则页面访问次数加1
let operation = [];
... ... @@ -42,9 +45,10 @@ module.exports = (limiter, policy) => {
if (!results[key]) {
operation.push(cache.setAsync(cacheKey, 1, +key));
} else if (+results[key] > +val) {
logger.warn(`pc:limiter:${limiter.remoteIp}`);
// ip限制1小时
operation.push(cache.setAsync(`pc:limiter:${limiter.remoteIp}`, 1, limiterIpTime));
operation.push(cache.setAsync(`pc:limiter:${limiter.remoteIp}`, 1, config.LIMITER_IP_TIME));
return Promise.resolve(policy);
} else {
operation.push(cache.incrAsync(cacheKey, 1));
... ...
<div class="err-page yoho-page">
<div class="err-bg"></div>
</div>
... ...
... ... @@ -12,7 +12,7 @@
a.async = 1;
a.src = j;
m.parentNode.insertBefore(a, m);
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/2.4.15/yas.js', '_yas'));
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/2.4.16/yas.js', '_yas'));
var _hmt = _hmt || [];
... ... @@ -56,7 +56,7 @@
uid = uid === 0 ? '' : uid;
window._ozuid = uid; // 暴露ozuid
if (window._yas) {
window._yas(1 * new Date(), '2.4.15', 'yohobuy_m', uid, '', '');
window._yas(1 * new Date(), '2.4.16', 'yohobuy_m', uid, '', '');
}
setTimeout(function() {
... ...
{
"name": "yohobuywap-node",
"version": "6.5.32",
"version": "6.5.34",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ... @@ -74,13 +74,14 @@
"xml2js": "^0.4.19",
"yoho-express-session": "^2.0.0",
"yoho-md5": "^2.0.0",
"yoho-node-lib": "=0.6.2",
"yoho-node-lib": "=0.6.3",
"yoho-zookeeper": "^1.0.9"
},
"devDependencies": {
"@mapbox/stylelint-processor-arbitrary-tags": "^0.2.0",
"autoprefixer": "^7.2.4",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-loader": "^7.1.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
... ...
... ... @@ -54,6 +54,9 @@ class GradeDetailPage extends Page {
this.noListData = false;
this.graphData = {};
this.timer = null;
this.cacheMouthDetailResult = [];
this.graphRender();
this.monthDetailRender(true);
... ... @@ -81,30 +84,36 @@ class GradeDetailPage extends Page {
* 滑动事件处理
*/
dataZoomEvent() {
let optionData = this.eGradeGraph.getOption();
let endIndex = optionData.dataZoom[0].endValue;
if (this.timer) {
clearTimeout(this.timer);
}
let tapData = this.graphData.seriesData[endIndex];
this.timer = setTimeout(() => {
let optionData = this.eGradeGraph.getOption();
let endIndex = optionData.dataZoom[0].endValue;
this.year = tapData.year;
this.month = tapData.month;
this.page = 0;
let tapData = this.graphData.seriesData[endIndex];
this.refreshEchart(endIndex);
this.monthDetailRender(true);
this.year = tapData.year;
this.month = tapData.month;
this.page = 0;
if (window._yas && window._yas.sendCustomInfo) {
// 埋点
let C_ID = window._ChannelVary[window.cookie('_Channel')];
window._yas.sendCustomInfo({
op: 'YB_GRADE_DETAIL_GRAPH_DATAZOOM',
appop: 'YB_H5_GRADE_DETAIL_GRAPH_DATAZOOM',
param: JSON.stringify({
C_ID: C_ID
})
}, true);
}
this.refreshEchart(endIndex);
this.monthDetailRender(true);
if (window._yas && window._yas.sendCustomInfo) {
// 埋点
let C_ID = window._ChannelVary[window.cookie('_Channel')];
window._yas.sendCustomInfo({
op: 'YB_GRADE_DETAIL_GRAPH_DATAZOOM',
appop: 'YB_H5_GRADE_DETAIL_GRAPH_DATAZOOM',
param: JSON.stringify({
C_ID: C_ID
})
}, true);
}
}, 200);
}
/**
... ... @@ -208,6 +217,19 @@ class GradeDetailPage extends Page {
this.page++;
this.requesting = true;
let cacheResult = this.cacheMouthDetailResult[`${this.year}:${this.month}:${this.page}`];
if (cacheResult) {
if (isInit) {
this.view.gradeBillList.html(cacheResult);
} else {
this.view.gradeBillList.append(cacheResult);
}
this.requesting = false;
return;
}
this.ajax({
url: '/activity/grade/monthDetail',
data: {
... ... @@ -225,6 +247,7 @@ class GradeDetailPage extends Page {
this.view.gradeBillList.append(monthDetailPage);
}
this.cacheMouthDetailResult[`${this.year}:${this.month}:${this.page}`] = monthDetailPage;
return;
}
... ...
... ... @@ -49,6 +49,8 @@ $(document).ajaxError((event, xhr) => {
window.location.href = `/signin.html?refer=${encodeURIComponent(window.location.href)}`;
}
}
} else if (xhr.status === 510 && xhr.responseJSON.data && xhr.responseJSON.data.refer) {
window.location.href = xhr.responseJSON.data.refer;
} else if (xhr.status === 403 && xhr.responseJSON.code === 4403) {
tip.show(xhr.responseJSON.message);
setTimeout(function() {
... ...
... ... @@ -311,13 +311,13 @@ class ProductListWithFilter {
$this.addClass('active');
this.view.dropList.toggle();
this.view.dropList.find('.default').on('touchend touchcancel', (e) => {
this.view.thisLi = $(e.target);
this.view.thisLi = $(e.delegateTarget);
this.view.firstText.html('默认');
this.popularityFilter(this.view.thisLi, 'default');
return false;
});
this.view.dropList.find('.discount').on('touchend touchcancel', (e) => {
this.view.thisLi = $(e.target);
this.view.thisLi = $(e.delegateTarget);
this.view.firstText.html(this.view.thisLi.data('text'));
this.popularityFilter(this.view.thisLi, 'discount');
$('.first-li-more').removeClass('new default sale discount').addClass('discount');
... ...
... ... @@ -75,18 +75,4 @@
}
window.addEventListener('load', async_load, false);
</script>
<script>
window._py = window._py||[];
window._py.push(['a', 'MC..o8vMMWxEXDCiqYckD81lUX']);
window._py.push(['domain','stats.ipinyou.com']);
window._py.push(['e','']);
if(typeof _goodsData!='undefined'){
window._py.push(['pi',_goodsData]);
}
-function(d){
var f = 'https:' == d.location.protocol;var c = d.createElement('script');c.type='text/javascript';c.async=1;
c.src=(f ? 'https' : 'http') + '://'+(f?'fm.ipinyou.com':'fm.p0y.cn')+'/j/t/adv.js';
var h = d.getElementsByTagName("script")[0];h.parentNode.insertBefore(c, h);
}(document);
</script>
</html>
\ No newline at end of file
</html>
... ...
... ... @@ -93,18 +93,4 @@
}
window.addEventListener('load', async_load, false);
</script>
<script>
window._py = window._py||[];
window._py.push(['a', 'MC..o8vMMWxEXDCiqYckD81lUX']);
window._py.push(['domain','stats.ipinyou.com']);
window._py.push(['e','']);
if(typeof _goodsData!='undefined'){
window._py.push(['pi',_goodsData]);
}
-function(d){
var f = 'https:' == d.location.protocol;var c = d.createElement('script');c.type='text/javascript';c.async=1;
c.src=(f ? 'https' : 'http') + '://'+(f?'fm.ipinyou.com':'fm.p0y.cn')+'/j/t/adv.js';
var h = d.getElementsByTagName("script")[0];h.parentNode.insertBefore(c, h);
}(document);
</script>
</html>
\ No newline at end of file
</html>
... ...
... ... @@ -107,18 +107,4 @@
}
window.addEventListener('load', async_load, false);
</script>
<script>
window._py = window._py||[];
window._py.push(['a', 'MC..o8vMMWxEXDCiqYckD81lUX']);
window._py.push(['domain','stats.ipinyou.com']);
window._py.push(['e','']);
if(typeof _goodsData!='undefined'){
window._py.push(['pi',_goodsData]);
}
-function(d){
var f = 'https:' == d.location.protocol;var c = d.createElement('script');c.type='text/javascript';c.async=1;
c.src=(f ? 'https' : 'http') + '://'+(f?'fm.ipinyou.com':'fm.p0y.cn')+'/j/t/adv.js';
var h = d.getElementsByTagName("script")[0];h.parentNode.insertBefore(c, h);
}(document);
</script>
</html>
\ No newline at end of file
</html>
... ...
... ... @@ -3,7 +3,7 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="renderer" content="webkit">
<meta name="keywords" content="Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
<meta name="description" content="YOHO! 有货,年轻人潮流购物中心,中国潮流商品购物网站。全场品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和国内流行的商品,也是国内原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。">
... ... @@ -102,17 +102,17 @@
<ul class="sub-nav-list">
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/new?gender=1,3&amp;order=s_t_desc
">新品到着
">新品到着
</a>
</li>
<li class="sub-nav-item">
<a href="http://www.yohobuy.com/brands?gender=1,3
">品牌一览
">品牌一览
</a>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?gender=1,3&amp;msort=1,3
">服饰
">服饰
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -257,7 +257,7 @@
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?gender=1,3&amp;msort=6
">鞋履
">鞋履
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -394,7 +394,7 @@
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?gender=1,3&amp;msort=7
">包袋
">包袋
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -533,7 +533,7 @@
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?gender=1,3&amp;msort=8
">配饰 &middot; 其他
">配饰 &middot; 其他
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -658,12 +658,12 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://guang.yohobuy.com/">
<a href="http://guang.yohobuy.com/">
<span class="newlogo"></span>
</a>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/sale?gender=1,3">SALE
<a href="http://list.yohobuy.com/sale?gender=1,3">SALE
</a>
</li>
</ul>
... ... @@ -679,15 +679,15 @@
<div class='sub-nav-wrapper'>
<ul class="sub-nav-list">
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/new?gender=2,3&amp;order=s_t_desc">新品到着
<a href="http://list.yohobuy.com/new?gender=2,3&amp;order=s_t_desc">新品到着
</a>
</li>
<li class="sub-nav-item">
<a href="http://www.yohobuy.com/brands?gender=2,3">品牌一览
<a href="http://www.yohobuy.com/brands?gender=2,3">品牌一览
</a>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?gender=2,3&amp;msort=1,3">服饰
<a href="http://list.yohobuy.com/?gender=2,3&amp;msort=1,3">服饰
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -816,7 +816,7 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?gender=2,3&amp;msort=6">鞋履
<a href="http://list.yohobuy.com/?gender=2,3&amp;msort=6">鞋履
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -944,7 +944,7 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?gender=2,3&amp;msort=7">包袋
<a href="http://list.yohobuy.com/?gender=2,3&amp;msort=7">包袋
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -1060,7 +1060,7 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?gender=2,3&amp;msort=8,10,241">配饰 &middot; 其他
<a href="http://list.yohobuy.com/?gender=2,3&amp;msort=8,10,241">配饰 &middot; 其他
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -1190,12 +1190,12 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://guang.yohobuy.com/">
<a href="http://guang.yohobuy.com/">
<span class="newlogo"></span>
</a>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/sale?gender=2,3">SALE
<a href="http://list.yohobuy.com/sale?gender=2,3">SALE
</a>
</li>
</ul>
... ... @@ -1211,15 +1211,15 @@
<div class='sub-nav-wrapper'>
<ul class="sub-nav-list">
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/new?order=s_t_desc&amp;msort=365">新品到着
<a href="http://list.yohobuy.com/new?order=s_t_desc&amp;msort=365">新品到着
</a>
</li>
<li class="sub-nav-item">
<a href="http://www.yohobuy.com/brands?msort=365">品牌一览
<a href="http://www.yohobuy.com/brands?msort=365">品牌一览
</a>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?msort=365&amp;misort=396,423,400,404,367,406,430,453,366,417">上装
<a href="http://list.yohobuy.com/?msort=365&amp;misort=396,423,400,404,367,406,430,453,366,417">上装
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -1364,7 +1364,7 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?msort=365&amp;misort=369,388,384">下装
<a href="http://list.yohobuy.com/?msort=365&amp;misort=369,388,384">下装
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -1480,7 +1480,7 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?msort=365&amp;misort=368,392,414,421,429,419,408">鞋包配饰
<a href="http://list.yohobuy.com/?msort=365&amp;misort=368,392,414,421,429,419,408">鞋包配饰
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -1594,12 +1594,12 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://guang.yohobuy.com/">
<a href="http://guang.yohobuy.com/">
<span class="newlogo"></span>
</a>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/sale?msort=365">SALE
<a href="http://list.yohobuy.com/sale?msort=365">SALE
</a>
</li>
</ul>
... ... @@ -1615,15 +1615,15 @@
<div class='sub-nav-wrapper'>
<ul class="sub-nav-list">
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/new?order=s_t_desc&amp;msort=10">新品到着
<a href="http://list.yohobuy.com/new?order=s_t_desc&amp;msort=10">新品到着
</a>
</li>
<li class="sub-nav-item">
<a href="http://www.yohobuy.com/brands">品牌一览
<a href="http://www.yohobuy.com/brands">品牌一览
</a>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?msort=10&amp;misort=103">数码3C
<a href="http://list.yohobuy.com/?msort=10&amp;misort=103">数码3C
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -1750,7 +1750,7 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?msort=10&amp;misort=266">居家
<a href="http://list.yohobuy.com/?msort=10&amp;misort=266">居家
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -1912,7 +1912,7 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?msort=10&amp;misort=101,280">玩具娱乐
<a href="http://list.yohobuy.com/?msort=10&amp;misort=101,280">玩具娱乐
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -2039,7 +2039,7 @@
</div>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/?msort=10&amp;misort=259">美妆
<a href="http://list.yohobuy.com/?msort=10&amp;misort=259">美妆
</a>
<div class="third-nav-wrapper">
<div class="third-nav">
... ... @@ -2140,12 +2140,12 @@
</li>
<li class="sub-nav-item">
<a href="http://guang.yohobuy.com/
">
">
<span class="newlogo"></span>
</a>
</li>
<li class="sub-nav-item">
<a href="http://list.yohobuy.com/sale?msort=10">SALE
<a href="http://list.yohobuy.com/sale?msort=10">SALE
</a>
</li>
</ul>
... ... @@ -2164,10 +2164,10 @@
</form>
</div>
<div class="gobuy float-left gobuyboys" id="miniCartBox">
<span class="ic-infomation">0</span>
<div class="gobuy-wrapper"></div>
</div>
</div>
</div>
... ... @@ -2395,7 +2395,7 @@
</script>
</div>
<input id="api-domain" type="hidden" value="http://test.open.yohobuy.com">
<div class="err-page err-404 screen">
<div class="tips-404">
<p class="tip">很抱歉,您访问的页面不存在!</p>
... ... @@ -2596,7 +2596,7 @@
NewPower Co. 版权所有 经营许可证编号:苏B2-20120395
</p>
</div>
</div>
</div>
</div>
... ... @@ -2615,17 +2615,17 @@
<script>
seajs.use('js/header');
</script>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W958MG" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>
... ... @@ -2641,7 +2641,7 @@
(function() {
_gaq.push(['_setAccount', 'UA-48997038-32']);
_gaq.push(['_trackPageview']);
var ga = document.createElement('script');
var ga = document.createElement('script');
ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
... ... @@ -2686,20 +2686,6 @@
}
})();
</script>
<script>
window._py = window._py||[];
window._py.push(['a', 'MC..o8vMMWxEXDCiqYckD81lUX']);
window._py.push(['domain','stats.ipinyou.com']);
window._py.push(['e','']);
if(typeof _goodsData!='undefined'){
window._py.push(['pi',_goodsData]);
}
-function(d){
var f = 'https:' == d.location.protocol;var c = d.createElement('script');c.type='text/javascript';c.async=1;
c.src=(f ? 'https' : 'http') + '://'+(f?'fm.ipinyou.com':'fm.p0y.cn')+'/j/t/adv.js';
var h = d.getElementsByTagName("script")[0];h.parentNode.insertBefore(c, h);
}(document);
</script>
<script src="http://static.yohobuy.com/js/v3/o_code.js?v=20150420" async="async"></script>
</body>
</html>
... ...
... ... @@ -340,6 +340,9 @@ const getSearchParamsWithoutMethod = (params) => {
if (params.physical_channel) {
finalParams.physical_channel = params.physical_channel;
}
if (params.from) {
finalParams.from = params.from;
}
finalParams = _.mapValues(finalParams, value => {
return stringProcess.decodeURIComponent(value);
... ...