...
|
...
|
@@ -4,23 +4,20 @@ require('product/shop/redshop.page.css'); |
|
|
|
|
|
const $ = require('yoho-jquery');
|
|
|
const allProduct = require('./shop/all-product');
|
|
|
const newProuct = require('./shop/new-product');
|
|
|
let Tab = require('../plugin/tab');
|
|
|
|
|
|
let $filterBox = $('.filter-box');
|
|
|
let $goodsContainer = $('#goods-container');
|
|
|
|
|
|
Tab.prototype.filterhide = function() { // 隐藏筛选 TAB
|
|
|
Tab.prototype.home = function() { // 隐藏筛选 TAB
|
|
|
$filterBox.css('display', 'none');
|
|
|
};
|
|
|
Tab.prototype.filtershow = function() { // 显示筛选 TAB
|
|
|
Tab.prototype.getallgoods = function() { // 显示筛选 TAB
|
|
|
$filterBox.css('display', 'block');
|
|
|
if ($goodsContainer.find('.good-info').length < 1) {
|
|
|
allProduct.getGoodsList();
|
|
|
}
|
|
|
allProduct.getGoodsList({type: 'default', page: 0});
|
|
|
};
|
|
|
Tab.prototype.getnewgoods = function() {
|
|
|
newProuct.getNewGoods();
|
|
|
$filterBox.css('display', 'none');
|
|
|
allProduct.getGoodsList({type: 'new', page: 0});
|
|
|
};
|
|
|
|
|
|
// 页面打开直接加载筛选项
|
...
|
...
|
|