diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js
index 20b6550..fb104e1 100644
--- a/fangija-zsyf/config.js
+++ b/fangija-zsyf/config.js
@@ -3,9 +3,9 @@
//var BASE_PATH = "http://192.168.10.128:8084";
//var BASE_PATH = "http://192.168.10.47:8086";
//var BASE_PATH = "http://192.168.10.161:8084";
-//var BASE_PATH = "http://192.168.10.47:8086";
+var BASE_PATH = "http://192.168.10.53:8084";
//var BASE_PATH = "http://192.168.10.161:8084";
-var BASE_PATH = "http://192.168.10.170:8084";
+//var BASE_PATH = "http://192.168.10.170:8084";
//var BASE_PATH = "http://192.168.10.171:8084";
/**是否显示过启动页面**/
var lauchFlag = false;
\ No newline at end of file
diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css
index a4095bb..93f7615 100644
--- a/fangija-zsyf/css/main.css
+++ b/fangija-zsyf/css/main.css
@@ -854,6 +854,14 @@ input::-webkit-input-placeholder{
/* 图表 */
.chart{width:100%;height:250px;}
.chart tspan{font-size:0.6rem;text-shadow:none;}
+.chart01Box{height:270px;position:relative;}
+#chart01a{height:270px;position:absolute;z-index:1;}
+#chart01{height:270px;position:absolute;z-index:-1;}
+.topic .topicTitle > div.icon01Box{overflow:hidden;float:none;display:inline-block;vertical-align:middle;}
+.icon-chart01a{width:0.9rem;height:0.8rem;background:url(../images/icon-chart01a.png) no-repeat center center;background-size:100%;float:left;}
+.icon-chart01{width:0.9rem;height:0.8rem;background:url(../images/icon-chart01.png) no-repeat center center;background-size:100%;float:left;}
+
+
/*
#tabChart{width:100%;height:360px;}
#tabChart1{width:100%;position:absolute;z-index:1;}
diff --git a/fangija-zsyf/images/icon-chart01.png b/fangija-zsyf/images/icon-chart01.png
new file mode 100644
index 0000000..29c770a
Binary files /dev/null and b/fangija-zsyf/images/icon-chart01.png differ
diff --git a/fangija-zsyf/images/icon-chart01a.png b/fangija-zsyf/images/icon-chart01a.png
new file mode 100644
index 0000000..92efcda
Binary files /dev/null and b/fangija-zsyf/images/icon-chart01a.png differ
diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js
index 4c49a13..4987baf 100644
--- a/fangija-zsyf/js/district/districtDetail.js
+++ b/fangija-zsyf/js/district/districtDetail.js
@@ -76,38 +76,44 @@ 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);
-function loadMap(){
- mapLoadCount++;
- if(lng && lat){
- loadMapPoi();
- $("#mapDiv").show();
- window.clearInterval(t1);
- }else{
- if(mapLoadCount == 10){
- $("#mapDiv").hide();
- window.clearInterval(t1);
- }else{
- $("#mapDiv").hide();
- }
+function inintChart(){
+ /* 小区均价分析 */
+ loadLineData(city, region, name, 6)
+ /* 小区租金走势 */
+ loadRentTrends(city, region, name,2);
+}
+
+function clickLineChart(e){
+ $("#trendDiv1 a").removeClass("active")
+ $(e).addClass("active")
+ if(mode == "kLine"){
+ loadKLineData(city, region, name);
+ }else if(mode == "line"){
+ loadLineData(city, region, name);
}
-}*/
+
+}
+
+/* 图表切换 */
+function lineChart() {
+ mode = "kLine"
+ $(".icon-chart01a").hide();
+ $(".icon-chart01").show();
+ $("#chart01a").css("z-index","-1");
+ $("#chart01").css("z-index","1");
+ loadKLineData(city, region, name);
+}
+function kLineChart() {
+ mode = "line"
+ $(".icon-chart01").hide();
+ $(".icon-chart01a").show();
+ $("#chart01").css("z-index","-1");
+ $("#chart01a").css("z-index","1");
+
+};
+
+
function showLoadRentTrends(type) {
if(type == 3) {
document.getElementById("trendDivTab3").setAttribute("class","tab-link button active");
@@ -120,147 +126,6 @@ function showLoadRentTrends(type) {
loadRentTrends(city, region, name,type);
}
-//小区详情
-function loadDistrictInfo(){
- 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){
- $(".collection02").show();
- $(".collection01").hide();
- }else{
- $(".collection02").hide();
- $(".collection01").show();
- }
- if(vo){
- if(vo.avgPrice){
- lat = vo.lat2;
- lng = vo.lng2;
-
- //loadMapPoi();
-
- baseInfo.city = vo.city
- baseInfo.region = vo.region
- baseInfo.address = vo.address;
- baseInfo.name = 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)+"年"
- }
- }
-
-
- baseInfo.finishBuildingDate = finishDate;
- baseInfo.householdCount = vo.householdCount;
- baseInfo.cubagePercent = vo.cubagePercent;
- baseInfo.carSiteCount = vo.carSiteCount;
- baseInfo.virescencePercent = vo.virescencePercent;
- baseInfo.estateCharge = vo.estateCharge;
- baseInfo.moreArea = vo.moreArea;
- baseInfo.developer = vo.developer;
- baseInfo.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;
- }
- }
-
- var starScore = response.data.data.starScore
- if(starScore && starScore > 0){
- var regionIndex = response.data.data.regionIndex
- var districtPoiCount = response.data.data.districtPoiCount
-
- var schoolIndex = response.data.data.schoolIndex
- var arroundIndex = response.data.data.arroundIndex
-
- var indexs = []
- indexs.push(vo.index);
- indexs.push(regionIndex);
- indexs.push(schoolIndex);
- indexs.push(arroundIndex);
-
- /* 小区评级 */
- loadDistrictLevel(indexs);
- }else{
- $("#distLevelDiv").hide()
- }
-
-
-
- }else{
- $("#noDataDiv").show()
- baseInfo.name = "小区详情"
- }
- }
-
- }).catch(function (error) {
- console.log(error);
- });
-}
-
-//附近小区
-/*function loadNearDistrict(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);
- }
- }
- }
- baseInfo.nearDists = ret;
-
- $("#nearDistDiv .cardNearbyWin").css("width",(7.5*ret.length)+"rem");
- }else{
- $("#nearDistDiv").hide()
- }
-
- }).catch(function (error) {
- console.log(error);
- });
-}*/
-
-
-
function loadKLineData(city, region, name){
var type = $("#trendDiv1 a.active").attr("t-v");
@@ -364,10 +229,10 @@ var option01 = {
},
formatter: function (params) {
var res = params[0].seriesName + ' ' + params[0].name;
- res += '
月初 : ' + params[0].value[1];
- res += '
月末 : ' + params[0].value[2];
- res += '
最低 : ' + params[0].value[3];
- res += '
最高 : ' + params[0].value[4];
+ res += '
月初 : ' + params[0].value[1]+ '元/㎡';
+ res += '
月末 : ' + params[0].value[2]+ '元/㎡';
+ res += '
最低 : ' + params[0].value[3]+ '元/㎡';
+ res += '
最高 : ' + params[0].value[4]+ '元/㎡';
return res;
},
position: function (pos, params, el, elRect, size) {
@@ -408,7 +273,7 @@ var option01 = {
axisLine: { lineStyle: { color: '#666' } },
axisLabel: {
formatter: function (value) {
- return echarts.format.formatTime('MM-dd', value);
+ return echarts.format.formatTime('yyyy-MM', value);
}
},
min: 'dataMin',
@@ -534,13 +399,6 @@ var option01 = {
};
-/*$("#trendDiv2 a").click(function(){
- $("#trendDiv2 a").removeClass("active")
- $(this).addClass("active")
- //var v = $(this).attr("t-v");
- loadRentTrends(city, region, name);
-});*/
-
/* 小区租金走势 */
function loadRentTrends(city, region, name, type){
@@ -562,6 +420,8 @@ function loadRentTrends(city, region, name, type){
var rooms = re.rooms;
var estateType = re.estateType
+ var roomKeys = []
+
if(m && rooms.length>0){
for(var i=0;i-1){
if(room > 8){
continue;
@@ -593,14 +454,12 @@ function loadRentTrends(city, region, name, type){
distObj.name = room+"室"
distObj.data = distDatas;
distObj.type = 'line';
- distObj.symbolSize = 0;
+ distObj.symbolSize = 6;
+ distObj.symbol = 'circle';
series.push(distObj);
- //alert(distDatas);
}
- //alert(categories);
- //showRentChart(categories, series);
- showRentChart2(categories, series);
+ showRentChart2(categories, series, roomKeys);
}else{
//没数据
//$("#tabChart2").hide();
@@ -614,13 +473,17 @@ function loadRentTrends(city, region, name, type){
}
-function showRentChart2(categories, series){
+function showRentChart2(categories, series, roomDatas){
var option03 = {
tooltip: {
trigger: 'axis',
textStyle: {
fontFamily: 'arial,华文细黑',
fontSize: 12
+ },
+ formatter: function (params) {
+ var res = params[0].name + '
' + "租金:"+params[0].value + '元/月';
+ return res;
}
},
grid:{
@@ -632,6 +495,7 @@ function showRentChart2(categories, series){
},
color: ['#F88C9F', '#FFBF5C', '#AAD672', '#78CDE6', '#AE94E9'],
legend: {
+ data: roomDatas,
y: 'bottom',
textStyle: {
fontFamily: '华文细黑',
@@ -744,3 +608,161 @@ function loadDistrictLevel(datas){
var myChart03 = echarts.init(document.getElementById('chart03'));
myChart03.setOption(option03,true);
}
+
+
+//曲线图
+function loadLineData(city, region, name){
+ var type = $("#trendDiv1 a.active").attr("t-v");
+ axios.get("/rest/trend/distTrends", {
+ params: {
+ city: city,
+ region:region,
+ name:name,
+ type: type
+ }
+ }).then(function (response) {
+ var distDatas = response.data.data.districtAvgZouShi
+ var times = response.data.data.timeKeys
+ if(times){
+ var districtTrends = [];
+
+ for(var d in times){
+ var t = times[d]
+
+ var distPrice = distDatas[t]
+ if(distPrice){
+ districtTrends.push(distPrice);
+ }else{
+ districtTrends.push(null);
+ }
+ }
+
+ //option01b.xAxis.data = times
+ //option01b.series.data = districtTrends
+
+ showLineChart(times, districtTrends);
+
+
+
+ }
+ }).catch(function (error) {
+ console.log(error);
+ });
+}
+
+
+function showLineChart(times, datas){
+ var option01b = {
+ tooltip: {
+ triggerOn: 'none',
+ transitionDuration: 0,
+ confine: true,
+ bordeRadius: 4,
+ borderWidth: 1,
+ borderColor: '#666',
+ backgroundColor: 'rgba(255,255,255,0.9)',
+ textStyle: {
+ fontSize: 12,
+ color: '#666'
+ },
+ formatter: function (params) {
+ var res = params[0].name + '
' + "均价:"+params[0].value + '元/㎡';
+ return res;
+ },
+ position: function (pos, params, el, elRect, size) {
+ var obj = {
+ top: 60
+ };
+ obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
+ return obj;
+ }
+ },
+ grid:{
+ x: 20,
+ y: 10,
+ x2: 20,
+ y2: 60,
+ top: 60,
+ height: 120
+ },
+ color: ['#78CDE6'],
+ dataZoom: [{
+ realtime: false,
+ start: 1,
+ end: 99,
+ top: 5,
+ height: 20,
+ handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
+ handleSize: '120%'
+ }],
+ xAxis: {
+ type: 'category',
+ boundaryGap: false,
+ axisLine: {
+ lineStyle: {
+ color: '#ccc'
+ }
+ },
+ axisLabel: {
+ textStyle: {
+ fontFamily: 'Arial, Verdana, sans-serif',
+ color: '#666'
+ }
+ },
+ axisPointer: {
+ type: 'line',
+ label: {show: false},
+ triggerTooltip: true,
+ handle: {
+ show: true,
+ margin: 50,
+ color: '#F18D00'
+ }
+ },
+ data: times,
+ },
+ yAxis: {
+ type: 'value',
+ scale: true,
+ position: 'right',
+ axisLine: {
+ lineStyle: {
+ color: '#ccc'
+ }
+ },
+ axisLabel: {
+ inside: true,
+ textStyle: {
+ fontFamily: 'Arial, Verdana, sans-serif',
+ color: '#666'
+ }
+ }
+ },
+ series: [
+ {
+ name: '',
+ type: 'line',
+ smooth: true,
+ symbol: 'none',
+ sampling: 'average',
+ areaStyle: {
+ normal: {
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+ offset: 0,
+ color: '#78CDE6'
+ }, {
+ offset: 1,
+ color: '#fff'
+ }])
+ }
+ },
+ data: datas
+ }
+ ]
+ };
+ var myChart01b = echarts.init(document.getElementById('chart01a'));
+ myChart01b.setOption(option01b,true);
+}
+
+
+
diff --git a/fangija-zsyf/main.html b/fangija-zsyf/main.html
index f3eebe6..5798ce9 100644
--- a/fangija-zsyf/main.html
+++ b/fangija-zsyf/main.html
@@ -181,6 +181,9 @@
if (data.imgUrl != null) {
localStorage.setItem("startPageImgUrl", data.imgUrl);
}
+ if (data.startPageId != null) {
+ localStorage.setItem("startPageId", data.startPageId);
+ }
if (data.url != null) {
localStorage.setItem("startPageClickUrl", data.url);
}
diff --git a/fangija-zsyf/start.html b/fangija-zsyf/start.html
index c5065e2..9f6a3cb 100644
--- a/fangija-zsyf/start.html
+++ b/fangija-zsyf/start.html
@@ -71,6 +71,7 @@ new Vue({
data: {
imgUrl:"images/startImg.png",
url:"",
+ starImgId:"",
guideImgs:[]
},
methods: {
@@ -89,6 +90,16 @@ new Vue({
},
openView: function() {
if (this.url != null && this.url != "") {
+ // 记录点击次数
+ if (this.starImgId != "") {
+ axios.get("/rest/page/startPage/click", {params:{id:this.starImgId}})
+ .then(function (response) {
+
+ })
+ .catch(function (error) {
+
+ });
+ }
clicked('views/webview_embed.html', true,false,{},{url:this.url})
}
}
@@ -98,6 +109,10 @@ new Vue({
if (startPageImgUrl != null) {
this.imgUrl = startPageImgUrl;
}
+ var startPageId = localStorage.getItem("startPageId")
+ if (startPageId != null) {
+ this.starImgId = startPageId;
+ }
var startPageClickUrl = localStorage.getItem("startPageClickUrl")
if (startPageClickUrl != null) {
this.url = startPageClickUrl;
diff --git a/fangija-zsyf/views/district/detail.html b/fangija-zsyf/views/district/detail.html
index 2ba396c..e9cfe1a 100644
--- a/fangija-zsyf/views/district/detail.html
+++ b/fangija-zsyf/views/district/detail.html
@@ -36,6 +36,8 @@
.loadingBg{width:100%;height:100%;background:#fff;overflow:hidden;position:absolute;top:11px;left:0;z-index:100;}
.loadingBg .infinite-scroll-preloader{margin-top:30%;}
+
+
@@ -106,7 +108,40 @@
-