diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index b7ffa0c..0dcd6d5 100644 --- a/fangija-zsyf/js/district/districtDetail.js +++ b/fangija-zsyf/js/district/districtDetail.js @@ -9,10 +9,6 @@ var mapLoadCount = 0; /* 关注&已关注切换 */ -$(".collection01").on("click", function () { - doAddCollect() -}); - function doAddCollect(){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ @@ -34,7 +30,6 @@ function addCollect(){ $(".collection02").show(); $.toast("随时掌握小区动态"); } - alert(12) plus.webview.getWebviewById('views/user/userInfo.html').reload(); plus.webview.getWebviewById('yfindex.html').reload(); plus.webview.getWebviewById('views/house/houseManageList.html').reload(); @@ -78,8 +73,23 @@ function removeCollect(){ }); } +/* button状态切换 */ +/*$("#trendTabDiv .button").on("click", function () { + $(this).parent().children().removeClass("active"); + $(this).addClass("active"); +}); +*/ +/* 图表切换 */ +/*$("#tabAvgDiv").on("click", function () { + $("#tabChart1").css("z-index","1"); + $("#tabChart2").css("z-index","-1"); +}); +$("#tabRentDiv").on("click", function () { + $("#tabChart2").css("z-index","1"); + $("#tabChart1").css("z-index","-1"); +});*/ -var t1 = window.setInterval(loadMap,1000); +/*var t1 = window.setInterval(loadMap,1000); function loadMap(){ mapLoadCount++; if(lng && lat){ @@ -94,7 +104,7 @@ function loadMap(){ $("#mapDiv").hide(); } } -} +}*/ //小区详情 function loadDistrictInfo(){ @@ -286,12 +296,6 @@ function loadKLineData(city, region, name){ }); } -$("#trendDiv1 a").click(function(){ - //showTrends(); - alert("trend"); - var v = $(this).attr("t-v"); - showTrends(v) -}); function showTrends(v){ if(v == "36"){ @@ -520,8 +524,8 @@ $("#trendDiv2 a").click(function(){ /* 小区租金走势 */ -function loadRentTrends(city, region, name){ - var type = $("#trendDiv2 a.active").attr("t-v") +function loadRentTrends(city, region, name, type){ + if(type == undefined) type= 2; axios.get("/rest/trend/distRentTrends", { params: { city: city, diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index 53c55ff..ae6f51f 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -49,11 +49,20 @@ Vue.component('city_increase_ranking',{ }, follow:function(city,event){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ - alert("请先登录") clicked('/views/user/passLogin.html',true,false,{},{},function(){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ }else{ + axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + reloadMyFocus() + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + }).catch(function(error){ + console.log(error) + }) } }) }else{ @@ -61,7 +70,6 @@ Vue.component('city_increase_ranking',{ $(event.target).parent().children().removeClass("dn"); $(event.target).addClass("dn"); reloadMyFocus() - //plus.webview.getWebviewById('views/user/userInfo.html').reload() }).catch(function(error){ console.log(error) }) diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index 5acd4f8..d754df3 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -67,11 +67,20 @@ Vue.component('city_potential_ranking',{ }, follow:function(city,event){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ - alert("请先登录") clicked('/views/user/passLogin.html',true,false,{},{},function(){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ }else{ + axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + reloadMyFocus() + }).catch(function(error){ + console.log(error) + }) } }) }else{ diff --git a/fangija-zsyf/views/district/detail.html b/fangija-zsyf/views/district/detail.html index 2b2629a..83e23d6 100644 --- a/fangija-zsyf/views/district/detail.html +++ b/fangija-zsyf/views/district/detail.html @@ -70,8 +70,8 @@
{{city}}{{region}}{{address}}
- 关注 - 取消关注 + 关注 + 取消关注
@@ -114,17 +114,17 @@
@@ -132,8 +132,8 @@
@@ -270,40 +270,61 @@ function onPlusReady() { name = self.name; // 创建根实例 baseInfo = new Vue({ - el: '#districtBaseInfo', - data: { - name : "", - city:"", - region: "", - address: "", - avgPrice:"", - oneMonthUpDownRange:"", - priceRate:"", - cityPrice:"", - finishBuildingDate:"", - householdCount:"", - cubagePercent:"", - carSiteCount:"", - virescencePercent:"", - estateCharge:"", - moreArea:"", - developer:"", - estateCompany:"", - tags:[], - nearDists:[], - regionIndex:"", - schoolIndex:"" - + el: '#districtBaseInfo', + data: { + name : "", + city:"", + region: "", + address: "", + avgPrice:"", + oneMonthUpDownRange:"", + priceRate:"", + cityPrice:"", + finishBuildingDate:"", + householdCount:"", + cubagePercent:"", + carSiteCount:"", + virescencePercent:"", + estateCharge:"", + moreArea:"", + developer:"", + estateCompany:"", + tags:[], + nearDists:[], + regionIndex:"", + schoolIndex:"" + }, + methods:{ + showChat: function(type){ + if(type == 2) { + document.getElementById("tabChart2").style = "z-index:1"; + document.getElementById("tabChart1").style = "z-index:-1"; + } else { + document.getElementById("tabChart2").style = "z-index:-1"; + document.getElementById("tabChart1").style = "z-index:1"; } + + } + } }) /* 小区均价分析 */ loadKLineData(city, region, name); /* 小区租金走势 */ - loadRentTrends(city, region, name); + loadRentTrends(city, region, name,2); } - +function showLoadRentTrends(type) { + if(type == 3) { + document.getElementById("trendDivTab3").setAttribute("class","tab-link button active"); + document.getElementById("trendDivTab2").setAttribute("class","tab-link button"); + } else { + document.getElementById("trendDivTab3").setAttribute("class","tab-link button"); + document.getElementById("trendDivTab2").setAttribute("class","tab-link button active"); + } + + loadRentTrends(city, region, name,type); +} /*baseInfo = new Vue({ el: '#districtBaseInfo', @@ -330,9 +351,21 @@ function onPlusReady() { regionIndex:"", schoolIndex:"" - } - })*/ - + }, + methods:{ + showChat: function(type){ + if(type == 2) { + document.getElementById("tabChart2").style = "z-index:1"; + document.getElementById("tabChart1").style = "z-index:-1"; + } else { + document.getElementById("tabChart2").style = "z-index:-1"; + document.getElementById("tabChart1").style = "z-index:1"; + } + + } + } + }) + */ function openMapWindow(){ clicked('arround.html',true,false,{},{city:city,region:region,name:name,lat:lat,lng:lng}); } diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index bfd5617..4bd9d15 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -335,7 +335,6 @@ function addManagement(id, houseStatus, liveStatus){ $.toast(response.data.data); 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); } diff --git a/fangija-zsyf/views/house/detail.html b/fangija-zsyf/views/house/detail.html index 15563a9..3c42d20 100644 --- a/fangija-zsyf/views/house/detail.html +++ b/fangija-zsyf/views/house/detail.html @@ -94,7 +94,7 @@ 出售分析
--> -
+
出租管理
@@ -109,6 +109,39 @@
+
+
+
+
    +
  • +
    +
    目前状态
    +
    出租
    +
    +
  • +
  • +
    +
    出租日期
    +
    {{rentTime}}
    +
    +
  • +
  • +
    +
    每期租金
    +
    {{rentPrice}}
    +
    +
  • +
  • +
    +
    下次收租
    +
    {{nextRent}}
    +
    +
  • +
+
+
+
+
@@ -297,7 +330,7 @@ $.config = {router: false} diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html index 204d8ac..a19d902 100644 --- a/fangija-zsyf/views/house/houseDetail.html +++ b/fangija-zsyf/views/house/houseDetail.html @@ -243,7 +243,8 @@
{{nearDist.sname}}
-
{{nearDist.avgPrice}}元/㎡
+
{{nearDist.avgPrice}}元/㎡
+
暂无
@@ -1505,12 +1506,19 @@ function markFocus(){ function addFocus(city){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ - alert("请先登录") clicked('/views/user/passLogin.html',true,false,{},{},function(){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ }else{ - + axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + reloadMyFocus() + createData(city, myDatasVue.$data.cityDatas.length); + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + }).catch(function(error){ + console.log(error) + }) } }) }else{ diff --git a/fangija-zsyf/views/house/houseList.html b/fangija-zsyf/views/house/houseList.html index 03789d7..3cd3c3f 100644 --- a/fangija-zsyf/views/house/houseList.html +++ b/fangija-zsyf/views/house/houseList.html @@ -325,7 +325,7 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq } html += '
  • '; html += "
    "; - html += "
    "+result.name+" "+tempTotalPrice+"万"; + html += "
    "+tempTotalPrice+"万"; if(result.liveStatus!=null && result.liveStatus.length>0){ html += ""+result.liveStatus+"
    "; }else{ diff --git a/fangija-zsyf/views/house/regions.html b/fangija-zsyf/views/house/regions.html index 054e22c..29712a7 100644 --- a/fangija-zsyf/views/house/regions.html +++ b/fangija-zsyf/views/house/regions.html @@ -19,13 +19,13 @@
    -
    +

    {{city}}各区县涨跌排行

    -
    +
    @@ -69,8 +69,14 @@
    -
    + +
    @@ -112,7 +118,6 @@ $.config = {router: false} var city = self.city regionsInfoVue.$data.city = city; loadRegionInfo(city); - } //loadRegionInfo("上海"); @@ -123,14 +128,19 @@ $.config = {router: false} } }).then(function (response) { var msg = response.data.data; - if(msg){ - for(var i in msg){ - var da = msg[i] - da.oneMonthUpDownRange = (da.oneMonthUpDownRange*100).toFixed(2) + if(response.data.status){ + if(msg!=null && msg.length>0){ + for(var i in msg){ + var da = msg[i] + da.oneMonthUpDownRange = (da.oneMonthUpDownRange*100).toFixed(2) + } + regionsInfoVue.$data.regionInfos = msg; + }else{ + //控制显示无数据效果 + $('#hasDataDiv').hide(); + $('#noDataDiv').show(); } - regionsInfoVue.$data.regionInfos = msg; } - }) .catch(function (error) { console.log(error); diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index dcf49c4..ee4962e 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -170,15 +170,10 @@ function onPlusReady() { id = self.newsId; shareId = id shareUrl = shareUrl+id - $.ajax({ - type : 'get', - url : BASE_PATH + "/rest/news/detail", - data:{newsId:id}, - dataType:'json', - async:false, - success:function(result){ - if(result.code==200){ - data = result.data + + axios.get("/rest/news/detail",{params:{newsId:id}}).then(function(response){ + if(response.data.code==200){ + data = response.data.data $("#title").text(data.title) $("#title2").text(data.title) $("#source").text(data.source==null?"":"来源:"+data.source) @@ -200,10 +195,10 @@ function onPlusReady() { //是否收藏 isCollect(); } - }, - error:function(){ - } - }) + + }).catch(function(error){ + console.log(error) + }); getPosition(); updateSerivces(); } diff --git a/fangija-zsyf/views/rent/rentManager.html b/fangija-zsyf/views/rent/rentManager.html index 2599ff8..a8a0725 100644 --- a/fangija-zsyf/views/rent/rentManager.html +++ b/fangija-zsyf/views/rent/rentManager.html @@ -25,7 +25,7 @@
    -

    出租管理

    @@ -126,33 +126,42 @@ $.config = {router: false} document.addEventListener('plusready', onPlusReady, false); function onPlusReady() { var self = plus.webview.currentWebview(); - id = self.id + id = self.houseId axios.get('/rest/rent/queryHouseRent',{params:{id:id}}).then(function(response){ - var data = response.data.data.houses; - $.each(data,function(i){ - var active = ""; - var houseRoomNum = ""; - if(this.id == id){ - active = "active" - } - if(this.houseRoomNum){ - houseRoomNum = ''+this.houseRoomNum+''; - } - $("#titleList").append(''+ - ''+houseRoomNum+'') - $(".buttons-tab01 a").click(function(){ - var id = $(this).attr("val") - window.location.href = "index?id="+id; - }); - }) +// var data = response.data.data.houses; +// $.each(data,function(i){ +// var active = ""; +// var houseRoomNum = ""; +// if(this.id == id){ +// active = "active" +// } +// if(this.houseRoomNum){ +// houseRoomNum = ''+this.houseRoomNum+''; +// } +// $("#titleList").append('
    '+ +// ''+houseRoomNum+'') +// $(".buttons-tab01 a").click(function(){ +// var id = $(this).attr("val") +// window.location.href = "index?id="+id; +// }); +// }) var houseInfo = response.data.data.houseInfo; - edit.liveStatus=houseInfo.liveStatus; - edit.leaseStartDate=getNowFormatDate(houseInfo.leaseStartDate); - edit.leaseEndDate = getNowFormatDate(houseInfo.leaseEndDate); - edit.lastRentDate = getNowFormatDate(houseInfo.lastRentDate); - edit.nowDay = getNowFormatDate(response.data.data.nowDay); - edit.rent = houseInfo.rent; - edit.cycle = response.data.data.cycle; + if(houseInfo.liveStatus=="出租"){ + edit.liveStatus=houseInfo.liveStatus; + edit.leaseStartDate=getNowFormatDate(houseInfo.leaseStartDate); + edit.leaseEndDate = getNowFormatDate(houseInfo.leaseEndDate); + edit.lastRentDate = getNowFormatDate(houseInfo.lastRentDate); + edit.nowDay = getNowFormatDate(response.data.data.nowDay); + if(houseInfo.rent==0){ + edit.rent = ""; + }else{ + edit.rent = houseInfo.rent; + } + edit.cycle = response.data.data.cycle; + }else{ + edit.cycle = "1 月 /次"; + } + /* 选择-起租日期 */ $("#input_time01").datetimePicker({ toolbarTemplate: '
    \ @@ -202,7 +211,6 @@ function onPlusReady() { console.log(error) }); - //var id="165878889770385408" /* 编辑状态-确定 */ $(document).on('click','#confirm_btn', function () { @@ -281,6 +289,7 @@ function onPlusReady() { } axios.post("/rest/rent/changeStatus",d).then(function(response){ + plus.webview.getWebviewById('/views/house/detail.html').reload(); back(),plus.nativeUI.closeWaiting(); }).catch(function(error){ console.log(error) diff --git a/fangija-zsyf/views/user/codeSms.html b/fangija-zsyf/views/user/codeSms.html index 3516c1e..6bcba36 100644 --- a/fangija-zsyf/views/user/codeSms.html +++ b/fangija-zsyf/views/user/codeSms.html @@ -119,6 +119,18 @@ $(".check").on("click", function () { function openView() { clicked(BASE_PATH + '/user/agreement',true) } + +var originalHeight=document.documentElement.clientHeight || document.body.clientHeight; +window.onresize=function(){ + //软键盘弹起与隐藏 都会引起窗口的高度发生变化 + var resizeHeight=document.documentElement.clientHeight || document.body.clientHeight; + if(resizeHeight*1 diff --git a/fangija-zsyf/views/user/userInfo.html b/fangija-zsyf/views/user/userInfo.html index c9374ff..631c81e 100644 --- a/fangija-zsyf/views/user/userInfo.html +++ b/fangija-zsyf/views/user/userInfo.html @@ -167,6 +167,7 @@
      +
    @@ -176,11 +177,12 @@
    -
    -
      - -
    +
    +
    +