2023-11-12 18:12:42 +00:00
|
|
|
function wiki_search(go) {
|
|
|
|
if ($('#search').val() == '') {
|
|
|
|
$('#search_result').css('display', 'none');
|
2023-03-04 23:45:46 +00:00
|
|
|
|
2023-11-12 18:12:42 +00:00
|
|
|
return;
|
|
|
|
}
|
2023-03-04 23:45:46 +00:00
|
|
|
|
2023-11-12 18:12:42 +00:00
|
|
|
loading(1);
|
2023-03-04 23:45:46 +00:00
|
|
|
|
2023-11-12 18:12:42 +00:00
|
|
|
$.ajax({
|
|
|
|
type: 'POST',
|
|
|
|
url: home + 'wiki/section/search',
|
|
|
|
data: 'text=' + $('#search').val(),
|
|
|
|
dataType: 'json',
|
|
|
|
success: function (data) {
|
|
|
|
$.each(data, function (i, val) {
|
|
|
|
if (i == 's') {
|
|
|
|
if (val != '') {
|
|
|
|
$('#search_result').css('display', 'block');
|
|
|
|
$('#search_result').html(val);
|
|
|
|
} else
|
|
|
|
$('#search_result').css('display', 'none');
|
|
|
|
}
|
|
|
|
});
|
2023-03-04 23:45:46 +00:00
|
|
|
|
2023-11-12 18:12:42 +00:00
|
|
|
loading(0);
|
|
|
|
}
|
|
|
|
});
|
2023-03-04 23:45:46 +00:00
|
|
|
}
|