diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js
index 39a89b6..fc576e7 100644
--- a/fangija-zsyf/config.js
+++ b/fangija-zsyf/config.js
@@ -1,2 +1,2 @@
/**服务端地址**/
-var BASE_PATH = "http://192.168.10.128:8084";
\ No newline at end of file
+var BASE_PATH = "http://192.168.10.53:8084";
\ No newline at end of file
diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css
index 8067a11..3d449db 100644
--- a/fangija-zsyf/css/main.css
+++ b/fangija-zsyf/css/main.css
@@ -327,10 +327,10 @@ i.loginIcon03{width:14px;height:24px;background:url(../images/loginIcon03.png) n
.popup-about02 .list-block.historyList{margin-top:-1px;}
.popup-about02 .list-block.historyList .searchHistory{padding-top:0;}
-.popup-about02 .list-block ul{padding:0.75rem;padding-top:0;padding-left:0.25rem;overflow:hidden;}
-.popup-about02 .list-block ul li{background:#F4F4F4;border-radius:0.16rem;float:left;margin-left:0.5rem;margin-bottom:0.5rem;padding:0 0.75rem;line-height:1.5rem;}
-.popup-about02 .list-block ul li a{font-size:0.65rem;color:#333;}
-.popup-about02 .list-block ul:before,.popup-about02 .list-block ul:after{height:0;}
+.popup-about02 .list-block.newCss ul{padding:0.75rem;padding-top:0;padding-left:0.25rem;overflow:hidden;}
+.popup-about02 .list-block.newCss ul li{background:#F4F4F4;border-radius:0.16rem;float:left;margin-left:0.5rem;margin-bottom:0.5rem;padding:0 0.5rem;line-height:1.5rem;}
+.popup-about02 .list-block.newCss ul li a{font-size:0.65rem;color:#333;}
+.popup-about02 .list-block.newCss ul:before,.popup-about02 .list-block.newCss ul:after{height:0;}
.list-block .item-content label.label-checkbox{float:left;padding-left:0;}
.list-block .item-content label.label-checkbox .item-media{width:auto;height:auto;padding:0;margin:0;}
diff --git a/fangija-zsyf/fangija-zsyf/index.html b/fangija-zsyf/fangija-zsyf/index.html
new file mode 100644
index 0000000..a9d1c8d
--- /dev/null
+++ b/fangija-zsyf/fangija-zsyf/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/fangija-zsyf/images/icon-clear.png b/fangija-zsyf/images/icon-clear.png
new file mode 100644
index 0000000..495cb32
Binary files /dev/null and b/fangija-zsyf/images/icon-clear.png differ
diff --git a/fangija-zsyf/js/district-search.js b/fangija-zsyf/js/district-search.js
new file mode 100644
index 0000000..e69de29
diff --git a/fangija-zsyf/js/searchDistrict-app.js b/fangija-zsyf/js/searchDistrict-app.js
index 8a0fc78..5a54d6a 100644
--- a/fangija-zsyf/js/searchDistrict-app.js
+++ b/fangija-zsyf/js/searchDistrict-app.js
@@ -1,35 +1,57 @@
var xhr;
+var searchDistVue = new Vue({
+ el: '#searchList',
+ data: {
+ searchDistricts: []
+ }
+ })
$("#districtName").bind("input propertychange keyup" , function () {
var keyword = $(this).val()
if(xhr){
xhr.abort()
}
if(keyword == ""){
- $('#districtList').empty()
+ // $('.searchList #searchList').empty()
return
}
- xhr = $.ajax({
- url:'../auto/district',
- data:{keywords : keyword, cityName:$("#input_city").text(),max:20},
- dataType:'json',
- success:function (data){
- $('#searchHistoryDiv').hide();
- if(data.length == 0){
- $("#notFound").show()
- $('#districtList').empty();
- }else{
- $("#notFound").hide()
- var html = $('')
- $(data).each(function () {
- var li = $('- ').attr("data-region", this.district).attr("data-name", this.name).attr("data-addr", this.address).attr("data-cityAddress", this.city)
- li.append('')
- html.append(li)
- })
- $('#districtList').empty().html(html)
- }
- }
- })
- })
+
+ axios.get(BASE_PATH+"/rest/districts/search", {
+ params: {
+ keywords : keyword,
+ cityName:$("#input_city").text(),
+ max:20
+ }
+ }).then(function (response) {
+
+ var datas = response.data.data
+
+ $('.hotList').hide();
+ $('.historyList').hide();
+ if(datas == null || datas.length == 0){
+ $("#notFound").show()
+ searchDistVue.$data.searchDistricts = []
+ //$('.searchList #searchList').empty();
+ }else{
+
+ console.log(keyword +" "+datas.length);
+ $("#notFound").hide()
+ var dists = [];
+ for(var i in datas){
+ var o = datas[i]
+ var map={city:o.city, region:o.district, name:o.name,address:o.address};
+ dists.push(map);
+ }
+
+ //searchDistVue.$set("searchDistricts") = dists;
+ searchDistVue.$data.searchDistricts=dists
+ $('.searchList').show();
+ }
+ }).catch(function (error) {
+ alert(error)
+ console.log(error);
+ });
+
+})
function saveHistory(district) {
var history = recover()
@@ -66,24 +88,66 @@ $("body").delegate(".open-about02", "click", function () {
$.toast("请选择城市")
return false;
}
- $('#searchHistoryDiv').show();
+ $('.historyList').show();
$("#notFound").hide();
+ $('.hotList').show();
+ $('.searchList').hide();
+ addHotDistricts($("#input_city").val());
addHistory();
$.popup(".popup-about02")
$("input").blur()
-});
+});
+
+//添加热门小区
+function addHotDistricts(cityParam){
+ axios.get(BASE_PATH+"/rest/districts/hotDistricts", {
+ params: {
+ city: cityParam,
+ top:6
+ }
+ }).then(function (response) {
+
+ var datas = response.data.data
+ if(datas.length>0){
+ var dists = [];
+ for(var i in datas){
+
+ var o = datas[i]
+ var map={city:o.city, region:o.region, name:o.name};
+ dists.push(map);
+ }
+
+ new Vue({
+ el: '#hotList',
+ data: {
+ hotDists: dists
+ }
+ })
+
+ }
+
+ }).catch(function (error) {
+ alert(error)
+ console.log(error);
+ });
+}
function addHistory(){
var history = recover()
if(history.length>0){
- var ul = '
'
+ var histories = [];
$(history).each(function(){
- ul += '';
+ var map={city:this.city, region:this.district, name:this.name};
+ histories.push(map)
+ })
+ new Vue({
+ el: '#districtList',
+ data: {
+ histories: histories
+ }
})
- ul += '
'
- $('#districtList').empty().html(ul)
}else{
- $("#districtList").empty();
+ $(".historyList #districtList").empty();
}
}
diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html
index da354ed..f89782f 100644
--- a/fangija-zsyf/yfindex.html
+++ b/fangija-zsyf/yfindex.html
@@ -1352,101 +1352,51 @@
+
+
+
没有找到相关的小区
+
没搜到?立刻告诉我们
+
+
+
-
+
@@ -1458,7 +1408,7 @@ $.config = {router: false}
-
+
@@ -1467,8 +1417,7 @@ $.config = {router: false}
-
-
+