Authored by 姜枫

fix bugs

... ... @@ -26,8 +26,8 @@
{{/stateText}}
</div>
<div class="desc">
<div class="brand-name">{{brandName}}</div>
<div class="product-name">{{productName}}</div>
<div class="brand-name"><a href="{{url}}" target="_blank">{{brandName}}</a></div>
<div class="product-name"><a href="{{url}}" target="_blank">{{productName}}</a></div>
<p class="price">¥{{round salesPrice 2}}</p>
</div>
... ...
... ... @@ -47,7 +47,7 @@ exports.createPagination = function(pagination, options) {
var template;
if (!pagination) {
if (!pagination || pagination.pageTotal === 1) {
return '';
}
... ...
... ... @@ -32,6 +32,14 @@ function doCancel(ids) {
});
}
function goodsChoose() {
if ($(this).parent('.goods-info', $root).hasClass('choose')) {
$(this).parent('.goods-info', $root).removeClass('choose');
} else {
$(this).parent('.goods-info', $root).addClass('choose');
}
}
function eventBind() {
$('.check-all', $root).check({
... ... @@ -45,14 +53,8 @@ function eventBind() {
}
});
$('.goods-img', $root).click(function() {
if ($(this).parent('.goods-info', $root).hasClass('choose')) {
$(this).parent('.goods-info', $root).removeClass('choose');
} else {
$(this).parent('.goods-info', $root).addClass('choose');
}
});
$('.choose-icon', $root).click(goodsChoose);
$('.goods-img', $root).click(goodsChoose);
$('.btn.cancel', $root).click(function() {
var id = $(this).parents('.goods-info').data('id');
... ...