...
|
...
|
@@ -9,6 +9,7 @@ var YohoListPage = { |
|
|
rootDoc: $('.yoho-product-list'),
|
|
|
brandsDoc: $('.yoho-product-list .brand-list'),
|
|
|
mulitBrand: false,
|
|
|
mulitStyle: false,
|
|
|
goodsWrapper: $('.goods-area .goods-wrapper'),
|
|
|
goodsWrapperState: false,
|
|
|
page: query.page || 1,
|
...
|
...
|
@@ -41,7 +42,8 @@ var YohoListPage = { |
|
|
|
|
|
YohoListPage.go({
|
|
|
msort: categoryId,
|
|
|
misort: subCategoryId
|
|
|
misort: subCategoryId,
|
|
|
page: 1
|
|
|
});
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -82,6 +84,36 @@ var YohoListPage = { |
|
|
YohoListPage.go({color: $(this).data('value')});
|
|
|
});
|
|
|
|
|
|
|
|
|
$('.style-body .input-radio', this.rootDoc).check({
|
|
|
type: 'radio',
|
|
|
group: 'style',
|
|
|
onChange: function(ele, checked, value) {
|
|
|
if (!YohoListPage.mulitStyle) {
|
|
|
YohoListPage.go({style: value});
|
|
|
} else {
|
|
|
$('.style-btns', this.rootDoc).removeClass('hide');
|
|
|
if ($('.style-body .input-radio', this.rootDoc).check('getChecked').values.length > 0) {
|
|
|
$('.style-btns .confirm', this.rootDoc).removeClass('disable');
|
|
|
} else {
|
|
|
$('.style-btns .confirm', this.rootDoc).addClass('disable');
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$('.standard-body .input-radio', this.rootDoc).check({
|
|
|
type: 'radio',
|
|
|
group: 'standard',
|
|
|
onChange: function(ele, checked, value) {
|
|
|
var parentId = $(ele).parents('.body').data('value');
|
|
|
|
|
|
YohoListPage.go({
|
|
|
standard: parentId + ',' + value
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
YohoListPage.eventBind();
|
|
|
},
|
|
|
initAccordion() {
|
...
|
...
|
@@ -138,6 +170,18 @@ var YohoListPage = { |
|
|
}
|
|
|
});
|
|
|
|
|
|
$('.style-btns .cancel', this.rootDoc).click(function() {
|
|
|
YohoListPage.closeStyleMulit();
|
|
|
});
|
|
|
|
|
|
$('.style-btns .confirm', this.rootDoc).click(function() {
|
|
|
if (!$(this).hasClass('disable')) {
|
|
|
YohoListPage.go({
|
|
|
style: $('.style-body .input-radio', YohoListPage.rootDoc).check('getChecked').values.join(',')
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$('.yoho-product-list .brand-body input').on('keyup', function() {
|
|
|
YohoListPage.filterBrand($(this).val().toLowerCase());
|
|
|
});
|
...
|
...
|
@@ -235,6 +279,14 @@ var YohoListPage = { |
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$('.style-mulit-btn .btn', this.rootDoc).click(function() {
|
|
|
if ($(this).hasClass('white')) {
|
|
|
YohoListPage.openStyleMulit();
|
|
|
} else {
|
|
|
YohoListPage.closeStyleMulit();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
openBrandMulitChoose: function() {
|
|
|
$('.yoho-product-list .mulit-choose').hide();
|
...
|
...
|
@@ -254,6 +306,26 @@ var YohoListPage = { |
|
|
type: 'radio'
|
|
|
});
|
|
|
},
|
|
|
|
|
|
openStyleMulit: function() {
|
|
|
$('.style-btns', this.rootDoc).removeClass('hide');
|
|
|
$('.style-body .input-radio', this.rootDoc).check({
|
|
|
type: 'checkbox'
|
|
|
});
|
|
|
YohoListPage.mulitStyle = true;
|
|
|
$('.style-mulit-btn .btn').removeClass('white');
|
|
|
},
|
|
|
|
|
|
closeStyleMulit: function() {
|
|
|
$('.style-btns', this.rootDoc).addClass('hide');
|
|
|
$('.style-body .input-radio', this.rootDoc).check('unCheckAll');
|
|
|
$('.style-body .input-radio', this.rootDoc).check({
|
|
|
type: 'radio'
|
|
|
});
|
|
|
YohoListPage.mulitStyle = false;
|
|
|
$('.style-mulit-btn .btn').addClass('white');
|
|
|
},
|
|
|
|
|
|
showBrandMulitBtn: function() {
|
|
|
$('.brand-btns', this.rootDoc).removeClass('hide');
|
|
|
if (YohoListPage.getSelectBrands().length > 0) {
|
...
|
...
|
|