|
@@ -251,7 +251,7 @@
|
|
InitIndex(post_data)
|
|
InitIndex(post_data)
|
|
}
|
|
}
|
|
|
|
|
|
- function InitIndex(post_data) {
|
|
|
|
|
|
+ function InitIndex(post_data, is_search = 0) {
|
|
$.postJSON(
|
|
$.postJSON(
|
|
http_ip_prot + 'langWord/query', JSON.stringify(post_data),
|
|
http_ip_prot + 'langWord/query', JSON.stringify(post_data),
|
|
function (data) {
|
|
function (data) {
|
|
@@ -260,13 +260,17 @@
|
|
console.log(data)
|
|
console.log(data)
|
|
addTable(data['res'])
|
|
addTable(data['res'])
|
|
let count_page = Math.ceil(data['res']['count'] / line)
|
|
let count_page = Math.ceil(data['res']['count'] / line)
|
|
|
|
+ var current_page = GetUrlParam('page');
|
|
|
|
+ if(is_search === 1){
|
|
|
|
+ current_page = 1;
|
|
|
|
+ }
|
|
$('#pagination').pagination({
|
|
$('#pagination').pagination({
|
|
pages: count_page, //总页数
|
|
pages: count_page, //总页数
|
|
// pages: 10000, //总页数
|
|
// pages: 10000, //总页数
|
|
edges: 2,
|
|
edges: 2,
|
|
cssStyle: 'pagination', //按纽大小pagination-lg或写入自定义css
|
|
cssStyle: 'pagination', //按纽大小pagination-lg或写入自定义css
|
|
displayedPages: 5, //显示几个
|
|
displayedPages: 5, //显示几个
|
|
- currentPage: GetUrlParam('page'),
|
|
|
|
|
|
+ currentPage: current_page,
|
|
onPageClick: function (pageNumber, event) {
|
|
onPageClick: function (pageNumber, event) {
|
|
//点击时调用
|
|
//点击时调用
|
|
// alert(pageNumber);
|
|
// alert(pageNumber);
|
|
@@ -594,10 +598,11 @@
|
|
}
|
|
}
|
|
|
|
|
|
function searchKeyAction() {
|
|
function searchKeyAction() {
|
|
- var page = GetUrlParam('page')
|
|
|
|
|
|
+ /*var page = GetUrlParam('page')
|
|
if (!page) {
|
|
if (!page) {
|
|
page = 1
|
|
page = 1
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
+ let page = 1
|
|
let searchKey = $('input[name="optionsRadios"]:checked').val();
|
|
let searchKey = $('input[name="optionsRadios"]:checked').val();
|
|
let searchVal = $('#searchInput').val()
|
|
let searchVal = $('#searchInput').val()
|
|
console.log('-------------------------------')
|
|
console.log('-------------------------------')
|
|
@@ -611,16 +616,18 @@
|
|
'page': page,
|
|
'page': page,
|
|
'line': 10,
|
|
'line': 10,
|
|
'searchKey': searchKey,
|
|
'searchKey': searchKey,
|
|
- 'searchVal': searchVal
|
|
|
|
|
|
+ 'searchVal': searchVal,
|
|
|
|
+ 'langType': 2
|
|
};
|
|
};
|
|
} else {
|
|
} else {
|
|
post_data = {
|
|
post_data = {
|
|
'token': $.cookie('access_token'),
|
|
'token': $.cookie('access_token'),
|
|
'page': page,
|
|
'page': page,
|
|
'line': 10,
|
|
'line': 10,
|
|
|
|
+ 'langType': 2
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- InitIndex(post_data)
|
|
|
|
|
|
+ InitIndex(post_data, 1)
|
|
}
|
|
}
|
|
|
|
|
|
function onReset() {
|
|
function onReset() {
|