...
|
...
|
@@ -1689,6 +1689,7 @@ define("js/home/home", ["jquery","swiper","lazyload","hammer","index"], function |
|
|
var $ = require("jquery"),
|
|
|
Swiper = require("swiper"),
|
|
|
lazyLoad = require("lazyload"),
|
|
|
noticeScroll = require("js/plugin/notice-scroll"),
|
|
|
$mobileWrap = $('.mobile-wrap'),
|
|
|
$overlay = $('.overlay'),
|
|
|
$sideNav = $('.side-nav'),
|
...
|
...
|
@@ -1707,6 +1708,7 @@ var start = 0, |
|
|
isen = true;
|
|
|
|
|
|
lazyLoad($('img.lazy'));
|
|
|
noticeScroll('.notice', $('.notice').data('time') * 1000);
|
|
|
|
|
|
$('.nav-btn').on('touchstart', function() {
|
|
|
$sideNav.css('pointer-events', 'none');
|
...
|
...
|
@@ -1907,6 +1909,38 @@ exports.set = function(c) { |
|
|
require("js/home/maybe-like")();
|
|
|
|
|
|
});
|
|
|
define("js/plugin/notice-scroll", ["jquery"], function(require, exports, module){
|
|
|
/**
|
|
|
* 公告栏目滚动
|
|
|
* bikai kai.bi@yoho.cn
|
|
|
*/
|
|
|
|
|
|
var $ = require("jquery");
|
|
|
|
|
|
function noticeScroll(selecter, time) {
|
|
|
var $notice = $(selecter),
|
|
|
$noticeItem = $notice.find('.notice-item'),
|
|
|
count = $noticeItem.length,
|
|
|
i = 1;
|
|
|
|
|
|
selecter = selecter || '.notice';
|
|
|
time = time || 3000;
|
|
|
|
|
|
if (count > 1) {
|
|
|
setInterval(function() {
|
|
|
if (i >= count) {
|
|
|
i = 0;
|
|
|
}
|
|
|
$noticeItem.fadeOut();
|
|
|
$notice.find('.item-' + i).fadeIn();
|
|
|
i++;
|
|
|
}, time);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
module.exports = noticeScroll;
|
|
|
|
|
|
});
|
|
|
define("js/home/maybe-like", ["jquery","hammer","lazyload"], function(require, exports, module){
|
|
|
/**
|
|
|
* “你可能喜欢”模块JS
|
...
|
...
|
@@ -7049,6 +7083,8 @@ var $ = require("jquery"), |
|
|
|
|
|
var diaLog = require("js/me/dialog");
|
|
|
|
|
|
var tip = require("js/plugin/tip");
|
|
|
|
|
|
var $navLi = $('#fav-tab > li'),
|
|
|
$favContainer = $('.fav-content > .fav-type'),
|
|
|
swiperObj = {},
|
...
|
...
|
@@ -7130,11 +7166,13 @@ function loadData($parent, url, page) { |
|
|
if (data === ' ') {
|
|
|
$loadingMask.addClass('hide');
|
|
|
$parent.closest('.fav-type').find('.fav-null-box').removeClass('hide');
|
|
|
window.rePosFooter();
|
|
|
} else if (data === 'end') {
|
|
|
|
|
|
//处理data等于end时如果loadingMask存在且没有hide样式的情况
|
|
|
if ($loadingMask && !$loadingMask.hasClass('hide')) {
|
|
|
$loadingMask.addClass('hide');
|
|
|
|
|
|
//$parent.closest('.fav-type').find('.fav-null-box').removeClass('hide');
|
|
|
}
|
|
|
|
...
|
...
|
@@ -7297,7 +7335,7 @@ $(document).on('touchend', '.swiper-header', function() { |
|
|
}
|
|
|
});
|
|
|
|
|
|
$('.invalidGoods').on('touchstart touchend', function() {
|
|
|
$('.invalidGoods').on('touchstart touchend', function(e) {
|
|
|
var $this = $(e.target).closest('span');
|
|
|
|
|
|
if ($this.hasClass('del-fav')) {
|
...
|
...
|
@@ -7306,6 +7344,7 @@ $('.invalidGoods').on('touchstart touchend', function() { |
|
|
tip.show('商品已下架');
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
});
|
|
|
define("js/me/suggest", ["jquery","hammer","lazyload","handlebars","source-map"], function(require, exports, module){
|
|
|
/**
|
...
|
...
|
@@ -8376,7 +8415,9 @@ define("js/me/index", ["jquery","swiper","index"], function(require, exports, mo |
|
|
* @author: bikai<kai.bi@yoho.cn>
|
|
|
* @date: 2015/11/12
|
|
|
*/
|
|
|
var $ = require("jquery");
|
|
|
var $ = require("jquery"),
|
|
|
noticeScroll = require("js/plugin/notice-scroll");
|
|
|
|
|
|
var $userAvatar = $('.user-avatar'),
|
|
|
$listItem = $('.list-item');
|
|
|
var myImage = new Image(),
|
...
|
...
|
@@ -8392,6 +8433,8 @@ myImage.onload = function() { |
|
|
$userAvatar.css('background-image', 'url(' + avatar + ')');
|
|
|
};
|
|
|
|
|
|
noticeScroll('.notice', $('.notice').data('time') * 1000);
|
|
|
|
|
|
$('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', function() {
|
|
|
$listItem.removeClass('highlight');
|
|
|
$(this).addClass('highlight');
|
...
|
...
|
|