|
@@ -283,12 +283,28 @@
|
|
|
let lw_data
|
|
|
|
|
|
function queryData(page) {
|
|
|
- let post_data = {
|
|
|
- 'token': $.cookie('access_token'),
|
|
|
- 'page': page,
|
|
|
- 'line': 10,
|
|
|
- 'orderByupdate': orderByupdate
|
|
|
- };
|
|
|
+ let searchKey = $('input[name="optionsRadios"]:checked').val();
|
|
|
+ let searchVal = $('#searchInput').val()
|
|
|
+ var post_data = {}
|
|
|
+ if(searchVal) {
|
|
|
+ post_data = {
|
|
|
+ 'token': $.cookie('access_token'),
|
|
|
+ 'page': page,
|
|
|
+ 'line': 10,
|
|
|
+ 'orderByupdate': orderByupdate,
|
|
|
+ 'searchKey': searchKey,
|
|
|
+ 'searchVal': searchVal
|
|
|
+ };
|
|
|
+ }else {
|
|
|
+ post_data = {
|
|
|
+ 'token': $.cookie('access_token'),
|
|
|
+ 'page': page,
|
|
|
+ 'line': 10,
|
|
|
+ 'orderByupdate': orderByupdate
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
$.postJSON(
|
|
|
http_ip_prot + 'langWord/query', JSON.stringify(post_data),
|
|
|
function (data) {
|
|
@@ -528,6 +544,10 @@
|
|
|
}
|
|
|
|
|
|
function searchKeyAction() {
|
|
|
+ var page = GetUrlParam('page')
|
|
|
+ if (!page) {
|
|
|
+ page = 1
|
|
|
+ }
|
|
|
let searchKey = $('input[name="optionsRadios"]:checked').val();
|
|
|
let searchVal = $('#searchInput').val()
|
|
|
console.log('-------------------------------')
|
|
@@ -538,7 +558,7 @@
|
|
|
if (searchVal && searchKey) {
|
|
|
post_data = {
|
|
|
'token': $.cookie('access_token'),
|
|
|
- 'page': 1,
|
|
|
+ 'page': page,
|
|
|
'line': 10,
|
|
|
'searchKey': searchKey,
|
|
|
'searchVal': searchVal
|
|
@@ -546,7 +566,7 @@
|
|
|
} else {
|
|
|
post_data = {
|
|
|
'token': $.cookie('access_token'),
|
|
|
- 'page': 1,
|
|
|
+ 'page': page,
|
|
|
'line': 10,
|
|
|
};
|
|
|
}
|