From 6595ce0055fdc2ffa682bb2379ebd349329a50d4 Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Thu, 12 Apr 2018 10:53:15 +0800 Subject: [PATCH 1/4] aa --- .../views/evaluate/evaluateReport.html | 4 +++ fangija-zsyf/views/house/houseDetail.html | 1 - fangija-zsyf/views/house/houseManageList.html | 32 +++++++------------ 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index fcaf420..8d3cea7 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -276,6 +276,9 @@ function addManagement(id, houseStatus, liveStatus){ if(status){ $.toast(response.data.data); window.location.reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + plus.webview.getWebviewById('views/house/houseList.html').reload(); }else{ $.toast(response.data.message); } @@ -301,6 +304,7 @@ $(".content-block .button").on("click", function () { /* 房产用途 */ $(document).on('click','.open-vertical-modal', function () { + var houseStatus = 0; $.modal({ title: '房产用途', verticalButtons: true, diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html index a55ccdb..65cdb6a 100644 --- a/fangija-zsyf/views/house/houseDetail.html +++ b/fangija-zsyf/views/house/houseDetail.html @@ -601,7 +601,6 @@ $.config = {router: false} } }) .then(function (response) { - console.log(response.data.data) //0:涨幅排行 1:潜力排行 2:均价排行 new Vue({ el: '#countryRank', diff --git a/fangija-zsyf/views/house/houseManageList.html b/fangija-zsyf/views/house/houseManageList.html index c6dad89..4f192d4 100644 --- a/fangija-zsyf/views/house/houseManageList.html +++ b/fangija-zsyf/views/house/houseManageList.html @@ -104,16 +104,6 @@ $.config = {router: false} //调用mui.init方法 $.init() -//判断是否登录 -function checkIsLogin(){ - if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ - $('#dataList').hide(); - $('#noData').show(); - }else{ - selectEvaluateList(); - } -} - /* 房产用途 */ $(document).on('click','.open-vertical-modal', function () { //获取对应
  • 栏目存储的houseinfo id @@ -167,7 +157,6 @@ function addManagement(id, houseStatus, liveStatus){ console.log(error); }); } - //查询房产评估列表AJAX请求 function selectEvaluateList(){ //先清空列表 @@ -178,18 +167,17 @@ function selectEvaluateList(){ params: {} }).then(function (response) { var resultsMap = response.data.data; - var results = resultsMap.houseInfoList; - if(resultsMap.houseInfoList.length==0){ + if(response.data.data==null || resultsMap.houseInfoList==null || resultsMap.houseInfoList.length==0){ $('#dataList').hide(); $('#noData').show(); }else{ $('#dataList').show(); $('#noData').hide(); + var results = resultsMap.houseInfoList; var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap; var cityAvgPriceMap = resultsMap.cityAvgPriceMap; //构造数据列表 htmlContent = constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap, htmlContent); - //动态追加内容 $('.list-block ul').html(htmlContent); //添加loading等待效果 @@ -260,16 +248,20 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap return htmlContent; } -//界面加载 -$(document).ready(function () { - checkIsLogin(); -}); - function openaddWindow(){ clicked('/views/house/add.html',true,false,{},{type:1},function(){ }) } - +//判断是否登录 +function checkIsLogin(){ + if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ + $('#dataList').hide(); + $('#noData').show(); + }else{ + selectEvaluateList(); + } +} +checkIsLogin() From 9d9d6ca8531a511f8fe1ee5e732e80afbc6c524e Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Thu, 12 Apr 2018 11:07:10 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B4=B7=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/loan/loanInfo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fangija-zsyf/js/loan/loanInfo.js b/fangija-zsyf/js/loan/loanInfo.js index 8e502e3..6977a27 100644 --- a/fangija-zsyf/js/loan/loanInfo.js +++ b/fangija-zsyf/js/loan/loanInfo.js @@ -112,8 +112,8 @@ $("#next_btn").on("click", function () { axios.post(BASE_PATH + "/rest/loan/apply", _params).then(function (response) { var status = response.data.status; if(status){ - alert(response.data.data+ '==='); - $.toast(response.data.data); + //页面跳转 + //$.toast(response.data.data); //直接定位到贷款success页面, 调用back()就只用返回一次 window.location.href = "../../views/loan/loanSuccess.html"; }else{ From 2a836d5e7ec8feadb96b6a10255dc3eb0632816c Mon Sep 17 00:00:00 2001 From: gaojuan Date: Thu, 12 Apr 2018 11:07:36 +0800 Subject: [PATCH 3/4] add --- fangija-zsyf/js/quotations/collectCity.js | 391 ++++ fangija-zsyf/views/quotations/index.html | 2048 +++++++++++++++++++++ 2 files changed, 2439 insertions(+) create mode 100644 fangija-zsyf/js/quotations/collectCity.js create mode 100644 fangija-zsyf/views/quotations/index.html diff --git a/fangija-zsyf/js/quotations/collectCity.js b/fangija-zsyf/js/quotations/collectCity.js new file mode 100644 index 0000000..00be6e0 --- /dev/null +++ b/fangija-zsyf/js/quotations/collectCity.js @@ -0,0 +1,391 @@ +var city = "" +var myCollectCitys = []; +var lat; +var lng; +var allCity = [] +var myDatasVue = new Vue({ + el: '#contentTabDiv', + data: { + title:"", + cityDatas : [] + } +}) + +var date = new Date(); +var year = date.getFullYear()+'年'; +var month = date.getMonth()+1+'月'; +//document.addEventListener('plusready', onPlusReady, false); +////扩展API加载完毕,现在可以正常调用扩展API +//function onPlusReady(){ +// getPosition(); +// loadMyCollectCity(); +// +//} + +loadMyCollectCity(); + +// 获取当前用户位置 +function getPosition(){ + plus.geolocation.getCurrentPosition(function(p){ + city = p.address.city; + myCollectCitys.push(city); + lng = p.coords.longitude;//获取到当前位置的经度 + lat = p.coords.latitude;//获取到当前位置的纬度; + }, function(e){ + + }, + { + provider:'baidu', + enableHighAccuracy:true, + coordsType:'bd09ll' + } + ); +} + + + +function addUpChart(dataUp, num){ + /* 小区上涨 */ +//var dataUp = []; + optionUp = { + title: { + text: dataUp[0].value + '%', + subtext: '小区上涨', + x: 'center', + y: 'center', + itemGap: -8, + textStyle: { + fontFamily: 'Arial, Verdana, sans-serif', + fontSize: 30, + color: '#333', + fontWeight: 'normal' + }, + subtextStyle: { + fontFamily: '华文细黑', + fontSize: 12, + color: '#666' + } + }, + color: ['#EB5F34', '#e7e7e7'], + series: [ + { + name: '小区上涨', + type: 'pie', + radius: ['90%', '100%'], + itemStyle: { + normal: { + label: { + show: true + }, + labelLine: { + show: false + } + } + }, + data: dataUp + } + ] + }; + var myChartUp = echarts.init(document.getElementById(num+'_up_chart')); + myChartUp.setOption(optionUp,true); +} + +function addDownChart(dataDown, num){ + /* 小区下跌 */ + //var dataDown = [{value: 31, name: ''}]; + optionDown = { + title: { + text: dataDown[0].value + '%', + subtext: '小区下跌', + x: 'center', + y: 'center', + itemGap: -8, + textStyle: { + fontFamily: 'Arial, Verdana, sans-serif', + fontSize: 30, + color: '#333', + fontWeight: 'normal' + }, + subtextStyle: { + fontFamily: '华文细黑', + fontSize: 12, + color: '#666' + } + }, + color: ['#88D053', '#e7e7e7'], + series: [ + { + name: '小区下跌', + type: 'pie', + radius: ['90%', '100%'], + itemStyle: { + normal: { + label: { + show: true + }, + labelLine: { + show: false + } + } + }, + data: dataDown + } + ] + }; + + var myChartUp = echarts.init(document.getElementById(num+'_down_chart')); + myChartUp.setOption(optionDown,true); +} + +//加载我关注的城市 +function loadMyCollectCity(){ + axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) { + var curDatas = response.data.data + + if(curDatas){ + var ret = [] + for(var i in curDatas){ + var curCity = curDatas[i] + if(!IsInArray(myCollectCitys, curCity)){ + + allCity.push(curCity) + var j = 1; + axios.all([loadCityPriceInfo(curCity), detail(curCity), loadCityPricesAndCounts(curCity)]) + .then(axios.spread(function (acct, perms, trends) { + var cityObj = new Object(); + var data1 = acct.data.data + cityObj.numId_up_chart = j+"_up_chart"; + cityObj.numId_down_chart = j+"_down_chart"; + cityObj.numId_price_chart = j+"_price_chart"; + j = j+1; + if(data1){ + cityObj.city = data1.city + cityObj.cityTopMonthAvgPrice = data1.cityTopMonthAvgPrice + cityObj.downChance = data1.downChance + cityObj.follow = data1.follow + cityObj.index = data1.index + cityObj.oneMonthUpDownRange = (data1.oneMonthUpDownRange*100).toFixed(2) + cityObj.oneYearUpDownRange = data1.oneYearUpDownRange + cityObj.rangeLevel = data1.rangeLevel + cityObj.time = year + month + } + var data2 = perms.data.data + if(data2){ + cityObj.downRate = data2.downRate + cityObj.upRate = data2.upRate + } + var data3 = trends.data.data + if(data3){ + cityObj.times = data3.times + cityObj.cityPriceMap = data3.cityPriceMap + cityObj.countMap = data3.countMap + } + ret.push(cityObj); + myDatasVue.$data.cityDatas = ret; + //console.log(myDatasVue.$data.cityDatas.length); + })); + } + } + //myDatasVue.$data.cityDatas = ret; + } + + + }).catch(function (error) { + alert(error) + console.log(error); + }); +} + + +function loadCityPriceInfo(city){ + return axios.get("/rest/quotations/cityPriceInfo?city="+city); +} + +function detail(city){ + return axios.get("/rest/quotations/hosueQuatations?city="+city); +} + +function loadCityPricesAndCounts(city){ + return axios.get("/rest/quotations/loadCityPriceTrends?city="+city+"&type=2") +} + +function loadNearDistrict(){ + return axios.get("/rest/districts/nearDistrict?lat="+lat+"&lng="+lng) +} + +$(".button").click(function(){ + console.log("type:"+$(this).text()) +}) + + +function IsInArray(arr, val){ +  var testStr=','+arr.join(",")+","; +  return testStr.indexOf(","+val+",")!=-1; +} + +var t1 = window.setInterval(loadChart,1000); +function loadChart(){ + var d1 = myDatasVue.$data.cityDatas.length + var d2 = allCity.length; + if(d2>0 && d2==d1){ + + loadUpOrDownChart(); + + loadTrends(); + + window.clearInterval(t1); + } +} + +function loadUpOrDownChart(){ + var datas = myDatasVue.$data.cityDatas + for(var i in datas){ + var obj = datas[i] + var num = parseInt(i)+1; + + var cityObj1 = new Object(); + cityObj1.name= "" + cityObj1.value = obj.upRate + + var cityObj2 = new Object(); + cityObj2.name= "" + cityObj2.value = 100 - obj.upRate + + dataUp = [cityObj1, cityObj2] + addUpChart(dataUp, num) + + + var cityObj3 = new Object(); + cityObj3.name= "" + cityObj3.value = obj.downRate + + var cityObj4 = new Object(); + cityObj4.name= "" + cityObj4.value = 100 - obj.downRate + + dataDown = [cityObj3, cityObj4] + addDownChart(dataDown, num) + } +} + +function loadTrends(){ + var datas = myDatasVue.$data.cityDatas + for(var i in datas){ + var obj = datas[i] + var num = parseInt(i)+1; + + var prices = [] + var counts = [] + var times = obj.times + for(var i in times){ + var time = times[i] + time = parseInt(time.replace("-","")) + var pm = obj.cityPriceMap; + var cm = obj.countMap; + if(pm){ + prices.push(pm[time]) + } + if(cm){ + counts.push(cm[time]); + } + + } + + showChart(num+"_price_chart", obj.times, prices, counts) + } +} + + +function showChart(idDom, categories, prices, counts){ + if(!prices){ + prices = [] + } + if(!counts){ + counts = [] + } + /* 城市均价及挂牌走势 */ + var chart = Highcharts.chart(idDom, { + title: { + text: '城市均价及挂牌走势', + y: -30 + }, + colors: ['#F88C9F', '#78CDE6'], + xAxis: { + type: 'datetime', + categories: categories, + boundaryGap: false, + tickInterval: 2, + tickLength: 6, + crosshair: true + }, + yAxis: [{ // 第一个Y轴,放置在左边 + title: { + text: '元/㎡', + align: 'high', + offset: 4, + rotation: 0, + y: -20 + }, + plotLines: [{ + value: 0, + width: 1, + color: '#808080' + }], + allowDecimals: false + }, { // 第二个Y轴,放置在右边 + linkedTo: 0, + opposite: true, // 通过此参数设置坐标轴显示在对立面 + title: { + text: '套', + align: 'high', + offset: 25, + rotation: 0, + y: -20 + }, + plotLines: [{ + value: 0, + width: 1, + color: '#808080' + }], + allowDecimals: false + }], + credits: { + enabled: false + }, + plotOptions: { + line: { + connectNulls: true //该设置会连接空值点 + }, + series: { + events: { + legendItemClick: function(e) { + return false; + } + }, + marker: { + radius: 3, //曲线点半径,默认是4 + symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle" + } + } + }, + tooltip: { + shared: true + }, + series: [{ + name: '均价', + zIndex: 1, + data: prices, + tooltip: { + valueSuffix: '元/㎡' + } + }, { + name: '挂牌量', + type: 'column', + borderColor: null, + data: counts, + tooltip: { + valueSuffix: '套' + } + }] +}); +} diff --git a/fangija-zsyf/views/quotations/index.html b/fangija-zsyf/views/quotations/index.html new file mode 100644 index 0000000..bcc1f85 --- /dev/null +++ b/fangija-zsyf/views/quotations/index.html @@ -0,0 +1,2048 @@ + + + + + +房产行情 + + + + + + + + + + + + + + + + +
    +
    + +
    + +

    房产行情

    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + 2018年1月全国366个城市房价 +
    +
    +
    + + 37% + + + + 63% + + +
    +
    + +
    + +
    +
    +
    +
    城市涨幅排行
    +
    ①上海
    +
    +
    8.98%
    +
    + +
    +
    +
    城市潜力排行
    +
    ①上海
    +
    +
    潜力指数
    +
    + +
    +
    +
    城市均价排行
    +
    ①北京
    +
    +
    2.89%
    +
    + +
    +
    +
    +
    +
    房产热点城市
    +
    +
    + +

    青岛

    +
    +
    + +

    三亚

    +
    +
    + +

    昆明

    +
    +
    +
    +
    楼市资讯
    +
    +
    +
    +
      +
    • +
      +
      +
      市场上有不同种类的房源待售,经济适用房作为保障性住房的一种,政府对此非常重视。
      +
      +
      + 2022人1245条 +
      +
      +
      + +
      +
    • +
    +
    +
    +
    +
    +
    +
    +
      +
    • +
      +
      +
      市场上有不同种类的房源待售,经济适用房作为保障性住房的一种,政府对此非常重视。
      +
      +
      + 2022人1245条 +
      +
      +
      + +
      +
    • +
    +
    +
    +
    +
    + + + +
    +
    +
    + + 关注 + 取消 +
    +
    + 当前参考均价 +
    +
    +
    {{myCityMap.cityTopMonthAvgPrice}}元/㎡
    +
    + +
    + +
    +
    {{myCityMap.time}}楼市行情区县涨跌详情
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    城市均价及挂牌走势 +
    +
    + 半年 + 一年 + 三年 +
    +
    +
    +
    +
    +
    +
    +
    +
    城市报告
    +
    + +
    +
    +
    +
      +
    • +
      +
      总人口:2418.33万(2017年常住人口)
      +
      +
    • +
    • +
      +
      面积:6340k㎡
      +
      +
    • +
    • +
      +
      发展指数:0.852(极高,2014年)
      +
      +
    • +
    • +
      +
      行政区级别:直辖市
      +
      +
    • +
    +
    +
    +
    +
    +
      +
    • +
      +
      生产总值:30133.86亿元(2017年)
      +
      +
    • +
    • +
      +
      人均生产总值:124536元(2017年)
      +
      +
    • +
    • +
      +
      人均支配收入:58988元(2017年)
      +
      +
    • +
    +
    +
    +
    +
    +
      +
    • +
      +
      著名景点:外滩、豫园、南京路、人民广场、静安寺、新天地、迪士尼乐园等
      +
      +
    • +
    • +
      +
      著名高校:复旦、交大、同济、华东师大等
      +
      +
    • +
    +
    +
    +
    +
    +
      +
    • +
      +
      气候条件:亚热带季风气候
      +
      +
    • +
    • +
      +
      地理位置:长江入海口南岸,东海之滨
      +
      +
    • +
    +
    +
    +
    +
    +
      +
    • +
      +
      机场:上海虹桥国际机场、上海浦东国际机场
      +
      +
    • +
    • +
      +
      火车站:上海站、上海虹桥站、上海南站
      +
      +
    • +
    +
    +
    +
    +
    +
    + +
    +
    热门小区
    +
    +
    +
    +
    +
    定远小区
    +
    +
    68777元/㎡
    +
    +
    +
    +
    定远小区
    +
    +
    68777元/㎡
    +
    +
    +
    +
    定远小区
    +
    +
    68777元/㎡
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    +
    + + + + +
    +
    +
    + +
    +
    城市房价TOP10
    +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 26b3ba1525396b2be4a4818c77dce2398646a1ea Mon Sep 17 00:00:00 2001 From: zongzhimin Date: Thu, 12 Apr 2018 11:17:25 +0800 Subject: [PATCH 4/4] =?UTF-8?q?YOUFANG=20=E6=88=BF=E4=BA=A7=E8=A1=8C?= =?UTF-8?q?=E6=83=85+=E8=AF=84=E4=BC=B0=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/evaluate/evaluateReport.html | 29 ++++++++++++------- fangija-zsyf/views/house/houseDetail.html | 1 - 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index d2ba2da..765f821 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -142,10 +142,10 @@ $.config = {router: false}