Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1

Conflicts:
	fangija-zsyf/config.js
This commit is contained in:
2018-04-09 18:42:07 +08:00
34 changed files with 4744 additions and 847 deletions
+8 -1
View File
@@ -76,6 +76,7 @@ var mapConfig = {
var $this = $(this);
//$this.addClass('current').siblings().removeClass('current');
var id = $this.attr('id');
that.hidden_all_mark()
that.openTypeWrap(id);
});
@@ -392,7 +393,13 @@ var mapConfig = {
if (that.house_near_p[key].length > 0) {
for (var j = 0; j < that.house_near_p[key].length; j++) {
var point = that.house_near_p[key][j];
point && (key == type ? point.show() : point.hide());
if(point){
if(key == type){
point.show();
}else{
point.hide()
}
}
}
}
}
+55 -10
View File
@@ -4,10 +4,54 @@ var labelFont = 'bold 12px Sans-serif';
var dates;
var data;
var volumes;
var myChart01 = echarts.init(document.getElementById('chart01'));
var curOption;
/* 关注&已关注切换 */
$(".collection01").on("click", function () {
axios.post("/rest/districts/addCollect",{city:city,region:region,name:name,lat:lat,lng:lng,address:address, poiTags:tags}).then(function (response) {
var msg = response.data.message
if(msg){
$.toast(msg);
}else{
$(".collection01").hide();
$(".collection02").show();
$.toast("随时掌握小区动态");
}
})
.catch(function (error) {
console.log(error);
});
});
$(".collection02").on("click", function () {
axios.post("/rest/districts/removeCollect",{city:city,region:region,name:name}).then(function (response) {
var msg = response.data.message
if(msg){
$.toast(msg);
}else{
$(".collection02").hide();
$(".collection01").show();
$.toast("取消关注");
}
})
.catch(function (error) {
console.log(error);
});
});
/* button状态切换 */
$(".content-block .button").on("click", function () {
$(this).parent().children().removeClass("active");
$(this).addClass("active");
});
//小区详情
function loadDistrictInfo(){
axios.get("/rest/districts/detail", {
@@ -24,21 +68,23 @@ function loadDistrictInfo(){
baseInfo.cityPrice = cityPrice
}
if(collected){
baseInfo.collect = true;
$(".collection02").show();
$(".collection01").hide();
}else{
baseInfo.collect = false;
$(".collection02").hide();
$(".collection01").show();
}
if(vo){
if(vo.avgPrice){
lat = vo.lat2;
lng = vo.lng2;
loadMapPoi();
//loadMapPoi();
baseInfo.city = vo.city
baseInfo.region = vo.region
baseInfo.address = vo.address;
baseInfo.districtName = vo.name
baseInfo.name = vo.name
baseInfo.avgPrice = vo.avgPrice;
baseInfo.oneMonthUpDownRange = vo.oneMonthUpDownRange;
@@ -79,10 +125,9 @@ function loadDistrictInfo(){
}
}
loadNearDistrict(vo.lat2, vo.lng2);
}else{
$("#noDataDiv").show()
baseInfo.districtName = "小区详情"
baseInfo.name = "小区详情"
}
}
@@ -93,7 +138,7 @@ function loadDistrictInfo(){
}
//附近小区
function loadNearDistrict(lat, lng){
/*function loadNearDistrict(lat, lng){
axios.get("/rest/districts/nearDistrict", {
params: {
lat: lat,
@@ -124,7 +169,7 @@ function loadNearDistrict(lat, lng){
alert(error)
console.log(error);
});
}
}*/