Authored by ccbikai(👎🏻🍜)

Merge branch 'release/5.5.1' into gray

... ... @@ -34,6 +34,7 @@ const app = express();
// 向模板注入变量
app.locals.devEnv = app.get('env') === 'development';
app.locals.version = pkg.version;
app.locals.startTime = Date.now();
// 全局注册library
yohoLib.global(config);
... ...
... ... @@ -71,7 +71,8 @@ let getCateData = (channel) => {
}, {
cache: true
}).then((result) => {
if (!result.code || result.code !== 200 || !result.data) {
if (!result || !result.code || result.code !== 200 || !result.data) {
return [];
}
... ...
... ... @@ -49,7 +49,7 @@ router.post('/passport/login/auth', validateCode.check, login.local.login);
// SMS 短信
router.use('/passport/sms_login', login.common.beforeLogin, smsLogin.beforeIn);
router.get('/passport/sms_login', validateCode.load, login.common.clearCookie, smsLogin.loginPage);
router.get('/passport/sms_login', validateCode.load, smsLogin.loginPage);
router.post('/passport/sms_login/step1_check', validateCode.check, smsLogin.indexCheck);
router.get('/passport/sms_login/token.json',
smsLogin.tokenBefore,
... ...
... ... @@ -39,16 +39,16 @@
{{#unless devEnv}}
{{#if localCss }}
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/common.css">
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/common.css?t={{startTime}}">
{{/if}}
{{#if isFeature}}
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/feature.css">
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/feature.css?t={{startTime}}">
{{else}}
{{#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}}/{{module}}.{{page}}.css?t={{startTime}}">
{{^}}
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/index.css">
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/index.css?t={{startTime}}">
{{/ifor}}
{{/if}}
{{/unless}}
... ... @@ -94,8 +94,8 @@
<script src="//{{devHost}}:5001/{{module}}.{{page}}.js"></script>
{{^}}
<script>var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/m-yohobuy-node/assets';</script>
<script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/libs.js"></script>
<script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/{{module}}.{{page}}.js"></script>
<script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/libs.js?t={{startTime}}"></script>
<script src="//cdn.yoho.cn/m-yohobuy-node/{{version}}/{{module}}.{{page}}.js?t={{startTime}}"></script>
{{/if}}
{{#loadJs}}
<script type="text/javascript" src="{{src}}"></script>
... ...
... ... @@ -23,13 +23,15 @@ if ($('.recommend-for-you').length) {
require('common/suspend-cart');
require('common/footer');
new Swiper('.banner-center-swiper', {
pagination: '.swiper-pagination',
lazyLoading: true,
lazyLoadingInPrevNext: true,
paginationClickable: true,
autoplay: 3000
});
if ($('.banner-center-swiper').length > 0) {
new Swiper('.banner-center-swiper', {
pagination: '.swiper-pagination',
lazyLoading: true,
lazyLoadingInPrevNext: true,
paginationClickable: true,
autoplay: 3000
});
}
window.reMarginFooter('.footer-tab');
... ...
... ... @@ -109,11 +109,11 @@ $loginBtn.on('touchstart', function() {
validate.type === 2 && validate.refresh();
if (data.code === 200) {
res = result.data;
res = data.data;
showErrTip('登录成功');
// 3秒后强制跳转
setTimeout(function() {
setTimeout(() => {
location.href = res.href;
}, 1500);
... ... @@ -124,7 +124,7 @@ $loginBtn.on('touchstart', function() {
((data.changeCaptcha && validate.type !== 2) && validate.refresh());
}
showErrTip(result.message);
showErrTip(data.message);
resetForm();
}
},
... ...
... ... @@ -862,6 +862,10 @@ if ($brandHeader.data('isbaseshop') === true) {
url: location.protocol + '//m.yohobuy.com/product/search/filter',
data: defaultOpt,
success: function(data) {
if (data === '') {
return false;
}
$goodsContainer.append(data);
// 初始化filter&注册filter回调
... ...
... ... @@ -206,7 +206,7 @@
background: none;
}
.goods-consults .customer-consults .consult-item {
.goods-consults .consult-item {
@mixin consult-item ;
margin-top: 0;
... ...
... ... @@ -653,6 +653,7 @@ $basicBtnC: #eb0313;
span {
display: inline-block;
padding-left: 8px;
padding-top: 5px;
vertical-align: middle;
line-height: 88px;
}
... ...