From 4c89b814a3bad6c88a5b4201731de14859f32dfa Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Mon, 2 Apr 2018 14:27:24 +0800 Subject: [PATCH 01/10] aa --- fangija-zsyf/js/common.js | 26 ++++++++++++++++++++++---- fangija-zsyf/views/house/add.html | 20 +++----------------- fangija-zsyf/yfindex.html | 1 - 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/fangija-zsyf/js/common.js b/fangija-zsyf/js/common.js index 1bf58bb..caac7b6 100644 --- a/fangija-zsyf/js/common.js +++ b/fangija-zsyf/js/common.js @@ -7,22 +7,40 @@ document.addEventListener('touchstart',shield,false);//取消浏览器的所有 document.oncontextmenu=shield;//屏蔽选择函数 // H5 plus事件处理 var ws=null,as='pop-in'; +(function() { + var first = null; + mui.back = function() { //首次按键,提示‘再按一次退出应用’ + if (!first) { + first = new Date().getTime(); + mui.toast('再按一次退出应用'); + setTimeout(function() { + first = null; + }, 1000); + } else { + if (new Date().getTime() - first > 1000) { + plus.runtime.quit(); + } + } + }; +}) function plusReady(){ - ws=plus.webview.currentWebview(); + /*ws=plus.webview.currentWebview(); // Android处理返回键 plus.key.addEventListener('backbutton',function(){ - /*if (ws.id == 'yfindex.html') { + if (ws.id == 'yfindex.html') { + alert("aa") plus.nativeUI.confirm("确认退出",function(e) { + alert(e.index); if(e.index == 0) { plus.runtime.quit(); } }); } else { back(); - }*/ + } back(); },false); - compatibleAdjust(); + compatibleAdjust();*/ } if(w.plus){ plusReady(); diff --git a/fangija-zsyf/views/house/add.html b/fangija-zsyf/views/house/add.html index da47150..cc3882b 100644 --- a/fangija-zsyf/views/house/add.html +++ b/fangija-zsyf/views/house/add.html @@ -47,7 +47,7 @@
城 市
- +
@@ -89,20 +89,6 @@ -
  • @@ -135,7 +121,7 @@
    -
    +
    diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index 0fa8d17..82622d5 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -1197,7 +1197,6 @@ String.prototype.endWith = function(str) { var reg = new RegExp(str + "$"); return reg.test(this); } - /** * 获取手机上的信息,比如位置,手机ID * @author yinjihuan From 995866d19e5e15434734ddd56414f9d098bd0caa Mon Sep 17 00:00:00 2001 From: zongzhimin Date: Mon, 2 Apr 2018 16:29:56 +0800 Subject: [PATCH 02/10] =?UTF-8?q?YOUFANG=20=E8=AF=84=E4=BC=B0=E7=BB=93?= =?UTF-8?q?=E6=9E=9C+=E6=88=91=E7=9A=84=E5=85=B3=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/evaluate/evaluateReport.html | 282 +++++------------ fangija-zsyf/views/myfocus/myFocus.html | 288 ++++++++++++++++++ 2 files changed, 372 insertions(+), 198 deletions(-) create mode 100644 fangija-zsyf/views/myfocus/myFocus.html diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index 8307d46..5b4492c 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -104,19 +104,19 @@
  • - +
    均价走势
    -
    +
    @@ -128,7 +128,7 @@ @@ -238,6 +238,15 @@ $.config = {router: false} evaluate_msg.evaluate_words="暂无" } evaluate_msg.msg=h.evaluateMsg + $("#img").attr("src","http://192.168.10.161:8084/img/"+h.imgId); + loadingChart(h.city,h.region,h.name,2) + //按照时间范围加载数据 + $(".avgPriceTrend a").click(function(){ + var type = $(this).attr("data-id"); + $(".avgPriceTrend a").removeClass("active") + $(this).addClass('active'); + loadingChart(h.city,h.region,h.name,type); + }); } }).catch(function(error){ console.log(error) @@ -295,199 +304,76 @@ $(document).on('click','.open-vertical-modal', function () { + + + + + + + + + + +<#include "/monitor/monitor.html"> + + + \ No newline at end of file From ae7db80789bf501823c8d8b8f33590e6d9f6d436 Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Mon, 2 Apr 2018 18:57:48 +0800 Subject: [PATCH 03/10] bug --- fangija-zsyf/css/main.css | 5 +- fangija-zsyf/views/house/add.html | 289 ++++++++---------------------- fangija-zsyf/yfindex.html | 78 +++++--- 3 files changed, 139 insertions(+), 233 deletions(-) diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css index 95b9021..0666237 100644 --- a/fangija-zsyf/css/main.css +++ b/fangija-zsyf/css/main.css @@ -298,8 +298,9 @@ em.down{color:#88D053;} .popup-about02 .list-block.historyList{margin-top:-1px;} .popup-about02 .list-block.historyList .searchHistory{padding-top:0;} .newCss ul{padding:0.75rem;padding-top:0;padding-left:0.25rem;overflow:hidden;} -.newCss ul li{background:#F4F4F4;border-radius:0.16rem;display:inline-block;margin-left:0.5rem;margin-bottom:0.5rem;padding:0 0.5rem;line-height:1.5rem;} +.newCss ul li{background:#F4F4F4;border-radius:0.16rem;display:inline-block;margin-left:0.5rem;margin-bottom:0.5rem;padding:0 0.5rem;line-height:1.5rem;font-size:0.65rem;color:#333;} .newCss ul li span{font-size:0.65rem;color:#333;} +.newCss ul li a{font-size:0.65rem;color:#333;} .newCss ul:before,.popup-about02 .list-block.newCss ul:after{height:0;} .content-padded + .newCss ul{padding-bottom:0;} @@ -1211,6 +1212,8 @@ input[type=range]::-webkit-slider-thumb { .icon-around03:before { content: "\e610"; } +.icon-star:before { content: ""; } + /* 自适应 */ @media(max-width:414px){ .list-block .item-title span.c3a{max-width:220px;} diff --git a/fangija-zsyf/views/house/add.html b/fangija-zsyf/views/house/add.html index cc3882b..66f0d71 100644 --- a/fangija-zsyf/views/house/add.html +++ b/fangija-zsyf/views/house/add.html @@ -47,7 +47,10 @@
    城 市
    - + + + +
    @@ -59,7 +62,7 @@
    房屋地址
    - +
    @@ -151,6 +154,13 @@ 按城市等级 +
    +
    +
    +
    +
    +
    +
    @@ -165,8 +175,8 @@
    热门城市
    -

    北京

    -

    上海

    +

    北京

    +

    上海

    广州

    @@ -184,7 +194,7 @@
    A

    阿坝州

    -

    阿克苏

    +

    阿克苏

    阿拉尔

    阿勒泰

    阿里

    @@ -626,8 +636,8 @@
    一线城市
    -

    北京

    -

    上海

    +

    北京

    +

    上海

    广州

    深圳

    @@ -924,7 +934,7 @@

    陇南

    吴忠

    晋城

    -

    阿克苏

    +

    阿克苏

    喀什

    昌吉

    楚雄

    @@ -1020,144 +1030,21 @@
    + +
    +

    没有找到相关的小区

    +

    没搜到?立刻告诉我们

    +

    返回

    +
    +
    - - -
    -
    附近小区
    -
    -
      -
    • 龙盛佳苑
    • -
    • 米扬公寓
    • -
    • 大华阳城花园一期
    • -
    • 大华阳城花园七期
    • -
    • 沪太路1700弄小区
    • -
    • 浦联佳苑
    • -
    • 大华阳城花园
    • -
    • 大华阳城花园六期
    • -
    -
    -
    -
    +
    热门小区
    @@ -1165,39 +1052,28 @@
    历史记录
      -
    • 龙盛佳苑
    • -
    • 水韵华庭
    • -
    • 中远两湾城
    • -
    • 康宁坊
    • -
    • 雅鹿新苑
    • +
    • {{history.name}}
    • +
    +
    +
    +
    - From 79b14080f387d9f87b09257d5e909cdc845c7c75 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Tue, 3 Apr 2018 11:21:33 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E6=88=BF=E4=BA=A7?= =?UTF-8?q?=E8=AF=84=E4=BC=B0=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/evaluate/evaluateList.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fangija-zsyf/views/evaluate/evaluateList.html b/fangija-zsyf/views/evaluate/evaluateList.html index 8f976ee..2956840 100644 --- a/fangija-zsyf/views/evaluate/evaluateList.html +++ b/fangija-zsyf/views/evaluate/evaluateList.html @@ -73,9 +73,11 @@ $.config = {router: false} + - + + @@ -83,6 +85,8 @@ $.config = {router: false} - + + + + + + + + + + + + + + + + + \ No newline at end of file From 2c52b26a08fb22765566080559cff3d183ba3a10 Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Tue, 3 Apr 2018 16:04:16 +0800 Subject: [PATCH 09/10] shouye --- fangija-zsyf/yfindex.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index 08ab509..f66bd42 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -1753,7 +1753,7 @@ function addItems(number, lastIndex) { } if(dataObj[i].type=="活动"){ if(dataObj[i].adUrl!=null && dataObj[i].adUrl!=""){ - html += '
    '; + html += '
    '; }else{ html += '
    '; } From 6f56c953848bd890d3f12df622cc685d9ad68f92 Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Tue, 3 Apr 2018 16:05:00 +0800 Subject: [PATCH 10/10] aa --- fangija-zsyf/js/searchDistrict-add.js | 179 ++++++++++++++++++ .../js/updateVersion/searchDistrict-app.js | 176 +++++++++++++++++ 2 files changed, 355 insertions(+) create mode 100644 fangija-zsyf/js/searchDistrict-add.js create mode 100644 fangija-zsyf/js/updateVersion/searchDistrict-app.js diff --git a/fangija-zsyf/js/searchDistrict-add.js b/fangija-zsyf/js/searchDistrict-add.js new file mode 100644 index 0000000..fb6a808 --- /dev/null +++ b/fangija-zsyf/js/searchDistrict-add.js @@ -0,0 +1,179 @@ +var xhr; +var searchDistVue = new Vue({ + el: '#searchList', + data: { + searchDistricts: [] + },methods: { + openDistrictDetail:function(index) { + saveHistory({district:this.searchDistricts[index].region,name:this.searchDistricts[index].name,city:this.searchDistricts[index].city}) + $("#input_address").val(this.searchDistricts[index].name); + $("[name=region]").val(this.searchDistricts[index].region) + $("[name=name]").val(this.searchDistricts[index].name) + $("[name=cityAddress]").val(this.searchDistricts[index].city) + $("[name=address]").val(this.searchDistricts[index].address) + $.popup(".popup-about02") + } + } +}) + +$("#districtName").bind("input propertychange keyup" , function () { + var keyword = $(this).val() + if(xhr){ + xhr.abort() + } + if(keyword == ""){ + // $('.searchList #searchList').empty() + return + } + + axios.get(BASE_PATH+"/rest/districts/search", { + params: { + keywords : keyword, + cityName:$("#input_city").val(), + 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{ + $("#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() + var keys = [] + var newHistory = [] + newHistory.push(district) + keys.push(district.city + "#" + district.region + "#" + district.name) + for(var i = 0; i < history.length; i++){ + var key = history[i].city + "#" +history[i].region + "#" + history[i].name + if($.inArray(key, keys) > -1){ + continue + } + if(newHistory.length < 5){ + keys.push(key) + newHistory.push(history[i]) + }else{ + break + } + } + //$.cookie('history',JSON.stringify(newHistory) ,{ expires: 7}) + localStorage.setItem("history", JSON.stringify(newHistory)); +} + +function recover() { + //var history = $.cookie('history') + var history = localStorage.getItem('history'); + if(history == undefined || history == ''){ + return new Array() + } + return JSON.parse(history) +} +/* 弹出搜索小区页面 */ +$("body").delegate(".open-about02", "click", function () { + $("#districtName").val(""); + if($("#input_city").val()==""){ + $.toast("请选择城市") + return false; + } + $('.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); + }); +} +var histories = []; +var historyVue = new Vue({ + el: '#districtList', + data: { + histories: histories + },methods: { + openHistoryDetail:function(index) { + $("#input_address").val(this.histories[index].name); + $("[name=region]").val(this.histories[index].region); + $("[name=name]").val(this.histories[index].name); + $("[name=cityAddress]").val(this.histories[index].city); + $.popup(".popup-about02") + } + } +}) +function addHistory(){ + var history = recover() + if(history.length>0){ + histories = [] + $(history).each(function(){ + var map={city:this.city, region:this.district, name:this.name}; + histories.push(map) + }) + historyVue.histories=histories; + + + }/*else{ + $(".historyList #districtList").empty(); + }*/ +} + +//点击清空 +$("#clearSearchHistory").click(function(){ + localStorage.removeItem('history') + historyVue.histories=[]; +}); + diff --git a/fangija-zsyf/js/updateVersion/searchDistrict-app.js b/fangija-zsyf/js/updateVersion/searchDistrict-app.js new file mode 100644 index 0000000..dab006f --- /dev/null +++ b/fangija-zsyf/js/updateVersion/searchDistrict-app.js @@ -0,0 +1,176 @@ +var xhr; +var searchDistVue = new Vue({ + el: '#searchList', + data: { + searchDistricts: [] + },methods: { + openDistrictDetail:function(index) { + saveHistory({district:this.searchDistricts[index].region,name:this.searchDistricts[index].name,city:this.searchDistricts[index].city}) + clicked(BASE_PATH+'/district/details?city='+this.searchDistricts[index].city+'®ion='+this.searchDistricts[index].region+'&name='+this.searchDistricts[index].name,true); + } + } +}) + +$("#districtName").bind("input propertychange keyup" , function () { + var keyword = $(this).val() + if(xhr){ + xhr.abort() + } + if(keyword == ""){ + // $('.searchList #searchList').empty() + return + } + + 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() + var keys = [] + var newHistory = [] + newHistory.push(district) + keys.push(district.city + "#" + district.region + "#" + district.name) + for(var i = 0; i < history.length; i++){ + var key = history[i].city + "#" +history[i].region + "#" + history[i].name + if($.inArray(key, keys) > -1){ + continue + } + if(newHistory.length < 5){ + keys.push(key) + newHistory.push(history[i]) + }else{ + break + } + } + //$.cookie('history',JSON.stringify(newHistory) ,{ expires: 7}) + localStorage.setItem("history", JSON.stringify(newHistory)); +} + +function recover() { + //var history = $.cookie('history') + var history = localStorage.getItem('history'); + if(history == undefined || history == ''){ + return new Array() + } + return JSON.parse(history) +} +/* 弹出搜索小区页面 */ +$("body").delegate(".open-about02", "click", function () { + $("#districtName").val(""); + if($("#input_city").text()==""){ + $.toast("请选择城市") + return false; + } + $('.historyList').show(); + $("#notFound").hide(); + $('.hotList').show(); + $('.searchList').hide(); + addHotDistricts($("#input_city").text()); + 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); + }); +} +var histories = []; +var historyVue = new Vue({ + el: '#districtList', + data: { + histories: histories + },methods: { + openHistoryDetail:function(index) { + clicked(BASE_PATH+'/district/details?city='+this.histories[index].city+'®ion='+this.histories[index].region+'&name='+this.histories[index].name,true); + } + } +}) +function addHistory(){ + var history = recover() + if(history.length>0){ + histories = [] + $(history).each(function(){ + var map={city:this.city, region:this.district, name:this.name}; + histories.push(map) + }) + historyVue.histories=histories; + + + }/*else{ + $(".historyList #districtList").empty(); + }*/ +} + +//点击清空 +$("#clearSearchHistory").click(function(){ + //$.cookie('history',JSON.stringify([]) ,{ expires: 7}); + localStorage.removeItem('history') + historyVue.histories=[]; + //$("#districtList").empty(); + //$.popup(".popup-about02") +}); +