Authored by Rock Zhang

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>找回密码-通过邮箱 | YOHO!有货</title>
<meta name="keywords" content="Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
<meta name="description" content="YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<meta content="email=no" name="format-detection" />
<script type="text/javascript">
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/0.0.2/index.css">
</head>
<body class=passport-body>
<div class="back-email-page passport-page yoho-page">
<div class="header">
<a class="go-back" href=/signin.html></a>
<p class="title">找回密码</p>
</div> <div class="content">
<div class="input-container row has-clear">
<input id="email" class="input email" type="text" placeholder="请输入邮箱" autocomplete="off">
</div>
<span id="btn-sure" class="btn btn-sure disable row">确定</span>
</div>
</div>
<script src="http://cdn.yoho.cn/myohobuy/0.0.2/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/0.0.2/index.js"></script>
<script>
seajs.use('js/common');
</script>
<script>
seajs.use('js/passport/back/email');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>国际账号登录 | YOHO!有货</title>
<meta name="keywords" content="Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
<meta name="description" content="YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<meta content="email=no" name="format-detection" />
<script type="text/javascript">
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/0.0.2/index.css">
</head>
<body class=passport-body>
<div class="login-international-page passport-page yoho-page">
<div class="header">
<a class="go-back" href=/></a>
<p class="title">登录</p>
</div> <div class="content">
<div class="select-container row">
<span class="select-title">国家和地区</span>
<select id="country-select" class="country-select select in-android-uc">
<option value=+61 >澳大利亚</option>
<option value=+82 >韩国</option>
<option value=+1 >加拿大</option>
<option value=+60 >马来西亚</option>
<option value=+1 >美国</option>
<option value=+81 >日本</option>
<option value=+65 >新加坡</option>
<option value=+44 >英国</option>
<option value=+86 selected>中国</option>
<option value=+853 >中国澳门</option>
<option value=+886 >中国台湾</option>
<option value=+852 >中国香港</option>
</select>
<div class="arrow-right"></div>
</div> <div class="input-container phone-container row has-clear">
<span id="area-code" class="area-code">+86</span>
<input id="phone-num" class="input phone-num" type="text" placeholder="手机号" value=>
</div>
<div class="input-container row has-eye">
<input id="pwd" class="pwd input" type="password" placeholder="密码">
</div>
<span id="btn-login" class="btn btn-login disble row">登录</span>
</div>
</div>
<script src="http://cdn.yoho.cn/myohobuy/0.0.2/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/0.0.2/index.js"></script>
<script>
seajs.use('js/common');
</script>
<script>
seajs.use('js/passport/login/international');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>找回密码-通过手机号 | YOHO!有货</title>
<meta name="keywords" content="Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
<meta name="description" content="YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<meta content="email=no" name="format-detection" />
<script type="text/javascript">
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/0.0.2/index.css">
</head>
<body class=passport-body>
<div class="back-mobile-page passport-page yoho-page">
<div class="header">
<a class="go-back" href=/signin.html></a>
<p class="title">找回密码</p>
</div> <div class="content">
<div class="select-container row">
<span class="select-title">国家和地区</span>
<select id="country-select" class="country-select select in-android-uc">
<option value=+61 >澳大利亚</option>
<option value=+82 >韩国</option>
<option value=+1 >加拿大</option>
<option value=+60 >马来西亚</option>
<option value=+1 >美国</option>
<option value=+81 >日本</option>
<option value=+65 >新加坡</option>
<option value=+44 >英国</option>
<option value=+86 selected>中国</option>
<option value=+853 >中国澳门</option>
<option value=+886 >中国台湾</option>
<option value=+852 >中国香港</option>
</select>
<div class="arrow-right"></div>
</div> <div class="input-container phone-container row has-clear">
<span id="area-code" class="area-code"></span>
<input id="phone-num" class="input phone-num" type="text" placeholder="手机号">
</div>
<span id="btn-next" class="btn btn-next disable row">下一步</span>
</div>
</div>
<script src="http://cdn.yoho.cn/myohobuy/0.0.2/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/0.0.2/index.js"></script>
<script>
seajs.use('js/common');
</script>
<script>
seajs.use('js/passport/back/mobile');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>注册 | YOHO!有货</title>
<meta name="keywords" content="Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
<meta name="description" content="YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<meta content="email=no" name="format-detection" />
<script type="text/javascript">
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/0.0.2/index.css">
</head>
<body class=passport-body>
<div class="reg-page passport-page yoho-page">
<div class="header">
<a class="go-back" href=/></a>
<p class="title">注册</p>
</div> <div class="content">
<div class="select-container row">
<span class="select-title">国家和地区</span>
<select id="country-select" class="country-select select in-android-uc">
<option value=+61 >澳大利亚</option>
<option value=+82 >韩国</option>
<option value=+1 >加拿大</option>
<option value=+60 >马来西亚</option>
<option value=+1 >美国</option>
<option value=+81 >日本</option>
<option value=+65 >新加坡</option>
<option value=+44 >英国</option>
<option value=+86 selected>中国</option>
<option value=+853 >中国澳门</option>
<option value=+886 >中国台湾</option>
<option value=+852 >中国香港</option>
</select>
<div class="arrow-right"></div>
</div> <div class="input-container phone-container row has-clear">
<span id="area-code" class="area-code">+86</span>
<input id="phone-num" class="input phone-num" type="text" placeholder="手机号">
</div>
<span id="btn-next" class="btn btn-next disable row">下一步</span>
<p class="register-tip">YOHO!Family账号可登录YOHO!有货、YOHO!Boys、YOHO!Girls及SHOW</p>
</div>
</div>
<script src="http://cdn.yoho.cn/myohobuy/0.0.2/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/0.0.2/index.js"></script>
<script>
seajs.use('js/common');
</script>
<script>
seajs.use('js/passport/register/register');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>登录 | YOHO!有货</title>
<meta name="keywords" content="Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
<meta name="description" content="YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<meta content="email=no" name="format-detection" />
<script type="text/javascript">
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/0.0.2/index.css">
</head>
<body class=passport-body>
<div class="login-page passport-page yoho-page">
<div class="header">
<a class="go-back" href=/></a>
<div class="img-header"></div>
</div> <div class="content">
<div class="acc-container input-container row has-clear">
<div class="yoho-logo"></div>
<input id="account" class="input account" type="text" placeholder="手机号/邮箱" autocomplete="off" value=>
</div>
<div class="input-container row has-eye">
<input id="pwd" class="pwd input" type="password" placeholder="密码">
</div>
<span id="btn-login" class="btn btn-login disable">登录</span>
<p class="op-container">
<a class="go-register" href=/reg.html>免费注册</a>
<span id="forget-pwd" class="forget-pwd">忘记密码</span>
</p>
<div class="third-party-login">
<span>其他登录方式</span>
<div class="tp-link">
<a class="alipay" href=/passport/login/alipay></a>
<a class="weibo" href=/passport/login/sina></a>
<a class="qq" href=/passport/login/qq></a>
</div>
</div>
<a class="international" href=/login.html>International Customer</a>
<div class="login-tip">
<div class="info-icon"></div>
Yoho!Family账号可登录YOHO!有货
</div>
<div id="retrive-pwd-mask" class="mask"></div>
<ul id="retrive-pwd-ways" class="retrive-pwd-ways">
<li>
<a href=/passport/back/mobile>通过手机找回密码</a>
</li>
<li>
<a href=/passport/back/email>通过邮箱找回密码</a>
</li>
<li id="cancel-retrive">
取消
</li>
</ul>
</div>
</div>
<script src="http://cdn.yoho.cn/myohobuy/0.0.2/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/0.0.2/index.js"></script>
<script>
seajs.use('js/common');
</script>
<script>
seajs.use('js/passport/login/login');
</script>
</body>
</html>
\ No newline at end of file
... ... @@ -98,7 +98,7 @@ gulp.task('compass-production', ['assets'], function() {
compass({
css: distDir.css,
sass: 'sass',
image: distDir.image,
image: distDir.img,
font: distDir.font,
http_path: '/',
style: 'compressed'
... ...
/**
* 分类
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/14
* 品牌一览
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/10/23
*/
var $ = require('yoho.zepto'),
... ...
/**
* 折扣专区
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/10/23
*/
var $ = require('yoho.zepto'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.zeptolazyload');
var $curNav,
$navList = $('#discount-nav'),
$newArrivalList = $('#discount-goods-list'),
$goods = $newArrivalList.children('.goods-list'),
$goodList = $('.goods-list');
var swiper;
var index = 0,
winH = $(window).height(),
loadMoreH = $('#load-more').height(),
loading = false,
page = 0,
pd = "";
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
var filter = require('../../plugin/filter');
lazyLoad($('img.lazy'));
$curNav = $navList.children('.focus');
var $goodsContainer = $('#goods-container'),
$ngc = $($goodsContainer.children().get(0)),
$pgc = $($goodsContainer.children().get(1)),
$dgc = $($goodsContainer.children().get(2));
$all = $($goodsContainer.children().get(3));
$('#discount-nav').delegate('li', 'touchstart', function() {
var $this = $(this),
$content;
var winH = $(window).height();
if ($this.hasClass('focus')) {
return;
//默认筛选条件
var defaultOpt = {
gender: $('#gender').val(),
brand: $('#brand').val(),
msort: $('#msort').val(),
color: $('#color').val(),
size: $('#size').val(),
price: $('#price').val(),
discount: $('#discount').val(),
limit: $('#limit').val(),
dayLimit: $('#dayLimit').val(),
channel: $('#channel').val(),
p_d: $('#p_d').val()
};
var $listNav = $('#list-nav'),
//导航数据信息
navInfo = {
today: {
reload: true,
page: 0,
end: false
},
week: {
reload: true,
page: 0,
end: false
},
sale: {
reload: true,
page: 0,
end: false
},
all: {
reload: true,
page: 0,
end: false
}
},
$pre, //纪录进入筛选前的active项
searching;
index = $this.index();
pd = getSalePdByChoose(index);
$pgc.addClass('hide');
$dgc.addClass('hide');
$all.addClass('hide');
$this.addClass('focus');
$curNav.removeClass('focus');
/**
* 筛选注册的回调,筛选子项点击后逻辑
* 需要执行search的场景:1.点选筛选项;2.relaod为true时切换导航;3.下拉加载
* @param opt {type, id}
*/
function search(opt) {
var setting = {},
ext,
att,
nav, navType,
dayLimit,
page;
if (opt) {
$goods.not('.hide').addClass('hide');
$content = $goods.eq(index);
$content.removeClass('hide');
//筛选项变更则重置reload为true
for (att in navInfo) {
if (navInfo.hasOwnProperty(att)) {
navInfo[att].reload = true;
}
}
$curNav = $this;
//处理active状态
$listNav.children('.active').removeClass('active');
$pre.addClass('active');
$(document).trigger('scroll'); //Trigger lazyLoad
});
switch (opt.type) {
case 'gender':
ext = {
gender: opt.id
};
break;
case 'brand':
ext = {
brand: opt.id
};
break;
case 'msort':
ext = {
msort: opt.id
};
break;
case 'color':
ext = {
color: opt.id
};
break;
case 'size':
ext = {
size: opt.id
};
break;
case 'price':
ext = {
price: opt.id
};
break;
case 'discount':
ext = {
discount: opt.id
};
break;
case 'limit':
ext = {
limit: opt.id
};
break;
case 'channel':
ext = {
channel: opt.id
};
break;
case 'p_d':
ext = {
p_d: opt.id
};
break;
}
$.extend(defaultOpt, ext); //扩展筛选项
}
if (searching) {
return;
}
//导航类别
if ($pre === undefined || $pre.hasClass('today')) {
navType = 'today';
dayLimit = 1;
} else if ($pre.hasClass('week')) {
navType = 'week';
dayLimit = 2;
} else if ($pre.hasClass('sale')) {
navType = 'sale';
dayLimit = 3;
}else if ($pre.hasClass('all')) {
navType = 'all';
dayLimit = 4;
}
//srcoll to load more
$(window).scroll(function () {
if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) {
if (loading) {
nav = navInfo[navType];
page = nav.page + 1;
if (nav.reload) {
page = 1;
} else if (nav.end) {
//不需要重新加载并且数据请求结束
return;
}
loading = true;
// num = $goodList.children('.good-info').length;
$.extend(setting, defaultOpt, {
dayLimit: dayLimit,
page: page
});
searching = true;
$.ajax({
type: 'GET',
url: '/product/newsale/selectNewSale',
data: {
p_d: pd,
page: page + 1
},
data: setting,
success: function(data) {
var noResult = '<p class="no-result">未找到相关搜索结果</p>',
$container;
switch (navType) {
case 'today':
$container = $ngc;
break;
case 'week':
$container = $pgc;
break;
case 'sale':
$container = $dgc;
break;
case 'all':
$container = $all;
break;
}
if (data === ' ') {
nav.end = true;
//opt.end = true;
loading = false;
return;
if (nav.reload) {
$container.html(noResult);
}
} else {
if (nav.reload) {
$container.html(data);
} else {
$container.append(data);
}
$goodList.append(data);
lazyLoad($container.find('.lazy'));
}
//lazyLoad
//lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy'));
lazyLoad($('.good-info').find('img.lazy'));
nav.reload = false;
nav.page = page;
loading = false;
page++;
},
error: function() {
tip.show('网络断开连接了~');
loading = false;
searching = false;
}
});
}
lazyLoad($('.lazy'));
filter.registerCbFn(search);
//导航栏点击逻辑说明:
//1.点击非active项时切换active状态
//2.价格和折扣active状态时继续点击切换排序
//3.筛选无active时点击展开筛选面板
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
$listNav.delegate('li', 'touchstart', function() {
var $this = $(this),
nav,
navType,
$active;
if ($this.hasClass('filter')) {
//筛选面板切换状态
if ($this.hasClass('active')) {
filter.hideFilter();
//点击筛选钱的active项回复active
$pre.addClass('active');
$this.removeClass('active');
} else {
$pre = $this.siblings('.active');
$pre.removeClass('active');
$this.addClass('active');
filter.showFilter();
}
} else {
});
if ($this.hasClass('new')) {
navType = 'newest';
} else if ($this.hasClass('price')) {
navType = 'price';
} else if ($this.hasClass('discount')) {
navType = 'discount';
}
/**
* 根据用户的选择获取商品折扣值
*
* @param int index
* @return string
*/
function getSalePdByChoose(index) {
var pd = "0.1,0.3";
switch (index) {
case 0:
pd = "0.1,0.3";
nav = navInfo[navType];
if ($this.hasClass('active')) {
//最新无排序切换
if ($this.hasClass('new')) {
return;
}
if ($this.hasClass('price') || $this.hasClass('discount')) {
// 价格/折扣切换排序状态
$this.find('.icon > .iconfont').toggleClass('cur');
$pre = $this; //更新pre为当前项
nav.reload = true; //重置reload,HTML会被替换为逆序的HTML
nav.order = nav.order === 0 ? 1 : 0; //切换排序
}
} else {
$active = $this.siblings('.active');
$pre = $this; //$pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项
if ($active.hasClass('filter')) {
//若之前active项为筛选,则隐藏筛选面板
filter.hideFilter();
} else {
//切换container显示
$goodsContainer.children('.container:not(.hide)').addClass('hide');
switch (navType) {
case 'newest':
$ngc.removeClass('hide');
break;
case 1:
pd = "0.4,0.6";
case 'price':
$pgc.removeClass('hide');
break;
case 2:
pd = "0.7,0.9";
case 'discount':
$dgc.removeClass('hide');
break;
case 3:
pd = "0.1,0.9";
case 'all':
$dgc.removeClass('hide');
break;
}
return pd;
}
\ No newline at end of file
}
$active.removeClass('active');
$this.addClass('active');
}
if (nav.reload) {
search();
}
}
});
$(window).scroll(function() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if ($(window).scrollTop() + winH >
$(document).height() - 0.25 * $goodsContainer.height()) {
search();
}
});
\ No newline at end of file
... ...
/**
* 商品列表页
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/20
* 新品到着
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/10/24
*/
var $ = require('yoho.zepto'),
... ... @@ -144,7 +144,7 @@ function search(opt) {
}
//导航类别
if ($pre.hasClass('today')) {
if ($pre === undefined || $pre.hasClass('today')) {
navType = 'today';
dayLimit = 1;
} else if ($pre.hasClass('week')) {
... ... @@ -265,17 +265,6 @@ $listNav.delegate('li', 'touchstart', function() {
if ($this.hasClass('active')) {
//最新无排序切换
if ($this.hasClass('today')) {
return;
}
if ($this.hasClass('week') || $this.hasClass('sale')) {
// 价格/折扣切换排序状态
$pre = $this; //更新pre为当前项
nav.reload = true; //重置reload,HTML会被替换为逆序的HTML
}
} else {
$active = $this.siblings('.active');
... ... @@ -320,6 +309,8 @@ $(window).scroll(function() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if ($(window).scrollTop() + winH >
$(document).height() - 0.25 * $goodsContainer.height()) {
if($pre){
search();
}
}
});
\ No newline at end of file
... ...
... ... @@ -89,7 +89,7 @@ body.passport-body {
height: 20px;
right: 15px;
top: 16px;
background-image: url('http://static.dev.yohobuy.com/img/passport/arrow-right.png');
background: image-url('passport/arrow-right.png') no-repeat;
background-size: 100% 100%;
}
}
... ... @@ -144,7 +144,7 @@ body.passport-body {
right: 10px;
width: 16px;
height: 16px;
background-image: url('http://static.dev.yohobuy.com/img/passport/clear-input.png');
background: image-url('passport/clear-input.png') no-repeat;
background-size: 100% 100%;
}
... ... @@ -154,11 +154,11 @@ body.passport-body {
right: 10px;
width: 19px;
height: 12px;
background-image: url('http://static.dev.yohobuy.com/img/passport/eye.png');
background: image-url('passport/eye.png') no-repeat;
background-size: 100% 100%;
&.close {
background-image: url('http://static.dev.yohobuy.com/img/passport/eye-close.png');
background-image: image-url('passport/eye-close.png');
}
}
... ...
... ... @@ -31,12 +31,18 @@
<div id="goods-container" class="goods-container">
{{# goodsContainer}}
<div class="new-goods container">
{{#if goods}}
{{# goods}}
{{> good}}
{{/ goods}}
{{^}}
<p class="no-result">未找到相关搜索结果</p>
{{/if}}
</div>
{{/ goodsContainer}}
{{> filter}}
</div>
... ...
{{>layout/header}}
<div class="discount-page yoho-page">
{{> layout/header}}
<div class="good-list-page yoho-page">
{{# headerBanner}}
{{> product/banner_swipe_and_single}}
{{/ headerBanner}}
<ul id="discount-nav" class="discount-nav clearfix">
{{# tabs}}
<li class="discount-nav-item {{#focus}}focus{{/focus}}">{{title}}</li>
{{/ tabs}}
<ul id="list-nav" class="list-nav clearfix">
<li class="today active">
<a href="javascript:void(0);">
1-3
<span class="iconfont cur">&#xe616;</span>
</a>
</li>
<li class="week">
<a href="javascript:void(0);">
4-6
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
</span>
</a>
</li>
<li class="sale">
<a href="javascript:void(0);">
7-9
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
</span>
</a>
</li>
<li class="all">
<a href="javascript:void(0);">
All
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
</span>
</a>
</li>
<li class="filter">
<a href="javascript:void(0);">
筛选
<span class="iconfont">&#xe613;</span>
</a>
</li>
</ul>
<div id="discount-goods-list">
{{> product/goods_container}}
<div id="goods-container" class="goods-container">
{{# goodsContainer}}
<div class="new-goods container">
{{# goods}}
{{> good}}
{{/ goods}}
</div>
{{/ goodsContainer}}
<div id="load-more-info" class="load-more-info">
<div class="loading status hide">
正在加载...
</div>
<span class="no-more status hide">没有更多啦</span>
{{> filter}}
</div>
</div>
{{>layout/footer}}
{{#if brand}}
<input id="brand" type="hidden" value={{brand}}>
{{/if}}
{{#if gender}}
<input id="gender" type="hidden" value={{gender}}>
{{/if}}
{{#if msort}}
<input id="msort" type="hidden" value={{msort}}>
{{/if}}
{{#if color}}
<input id="color" type="hidden" value={{color}}>
{{/if}}
{{#if size}}
<input id="size" type="hidden" value={{size}}>
{{/if}}
{{#if price}}
<input id="price" type="hidden" value={{price}}>
{{/if}}
{{#if p_d}}
<input id="p_d" type="hidden" value={{p_d}}>
{{/if}}
{{#if channel}}
<input id="channel" type="hidden" value={{channel}}>
{{/if}}
{{#if dayLimit}}
<input id="dayLimit" type="hidden" value={{dayLimit}}>
{{/if}}
{{#if limit}}
<input id="limit" type="hidden" value={{limit}}>
{{/if}}
{{#if page}}
<input id="page" type="hidden" value={{page}}>
{{/if}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...