Showing
2 changed files
with
6 additions
and
4 deletions
@@ -330,8 +330,9 @@ exports.handleSaleOptsData = (params, total) => { | @@ -330,8 +330,9 @@ exports.handleSaleOptsData = (params, total) => { | ||
330 | dest.curPage = _.isEmpty(params.page) ? 1 : params.page; // 当前页码数 | 330 | dest.curPage = _.isEmpty(params.page) ? 1 : params.page; // 当前页码数 |
331 | 331 | ||
332 | // 上一页下一页 | 332 | // 上一页下一页 |
333 | - let preHref = (!_.isEmpty(params.page) && params.page > 1) ? params.page - 1 : 1; | ||
334 | - let nextHref = (!_.isEmpty(params.page)) ? params.page + 1 : 2; | 333 | + let preHref = (!_.isEmpty(params.page) && parseInt(params.page, 10) > 1) ? |
334 | + parseInt(params.page, 10) - 1 : 1; | ||
335 | + let nextHref = (!_.isEmpty(params.page)) ? parseInt(params.page, 10) + 1 : 2; | ||
335 | 336 | ||
336 | dest.preHref = handleFilterUrl(params, {page: preHref}); | 337 | dest.preHref = handleFilterUrl(params, {page: preHref}); |
337 | dest.nextHref = handleFilterUrl(params, {page: nextHref}); | 338 | dest.nextHref = handleFilterUrl(params, {page: nextHref}); |
@@ -496,8 +496,9 @@ exports.handleSaleOptsData = (params, total, extra) => { | @@ -496,8 +496,9 @@ exports.handleSaleOptsData = (params, total, extra) => { | ||
496 | dest.curPage = _.isEmpty(params.page) ? 1 : params.page; // 当前页码数 | 496 | dest.curPage = _.isEmpty(params.page) ? 1 : params.page; // 当前页码数 |
497 | 497 | ||
498 | // 上一页下一页 | 498 | // 上一页下一页 |
499 | - let preHref = (!_.isEmpty(params.page) && params.page > 1) ? params.page - 1 : 1; | ||
500 | - let nextHref = (!_.isEmpty(params.page)) ? params.page + 1 : 2; | 499 | + let preHref = (!_.isEmpty(params.page) && parseInt(params.page, 10) > 1) ? |
500 | + parseInt(params.page, 10) - 1 : 1; | ||
501 | + let nextHref = (!_.isEmpty(params.page)) ? parseInt(params.page, 10) + 1 : 2; | ||
501 | 502 | ||
502 | dest.preHref = handleFilterUrl(params, {page: preHref}); | 503 | dest.preHref = handleFilterUrl(params, {page: preHref}); |
503 | dest.nextHref = handleFilterUrl(params, {page: nextHref}); | 504 | dest.nextHref = handleFilterUrl(params, {page: nextHref}); |
-
Please register or login to post a comment