add
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/**服务端地址**/
|
/**服务端地址**/
|
||||||
//var BASE_PATH = "http://192.168.10.128:8084";
|
//var BASE_PATH = "http://192.168.10.128:8084";
|
||||||
var BASE_PATH = "http://192.168.10.47:8086";
|
//var BASE_PATH = "http://192.168.10.47:8086";
|
||||||
//var BASE_PATH = "http://192.168.10.161:8084";
|
//var BASE_PATH = "http://192.168.10.161:8084";
|
||||||
var BASE_PATH = "http://192.168.10.47:8086";
|
var BASE_PATH = "http://192.168.10.47:8086";
|
||||||
//var BASE_PATH = "http://192.168.10.161:8084";
|
//var BASE_PATH = "http://192.168.10.161:8084";
|
||||||
|
|||||||
@@ -55,6 +55,15 @@ var renameCitys = [{"baiduCity": "阿克苏地区", "city": "阿克苏"},
|
|||||||
{"baiduCity": "延边朝鲜族自治州", "city": "延边"},
|
{"baiduCity": "延边朝鲜族自治州", "city": "延边"},
|
||||||
{"baiduCity": "伊犁哈萨克自治州", "city": "伊犁"},
|
{"baiduCity": "伊犁哈萨克自治州", "city": "伊犁"},
|
||||||
{"baiduCity": "玉树藏族自治州", "city": "玉树州"}];
|
{"baiduCity": "玉树藏族自治州", "city": "玉树州"}];
|
||||||
|
String.prototype.startWith=function(str){
|
||||||
|
var reg=new RegExp("^"+str);
|
||||||
|
return reg.test(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
String.prototype.endWith=function(str){
|
||||||
|
var reg=new RegExp(str+"$");
|
||||||
|
return reg.test(this);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 把百度的城市格式化成房价网的城市
|
* 把百度的城市格式化成房价网的城市
|
||||||
* @param baiduCity
|
* @param baiduCity
|
||||||
@@ -68,5 +77,8 @@ function formatBaiduCity(baiduCity) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (newCity == "" && baiduCity.endWith("市")) {
|
||||||
|
newCity = baiduCity.substring(0,baiduCity.length-1);
|
||||||
|
}
|
||||||
return newCity;
|
return newCity;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user