diff --git a/fangija-zsyf/views/component/baseInfoComponent.js b/fangija-zsyf/views/component/baseInfoComponent.js new file mode 100644 index 0000000..403cd0f --- /dev/null +++ b/fangija-zsyf/views/component/baseInfoComponent.js @@ -0,0 +1,175 @@ +var dataParam = { + finishBuildingDate:"", + householdCount:"", + cubagePercent:"", + carSiteCount:"", + virescencePercent:"", + estateCharge:"", + moreArea:"", + developer:"", + estateCompany:"" + }; + +Vue.component('base-info-component', { + template: ` + + `, + data: function(){ + return dataParam; + }, + methods: { + loadDistrictInfo:function(){ + axios.get("/rest/districts/detail", { + params: { + city: city, + region:region, + name: name + } + }).then(function (response) { + var vo = response.data.data.detail + var cityPrice = response.data.data.cityPrice + var collected = response.data.data.collected +// if(cityPrice){ +// baseInfo.cityPrice = cityPrice +// } +// if(collected){ +// baseInfo.collect = true; +// }else{ +// baseInfo.collect = false; +// } + if(vo){ + if(vo.avgPrice){ + lat = vo.lat2; + lng = vo.lng2; + alert("lng-1:"+lng); + +// loadMapPoi(); +// +// baseInfo.city = vo.city +// baseInfo.region = vo.region +// baseInfo.address = vo.address; +// baseInfo.districtName = vo.name +// baseInfo.avgPrice = vo.avgPrice; +// baseInfo.oneMonthUpDownRange = vo.oneMonthUpDownRange; + +// if(vo.rank){ +// baseInfo.priceRate = vo.rank.substring(0, vo.rank.indexOf("/")); +// } + + //baseInfo.cityPrice = vo.cityPrice; + + var finishDate = "" + if(vo.finishBuildingDate){ + if(vo.finishBuildingDate.indexOf("~")!=-1){ + finishDate = vo.finishBuildingDate.replace("年",""); + }else{ + finishDate = vo.finishBuildingDate.substring(0,4)+"年" + } + } + + + dataParam.finishBuildingDate = finishDate; + dataParam.householdCount = vo.householdCount; + dataParam.cubagePercent = vo.cubagePercent; + dataParam.carSiteCount = vo.carSiteCount; + dataParam.virescencePercent = vo.virescencePercent; + dataParam.estateCharge = vo.estateCharge; + dataParam.moreArea = vo.moreArea; + dataParam.developer = vo.developer; + dataParam.estateCompany = vo.estateCompany; + +// address = vo.address; +// tags = vo.poiTags; + +// if(vo.poiTags){ +// if(vo.poiTags.length>=3){ +// baseInfo.tags = vo.poiTags.slice(0,3); +// }else{ +// baseInfo.tags = vo.poiTags; +// } +// } + +// loadNearDistrict(vo.lat2, vo.lng2); + }else{ + $("#noDataDiv").show() + //baseInfo.districtName = "小区详情" + } + } + + }).catch(function (error) { + alert(error) + console.log(error); + }); + } + },mounted:function(){ + this.loadDistrictInfo(); + } +}) + diff --git a/fangija-zsyf/views/component/nearDist.js b/fangija-zsyf/views/component/nearDist.js new file mode 100644 index 0000000..8b6aad1 --- /dev/null +++ b/fangija-zsyf/views/component/nearDist.js @@ -0,0 +1,64 @@ +var distDatas = {nearDists: []} +Vue.component('near-dist-component', { + template: ` +
+
附近小区
+
+
+
+ +
+
{{dist.name}}
+
+
{{dist.avgPrice}}元/㎡
+
+ +
+ +
+
+
+
+ `, + data: function(){ + return distDatas; + }, + methods: { + loadNearDistrict:function(lat, lng){ + axios.get("/rest/districts/nearDistrict", { + params: { + lat: lat, + lng:lng + } + }).then(function (response) { + var datas = response.data.data + if(datas){ + var ret = [] + for(var v in datas){ + var o = datas[v] + if(o.city == city && o.district == region && o.name == name){ + continue; + }else{ + if(ret.length <= 5){ + ret.push(o); + } + } + } + distDatas.nearDists = ret; + + $("#nearDistDiv .cardNearbyWin").css("width",(7.5*ret.length)+"rem"); + }else{ + $("#nearDistDiv").hide() + } + + }).catch(function (error) { + alert(error) + console.log(error); + }); + } + }, + mounted:function(){ + alert("lng-2:"+lng); + this.loadNearDistrict(lat, lng); + } +}) \ No newline at end of file diff --git a/fangija-zsyf/views/rent/rent.html b/fangija-zsyf/views/rent/rent.html new file mode 100644 index 0000000..399cd58 --- /dev/null +++ b/fangija-zsyf/views/rent/rent.html @@ -0,0 +1,378 @@ + + + + + +龙盛佳苑 + + + + + + + + + + + + + + + + + + +
+
+
+ +

龙盛佳苑

+
+
+
+
    +
  • +
    +
    +
    +
    上海市静安区沪太路1329弄
    + +
    +
    + 近地铁公交多买菜做饭 +
    +
    + 小区关注 + 生活便利 +
    +
    +
    +
  • +
+
+
+
+
+
+
3450 元/月
一室
+
+
+
+
+
4400 元/月
二室
+
+
+
+
+
4991 元/月
三室
+
+
+
+
+
5213 元/月
三室以上
+
+
+
+
+ + +
+ +
+ + +
+
小区租金走势 +
+
+ 半年 + 一年 +
+
+
+
+
+
+
+
+
位置及周边
+ +
+ +
+ +
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file