...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2016-05-25 18:16:59
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2016-05-31 18:22:37
|
|
|
* @Last Modified time: 2016-06-01 14:28:28
|
|
|
*/
|
|
|
|
|
|
'use strict';
|
...
|
...
|
@@ -686,24 +686,24 @@ exports.handleSalePagerData = (total, params) => { |
|
|
} else if (currentPage <= 2) {
|
|
|
for (let i = currentPage - 1; i > 0; i--) {
|
|
|
dest = '<a href ="' + handleFilterUrl(params, { page: i }) +
|
|
|
'" class="cur">' + i + '</a>' + dest;
|
|
|
'">' + i + '</a>' + dest;
|
|
|
}
|
|
|
|
|
|
for (let i = currentPage + 1; i < (totalPage < 6 ? totalPage : 6); i++) {
|
|
|
dest += '<a href ="' + handleFilterUrl(params, { page: i }) +
|
|
|
'" class="cur">' + i + '</a>';
|
|
|
'">' + i + '</a>';
|
|
|
}
|
|
|
|
|
|
// 处理页码大于最大页-2的情况
|
|
|
} else if (currentPage > totalPage - 2) {
|
|
|
for (let i = currentPage + 1; i < totalPage + 1; i++) {
|
|
|
dest += '<a href ="' + handleFilterUrl(params, { page: i }) +
|
|
|
'" class="cur">' + i + '</a>';
|
|
|
'">' + i + '</a>';
|
|
|
}
|
|
|
|
|
|
for (let i = currentPage - 1; i > (currentPage - 5 > 1 ? currentPage - 5 : 1); i--) {
|
|
|
dest = '<a href ="' + handleFilterUrl(params, { page: i }) +
|
|
|
'" class="cur">' + i + '</a>' + dest;
|
|
|
'">' + i + '</a>' + dest;
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|