Authored by 姜枫

修改列表页bug

... ... @@ -10,7 +10,7 @@ const list = {
index: (req, res, next) => {
let q = req.query;
q.page = q.page || 1;
q.page = parseInt(q.page || 1, 10);
let retData = {
module: 'product',
... ... @@ -54,7 +54,7 @@ const list = {
newPage: (req, res, next) => {
let q = req.query;
q.page = q.page || 1;
q.page = parseInt(q.page || 1, 10);
let retData = {
module: 'product',
... ...
... ... @@ -17,7 +17,7 @@ const Query = {
index: (req, res, next) => {
let q = req.query;
q.page = q.page || 1;
q.page = parseInt(q.page || 1, 10);
let retData = {
module: 'product',
... ...
... ... @@ -57,11 +57,16 @@ const shop = {
let uid = cookie.getUid(req);
let q = req.query;
q.page = q.page || 1;
q.page = parseInt(q.page || 1, 10);
ShopData.getShopHeadData(domain, uid).then(result => {
data.banner = result;
if (data.banner.banner) {
data.banner.banner = data.banner.banner.split('?')[0];
}
if (result.brandId) {
q.brand = result.brandId;
q.shop_id = result.shopId;
... ...
... ... @@ -166,7 +166,9 @@ const helpers = {
return b.brandName;
}).join('、');
filters.push(this.newFilter('brand', q.brand, brandNames));
if (brandNames) {
filters.push(this.newFilter('brand', q.brand, brandNames));
}
}
if (q.color) {
... ...
... ... @@ -13,7 +13,7 @@
<span>{{total}}</span>件商品
</label>
<label class="page-info"><span class="cur-page">{{page}}</span>/<span class="total-page">{{pageTotal}}</span></label>
{{#isEqual page 1}}
{{#isEqual page '1'}}
<span class="iconfont page disable page-pre">&#xe607;</span>
{{^}}
<span class="iconfont page page-pre">&#xe607;</span>
... ...
... ... @@ -176,11 +176,11 @@ var YohoListPage = {
if (!$(this).hasClass('disable')) {
if ($(this).hasClass('page-pre')) {
YohoListPage.go({
page: YohoListPage.page - 1
page: parseInt(YohoListPage.page, 10) - 1
});
} else {
YohoListPage.go({
page: YohoListPage.page + 1
page: parseInt(YohoListPage.page, 10) + 1
});
}
}
... ...