This commit is contained in:
尹吉欢
2018-04-17 18:39:19 +08:00
parent 653d640b5f
commit 3e9115c727
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
/**服务端地址**/
//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.47:8086";
//var BASE_PATH = "http://192.168.10.161:8084";
+12
View File
@@ -55,6 +55,15 @@ var renameCitys = [{"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
@@ -68,5 +77,8 @@ function formatBaiduCity(baiduCity) {
break;
}
}
if (newCity == "" && baiduCity.endWith("市")) {
newCity = baiduCity.substring(0,baiduCity.length-1);
}
return newCity;
}