修复分页bug

This commit is contained in:
ibuler
2015-11-16 18:34:51 +08:00
parent 2938f7e506
commit f0d901e136
11 changed files with 11 additions and 1156 deletions

View File

@@ -47,13 +47,21 @@
var old_href = $(this).attr('href').replace('?', '');
var searchArray = searchStr.split('&');
if (searchStr == ''){
searchStr = '?page=1'
}
if (searchStr.indexOf('page')>=0){
searchArray.pop();
}
console.log(searchStr);
searchArray.push(old_href);
if (searchArray.length > 1){
console.log(searchArray);
if (searchArray.length > 1) {
$(this).attr('href', searchArray.join('&'));
}
{# sleep(1000)#}
})
});