...
|
...
|
@@ -3,8 +3,59 @@ |
|
|
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
|
|
|
* @date: 2015/10/12
|
|
|
*/
|
|
|
//加载css
|
|
|
require("layout/_loading.css")
|
|
|
require("layout/_utils.css")
|
|
|
|
|
|
require("common/_filter.css")
|
|
|
require("common/_good.css")
|
|
|
require("common/_loading.css")
|
|
|
require("common/_suspend-home.css")
|
|
|
|
|
|
require("channel/_banner-bottom.css")
|
|
|
require("channel/_banner-center.css")
|
|
|
require("channel/_banner-top.css")
|
|
|
require("channel/_brand.css")
|
|
|
require("channel/_cate.css")
|
|
|
require("channel/_creative-life.css")
|
|
|
require("channel/_divide-image.css")
|
|
|
require("channel/_fine-brands.css")
|
|
|
require("channel/_floor-header.css")
|
|
|
require("channel/_footer-tab.css")
|
|
|
require("channel/_fresh-only.css")
|
|
|
require("channel/_goods-category.css")
|
|
|
require("channel/_home-header.css")
|
|
|
require("channel/_home.css")
|
|
|
require("channel/_hot-brands.css")
|
|
|
require("channel/_hot-category.css")
|
|
|
require("channel/_hot-single.css")
|
|
|
require("channel/_icons-enter.css")
|
|
|
require("channel/_index.css")
|
|
|
require("channel/_left-right.css")
|
|
|
require("channel/_maybe-like.css")
|
|
|
require("channel/_new-first.css")
|
|
|
require("channel/_new-user-floor.css")
|
|
|
require("channel/_notice.css")
|
|
|
require("channel/_plus-star.css")
|
|
|
require("channel/_sale-floor.css")
|
|
|
require("channel/_search-input.css")
|
|
|
require("channel/_search.css")
|
|
|
require("channel/_seckill.css")
|
|
|
require("channel/_shop-recommand.css")
|
|
|
require("channel/_side-nav.css")
|
|
|
require("channel/_six-lines-floor.css")
|
|
|
require("channel/_three-picture.css")
|
|
|
require("channel/_thumb-row.css")
|
|
|
require("channel/_trend-topics.css")
|
|
|
require("channel/_trend-tops.css")
|
|
|
require("channel/_trendsetter-collocation.css")
|
|
|
require("channel/_two-column-goods.css")
|
|
|
require("channel/_vip-only.css")
|
|
|
|
|
|
|
|
|
var $ = require('yoho-jquery'),
|
|
|
Swiper = require('yoho-swiper'),
|
|
|
alloytouch = require('alloytouch'),
|
|
|
lazyLoad = require('yoho-jquery-lazyload'),
|
|
|
fastclick = require('yoho-fastclick'),
|
|
|
noticeScroll = require('../plugin/notice-scroll'),
|
...
|
...
|
@@ -101,17 +152,57 @@ highlight($subNav); |
|
|
|
|
|
|
|
|
// 头部banner轮播
|
|
|
if ($('.banner-swiper').find('li').size() > 1) {
|
|
|
new Swiper('.banner-swiper', {
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNext: true,
|
|
|
loop: true,
|
|
|
autoplay: 3000,
|
|
|
autoplayDisableOnInteraction: false,
|
|
|
paginationClickable: true,
|
|
|
slideElement: 'li',
|
|
|
pagination: '.banner-top .pagination-inner'
|
|
|
});
|
|
|
if ($('.banner-alloy').find('img').size() > 1) {
|
|
|
new alloytouch({
|
|
|
touch:".banner-alloy",//反馈触摸的dom
|
|
|
vertical: false,//不必需,默认是true代表监听竖直方向touch
|
|
|
target: $('.alloy-wrapper')[0], //运动的对象
|
|
|
property: "translateY", //被运动的属性
|
|
|
change:function(){ }, //不必需,属性改变的回调。alloytouch.css版本不支持该事件
|
|
|
touchStart:function(value){ },
|
|
|
touchMove:function(value){ },
|
|
|
touchEnd:function(evt, v, index){
|
|
|
var step_v = index * this.step * -1;
|
|
|
var dx = v - step_v;
|
|
|
|
|
|
console.log(v)
|
|
|
if (Math.abs(dx) < 30) {
|
|
|
this.go(step_v);
|
|
|
|
|
|
}
|
|
|
else if (dx > 0) {
|
|
|
this.go(step_v + this.step);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.go(step_v - this.step);
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
},
|
|
|
animationEnd:function(v, page){
|
|
|
var i = 0,
|
|
|
len = items.length;
|
|
|
for (; i < len; i++) {
|
|
|
if (i === page) {
|
|
|
items[i].classList.add("active");
|
|
|
} else {
|
|
|
items[i].classList.remove("active");
|
|
|
}
|
|
|
}
|
|
|
} //运动结束
|
|
|
|
|
|
})
|
|
|
// new Swiper('.banner-swiper', {
|
|
|
// lazyLoading: true,
|
|
|
// lazyLoadingInPrevNext: true,
|
|
|
// loop: true,
|
|
|
// autoplay: 3000,
|
|
|
// autoplayDisableOnInteraction: false,
|
|
|
// paginationClickable: true,
|
|
|
// slideElement: 'li',
|
|
|
// pagination: '.banner-top .pagination-inner'
|
|
|
// });
|
|
|
}
|
|
|
|
|
|
// 店铺推荐人数和收藏初始查询
|
...
|
...
|
|