|
|
var lazyload = require('yoho-jquery-lazyload');
|
|
|
|
|
|
var Dialog = require('../plugins/dialog').Dialog;
|
|
|
var tplFn = require('../../tpl/product/shop-goods.hbs');
|
|
|
|
|
|
require('../common/header');
|
...
|
...
|
@@ -16,6 +17,11 @@ $(function() { |
|
|
var total = parseInt($('.total-page', $order).text(), 10);
|
|
|
var page = 1;
|
|
|
var orderBy;
|
|
|
var infoDaialog = new Dialog({
|
|
|
className: 'brand-info-dialog',
|
|
|
content: $('.brand-info-wrapper').html(),
|
|
|
keep: true
|
|
|
});
|
|
|
|
|
|
function refreshProducts(data) {
|
|
|
$('.cur-page', $order).text(page);
|
...
|
...
|
@@ -35,8 +41,9 @@ $(function() { |
|
|
|
|
|
$($nextPage).click(function() {
|
|
|
if (!$(this).hasClass('disable') && page < total) {
|
|
|
page += 1;
|
|
|
$.get('/product/shop/query/all', {
|
|
|
page: page++,
|
|
|
page: page,
|
|
|
shopId: shopId
|
|
|
}, function(data) {
|
|
|
refreshProducts(data);
|
...
|
...
|
@@ -46,8 +53,9 @@ $(function() { |
|
|
|
|
|
$($prePage).click(function() {
|
|
|
if (!$(this).hasClass('disable') && page > 1) {
|
|
|
page -= 1;
|
|
|
$.get('/product/shop/query/all', {
|
|
|
page: page--,
|
|
|
page: page,
|
|
|
shopId: shopId
|
|
|
}, function(data) {
|
|
|
refreshProducts(data);
|
...
|
...
|
@@ -88,5 +96,12 @@ $(function() { |
|
|
refreshProducts(data);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('#brand-info').click(function() {
|
|
|
infoDaialog.show();
|
|
|
$('.brand-info').addClass('nano');
|
|
|
$('.brand-info').nanoScroller();
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
...
|
...
|
|