...
|
...
|
@@ -3,6 +3,7 @@ |
|
|
* @author: zxr
|
|
|
* @date: 2016/8/16
|
|
|
*/
|
|
|
require('../../scss/home/_favorite.css');
|
|
|
var $ = require('yoho-jquery'),
|
|
|
Hammer = require('yoho-hammer'),
|
|
|
Swiper = require('yoho-swiper');
|
...
|
...
|
@@ -131,15 +132,18 @@ function loadData($parent, url, page) { |
|
|
|
|
|
// 如果从品牌收藏入口进入
|
|
|
if ($('#fav-tab').hasClass('brand-tab')) {
|
|
|
showFavTab(1);
|
|
|
loadData($favBrandList, 'favBrand', 1);
|
|
|
// showFavTab(1);
|
|
|
// loadData($favBrandList, 'favBrand', 1);
|
|
|
initSwiper($favBrandList.html());
|
|
|
brandTab = true;
|
|
|
window.rePosFooter();
|
|
|
brandLockId = false;// 请求成功后解锁品牌收藏page++
|
|
|
} else {
|
|
|
showFavTab(0);
|
|
|
loadData($favProductList, 'favProduct', 1);
|
|
|
// showFavTab(0);
|
|
|
// loadData($favProductList, 'favProduct', 1);
|
|
|
brandTab = false;
|
|
|
window.rePosFooter();
|
|
|
lockId = false;// 请求成功后解锁商品收藏page++
|
|
|
}
|
|
|
|
|
|
favTabHammer = new Hammer(document.getElementById('fav-tab'));
|
...
|
...
|
@@ -156,13 +160,13 @@ favTabHammer.on('tap', function(e) { |
|
|
if (index === 0) {
|
|
|
brandTab = false;
|
|
|
if ($favProductList.find('li').length === 0 &&
|
|
|
$favProductList.closest('.fav-type').find('.fav-null-box').hasClass('hide')) {
|
|
|
!$favProductList.closest('.fav-type').find('.fav-null-box').hasClass('show')) {
|
|
|
loadData($favProductList, 'favProduct', 1);
|
|
|
}
|
|
|
} else {
|
|
|
brandTab = true;
|
|
|
if ($favBrandList.find('div').length === 0 &&
|
|
|
$favBrandList.closest('.fav-type').find('.fav-null-box').hasClass('hide')) {
|
|
|
!$favBrandList.closest('.fav-type').find('.fav-null-box').hasClass('show')) {
|
|
|
loadData($favBrandList, 'favBrand', 1);
|
|
|
}
|
|
|
}
|
...
|
...
|
|