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-address03.png b/fangija-zsyf/images/icon-address03.png new file mode 100644 index 0000000..1cc4d39 Binary files /dev/null and b/fangija-zsyf/images/icon-address03.png differ 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 = $('