Browse Source

增加搜索时间显示

visuddhinanda 4 năm trước cách đây
mục cha
commit
bd9f260b35
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      app/search/paliword.js

+ 2 - 0
app/search/paliword.js

@@ -24,6 +24,8 @@ function paliword_search(keyword, words = new Array(), book = new Array()) {
 			let result = JSON.parse(data);
 			let result = JSON.parse(data);
 			console.log(result.time);
 			console.log(result.time);
 			let html = "";
 			let html = "";
+			let iTotleTime = result.time[result.time.length-1].time;
+			html += "<div>查询到 "+result.data.length+" 条结果 "+iTotleTime+"秒</div>";
 			for (const iterator of result.data) {
 			for (const iterator of result.data) {
 				html += render_word_result(iterator);
 				html += render_word_result(iterator);
 			}
 			}