metadata-1.0 处理bing ajax搜索无返回结果的bug
This commit is contained in:
parent
754320b7d2
commit
8d4f03728b
|
@ -533,6 +533,8 @@ function bingSearch(keyword){
|
|||
success:function(html){
|
||||
var items = [];
|
||||
var obj = jQuery.parseJSON(html);
|
||||
if(obj.SearchResponse.Web.Total==0)
|
||||
{$('#searchlist').html("No results!");return false;}
|
||||
$.each(obj.SearchResponse.Web.Results, function(key, val) {
|
||||
var html = '<p><a href="' +val['Url']+'">'+val['Title']+'<a/></p><p><span>'
|
||||
+val['DisplayUrl'].replace(/%(.*)/i,"") +'</span></p><p>'
|
||||
|
|
|
@ -499,6 +499,8 @@ function bingSearch(keyword){
|
|||
success:function(html){
|
||||
var items = [];
|
||||
var obj = jQuery.parseJSON(html);
|
||||
if(obj.SearchResponse.Web.Total==0)
|
||||
{$('#searchlist').html("No results!");return false;}
|
||||
$.each(obj.SearchResponse.Web.Results, function(key, val) {
|
||||
var html = '<p><a href="' +val['Url']+'">'+val['Title']+'<a/></p><p><span>'
|
||||
+val['DisplayUrl'].replace(/%(.*)/i,"") +'</span></p><p>'
|
||||
|
@ -564,7 +566,7 @@ zoomlevel--;
|
|||
new GLatLng(<?= $md->south; ?>,<?= $md->east; ?>),
|
||||
new GLatLng(<?= $md->south; ?>,<?= $md->west; ?>),
|
||||
new GLatLng(<?= $md->north; ?>,<?= $md->west; ?>)
|
||||
],"#f33f00",5,1,"#ff0000",0.2);
|
||||
],"#e4e4e4",5,1,"#FFFFFF",0.0);
|
||||
map.addOverlay(polygon);
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
|
|
@ -489,6 +489,8 @@ function bingSearch(keyword){
|
|||
success:function(html){
|
||||
var items = [];
|
||||
var obj = jQuery.parseJSON(html);
|
||||
if(obj.SearchResponse.Web.Total==0)
|
||||
{$('#searchlist').html("No results!");return false;}
|
||||
$.each(obj.SearchResponse.Web.Results, function(key, val) {
|
||||
var html = '<p><a href="' +val['Url']+'">'+val['Title']+'<a/></p><p><span>'
|
||||
+val['DisplayUrl'].replace(/%(.*)/i,"") +'</span></p><p>'
|
||||
|
|
Loading…
Reference in New Issue