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

This commit is contained in:
xuhe@fangjia.com
2018-04-02 14:27:34 +08:00
4 changed files with 283 additions and 123 deletions
+1 -1
View File
@@ -538,7 +538,7 @@ input::-webkit-input-placeholder{
.list-block.commentList .item-text{height:auto;min-height:1.5rem;}
.commentBox{height:66px;background:#fff;position:absolute;right:0;left:0;bottom:0;z-index:10;}
.commentBox .searchbar{padding:0.75rem 0.5rem;padding-left:0;margin:0;height:66px;background:#fff;border-top:solid 1px #DCDCDC;position:absolute;right:0;left:0;bottom:0;z-index:10;}
.commentBox .searchbar{padding:0.75rem 0.5rem;padding-left:0;margin:0;height:66px;background:#fff;border-top:solid 1px #e7e7e7;position:absolute;right:0;left:0;bottom:0;z-index:10;}
.commentBox .searchbar .search-input{line-height:36px;}
.commentBox .searchbar .search-input input{height:36px;background:#EFEFEF;}
.commentBox .searchbar.commentInputBox .search-input input{padding-left:1.8rem;}
+30 -12
View File
@@ -13,9 +13,6 @@
<link rel="stylesheet" href="../../css/theme-orange.css">
<style>
/*em{font-style:normal;}
em.up{color:#ff1100;}
em.down{color:#2cb66a;}*/
.list-block .item-title{font-size:0.85rem;}
.list-block .item-title span.span01{font-size:0.7rem;color:#666;margin-left:0.3rem;}
.icon-add{width:0.6rem;height:0.6rem;background:url(../../images/icon-add.png) no-repeat center center;background-size:100%;margin-right:0.3rem;}
@@ -89,6 +86,9 @@ var uid = "162167854504869888";
/* 房产用途 */
$(document).on('click','.open-vertical-modal', function () {
//获取对应<li>栏目存储的houseinfo id
var id = $(this).attr("id");
var houseStatus = $(this).attr("houseStatus");
$.modal({
title: '房产用途',
verticalButtons: true,
@@ -96,21 +96,19 @@ $(document).on('click','.open-vertical-modal', function () {
{
text: '自住',
onClick: function() {
//window.location.href = "01_index01_myHouse01_index.html";
addManagement(id, houseStatus, "自住");
}
},
{
text: '出租',
onClick: function() {
//window.location.href = "01_index01_myHouse01_index.html";
addManagement(id, houseStatus, "出租");
}
},
{
text: '空置',
onClick: function() {
//window.location.href = "01_index01_myHouse01_index.html";
addManagement(id, houseStatus, "空置");
}
},
{
@@ -120,7 +118,27 @@ $(document).on('click','.open-vertical-modal', function () {
})
});
//查询房产评估列表
//添加管理AJAX请求
function addManagement(id, houseStatus, liveStatus){
axios.post("/rest/evaluate/addManagement",
{
id: id,
houseStatus: houseStatus,
liveStatus: liveStatus
}).then(function (response) {
var status = response.data.status;
if(status){
$.toast(response.data.data);
window.location.reload();
}else{
$.toast(response.data.message);
}
}).catch(function (error) {
console.log(error);
});
}
//查询房产评估列表AJAX请求
function selectEvaluateList(){
//先清空列表
$('.list-block ul').html("");
@@ -189,9 +207,9 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey];
if(!isNaN(cityAvgPriceValue)){
if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='up'>"+'高'+(parseInt(cityAvgPriceValue)-parseInt(result.price))+'元'+"</em></div>";
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='up'>高"+(parseInt(cityAvgPriceValue)-parseInt(result.price))+"元</em></div>";
}else{
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>"+'低'+(parseInt(result.price)-parseInt(cityAvgPriceValue))+'元'+"</em></div>";
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>低"+(parseInt(result.price)-parseInt(cityAvgPriceValue))+"元</em></div>";
}
}else{
//为非数字清空放空格
@@ -199,7 +217,7 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
}
htmlContent = htmlContent + "<div>均价: <em class='em02'>"+result.price+"元/㎡</em></div>";
htmlContent = htmlContent + "<div class='price'><em><strong>"+tempTotalPrice+"</strong>万</em></div>";
htmlContent = htmlContent + "</div></div></a><a class='add open-vertical-modal'><i class='icon icon-add' id="+result.id+" uid="+result.uid+"></i>添加管理</a>"
htmlContent = htmlContent + "</div></div></a><a class='add open-vertical-modal' id="+result.id+" uid="+result.uid+" houseStatus="+result.houseStatus+"><i class='icon icon-add'></i>添加管理</a>"
htmlContent = htmlContent +"</li>";
}
}
+223 -99
View File
@@ -296,95 +296,221 @@ $(document).on('click','.open-vertical-modal', function () {
<script>
/* 均价走势 */
function yearAvgPrice(){
var categories = new Array();
var series = new Array();
var o = new Object();
o.name = '龙盛佳苑';
var odata = new Array();
o.data = odata
series.push(o);
var o2 = new Object();
o2.name = '上海';
var o2data = new Array();
var o3 = new Object();
o3.name = '静安';
var o3data = new Array();
odata.push(46000)
o2data.push(50400)
o3data.push(52800)
categories.push('2017-02')
odata.push(47000)
o2data.push(50600)
o3data.push(52900)
categories.push('2017-03')
odata.push(47400)
o2data.push(50300)
o3data.push(52700)
categories.push('2017-04')
odata.push(49000)
o2data.push(50200)
o3data.push(55200)
categories.push('2017-05')
odata.push(49400)
o2data.push(50800)
o3data.push(56100)
categories.push('2017-06')
odata.push(49600)
o2data.push(51900)
o3data.push(56900)
categories.push('2017-07')
odata.push(48400)
o2data.push(53100)
o3data.push(59400)
categories.push('2017-08')
odata.push(52200)
o2data.push(51200)
o3data.push(62400)
categories.push('2017-09')
odata.push(54900)
o2data.push(56200)
o3data.push(65600)
categories.push('2017-10')
odata.push(57400)
o2data.push(57000)
o3data.push(66800)
categories.push('2017-11')
odata.push(54800)
o2data.push(56700)
o3data.push(66200)
categories.push('2017-12')
odata.push(55000)
o2data.push(58300)
o3data.push(66000)
categories.push('2018-01')
o3.data = o3data
series.push(o3);
o2.data = o2data
series.push(o2);
charts = Highcharts.chart('chart', {
//function yearAvgPrice(){
// var categories = new Array();
// var series = new Array();
// var o = new Object();
// o.name = '龙盛佳苑';
//
// var odata = new Array();
// o.data = odata
// series.push(o);
//
// var o2 = new Object();
// o2.name = '上海';
// var o2data = new Array();
//
// var o3 = new Object();
// o3.name = '静安';
// var o3data = new Array();
// odata.push(46000)
// o2data.push(50400)
// o3data.push(52800)
// categories.push('2017-02')
// odata.push(47000)
// o2data.push(50600)
// o3data.push(52900)
// categories.push('2017-03')
// odata.push(47400)
// o2data.push(50300)
// o3data.push(52700)
// categories.push('2017-04')
// odata.push(49000)
// o2data.push(50200)
// o3data.push(55200)
// categories.push('2017-05')
// odata.push(49400)
// o2data.push(50800)
// o3data.push(56100)
// categories.push('2017-06')
// odata.push(49600)
// o2data.push(51900)
// o3data.push(56900)
// categories.push('2017-07')
// odata.push(48400)
// o2data.push(53100)
// o3data.push(59400)
// categories.push('2017-08')
// odata.push(52200)
// o2data.push(51200)
// o3data.push(62400)
// categories.push('2017-09')
// odata.push(54900)
// o2data.push(56200)
// o3data.push(65600)
// categories.push('2017-10')
// odata.push(57400)
// o2data.push(57000)
// o3data.push(66800)
// categories.push('2017-11')
// odata.push(54800)
// o2data.push(56700)
// o3data.push(66200)
// categories.push('2017-12')
// odata.push(55000)
// o2data.push(58300)
// o3data.push(66000)
// categories.push('2018-01')
//
// o3.data = o3data
// series.push(o3);
//
// o2.data = o2data
// series.push(o2);
//
// charts = Highcharts.chart('chart', {
// title: {
// text: ''
// },
// subtitle: {
// text: '',
// x: -20
// },
// colors: ['#F88C9F', '#AAD672', '#AE94E9'],
// xAxis: {
// categories: categories,
// boundaryGap: false,
// tickInterval: 2,
// tickLength: 6,
// labels: {
// style: {
// fontSize: 12
// }
// }
// },
// yAxis: {
// allowDecimals: false,
// title: {
// text: ''
// },
// plotLines: [{
// value: 0,
// width: 1,
// color: 'red'
// }]
// },
// tooltip: {
// valueSuffix: '元/㎡'
// },
// legend: {
// layout: 'horizontal',
// align: 'center',
// verticalAlign: 'bottom',
// y: 0,
// borderWidth: 0
// },
// plotOptions: {
// line: {
// connectNulls: true //该设置会连接空值点
// },
// series: {
// events: {
// legendItemClick: function(e) {
// return false;
// }
// },
// marker: {
// radius: 3, //曲线点半径,默认是4
// symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
// }
// }
// },
// series: series,
// credits: {
// enabled: false
// }
// })
//}
//yearAvgPrice();
function loadingChart(hid, city, region, name, type, cat){
$.ajax({
type : "GET",
url : "../youfang/getDistrictPriceZouShi?id="+hid+"&type="+type+"&cat="+cat+"&city="+city+"&region="+region+"&name="+name,
dataType:"json",
data : {},
async:false,
success : function(re) {
var categories = new Array();
var series = new Array();
var cityObj = new Object();
var regionObj = new Object();
var districtObj = new Object();
districtObj.name = '<#if showObject??>${showObject.name!}</#if>';
regionObj.name = '<#if showObject??>${showObject.region!}</#if>';
cityObj.name = '<#if showObject??>${showObject.city!}</#if>';
series.push(districtObj);
series.push(regionObj);
series.push(cityObj);
var cityDatas = new Array();
var regionDatas = new Array();
var districtDatas = new Array();
var m = re.timeKeys;
if(m){
for(var i=0;i<m.length;i++){
var date = new Date(Number(m[i]))
categories.push(date.format("yyyy-MM"));
if(re.cityAvgZouShi[m[i]] == undefined){
cityDatas.push(null);
} else {
cityDatas.push(re.cityAvgZouShi[m[i]]);
}
if (re.regionAvgZouShi[m[i]] == undefined) {
regionDatas.push(null);
} else {
regionDatas.push(re.regionAvgZouShi[m[i]]);
}
if (re.districtAvgZouShi[m[i]] == undefined){
districtDatas.push(null);
} else {
districtDatas.push(re.districtAvgZouShi[m[i]]);
}
}
}
cityObj.data = cityDatas;
regionObj.data = regionDatas;
districtObj.data = districtDatas;
showChat(categories, series);
}
});
}
/* 均价走势 */
function showChat(categories, series) {
charts =Highcharts.chart('chart02', {
title: {
text: ''
text: '',
x: -20 //center
},
subtitle: {
text: '',
x: -20
},
colors: ['#F88C9F', '#AAD672', '#AE94E9'],
colors: ['#50a5fc', '#666', '#ff560c'],
xAxis: {
categories: categories,
boundaryGap: false,
tickInterval: 2,
tickLength: 6,
tickInterval: 3,
tickLength: 8,
labels: {
style: {
fontSize: 12
'font-size': '12px'
}
}
},
@@ -396,43 +522,41 @@ function yearAvgPrice(){
plotLines: [{
value: 0,
width: 1,
color: 'red'
color: '#808080'
}]
},
tooltip: {
valueSuffix: '元/㎡'
},
plotOptions: {
line: {
connectNulls:true//该设置会连接空值点
},
series: {
events: {
legendItemClick: function(event) {
return false;
}
},
marker: {
radius: 3, //曲线点半径,默认是4
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
}
}
},
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom',
y: 0,
y: -15,
borderWidth: 0
},
plotOptions: {
line: {
connectNulls: true //该设置会连接空值点
},
series: {
events: {
legendItemClick: function(e) {
return false;
}
},
marker: {
radius: 3, //曲线点半径,默认是4
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
}
}
},
series: series,
credits: {
credits: {
enabled: false
}
})
}
yearAvgPrice();
</script>
</body>
+29 -11
View File
@@ -42,7 +42,7 @@
<div id="content">
</div>
</div>
<!--
<div class="newCss">
<ul>
<li><span>房贷</span></li>
@@ -50,6 +50,7 @@
<li><span>首套房</span></li>
</ul>
</div>
-->
<div class="adBoxApp">
<img src="../../images/wx_app.png">
<p><label>有房&nbsp;&nbsp;有家&nbsp;&nbsp;有爱</label><br><small>更多房产资讯上有房APP</small></p>
@@ -70,7 +71,7 @@
<div class="bar commentBox">
<div class="searchbar row commentInputBox">
<div class="search-input col-66">
<div class="search-input col-60">
<label class="icon icon-comments" for="search"></label>
<input type="text" placeholder="我也说两句">
</div>
@@ -79,7 +80,7 @@
<a class="collection collection01"><i class="icon icon-collection01"></i></a>
</span>-->
<span class="praise col-15">
<span class="praise col-20">
<i class="icon icon-praise-grey02"></i><font id="newsPraise">{{ newsDzCount }}</font>
</span>
<span class="collection collection01 col-15">
@@ -124,7 +125,7 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
<script>
document.addEventListener('plusready', onPlusReady, false);
var id;//= "186182250936643584";
var id; //= "186182250936643584";
var shareUrl = BASE_PATH+"/news/newDetail?newsId=";
var sharehrefTitle = "停车坐爱枫林晚,霜叶红于二月花";
var sharehrefDes = "客观里面请!";
@@ -186,7 +187,7 @@ function onPlusReady() {
$("#create_time").text(dateStr)
$("#content").html(data.content)
//$("#newsPraise").text(data.thumbsUpCount);
vm.newsDzCount = data.thumbsUpCount
vm.newsDzCount = numberConver(data.thumbsUpCount)
//预先加载20条
sharehrefTitle = data.title
@@ -207,6 +208,16 @@ function onPlusReady() {
updateSerivces();
}
//数量进行转换
function numberConver(thumbsUpCount){
var thumbsUpCountStr = ""
if(thumbsUpCount>=10000){
thumbsUpCountStr = (thumbsUpCount/10000).toFixed(1)+"万"
}else{
thumbsUpCountStr = thumbsUpCount
}
return thumbsUpCountStr;
}
function isCollect(){
@@ -296,7 +307,7 @@ function addItems(number, lastIndex) {
}
html = html + "<div class='item-title-row'>"+
"<div class='item-title'>"+name+"</div>"+
"<div class='item-after'><span data-cid='"+vo.id+"'><i class='icon icon-praise-grey01'></i><label>"+vo.praiseCount+"</label></span></div>"+
"<div class='item-after'><span data-cid='"+vo.id+"'><i class='icon icon-praise-grey01'></i><label>"+numberConver(vo.praiseCount)+"</label></span></div>"+
"</div>"+
"<div class='item-title-row'>";
var address = "";
@@ -420,7 +431,7 @@ function getDateDiff(curTime, publishTime){
/* 评论点赞 */
$("body").delegate(".commentList span .icon-praise-grey01", "click", function () {
$(this).find(".icon").addClass("icon-praise-orange01");
$(this).addClass("icon-praise-orange01");
var cid = $(this).parent().attr("data-cid")
$(this).attr("disabled","disabled");
var text = $(this).parent().text();
@@ -578,20 +589,27 @@ function utf16toEntities(str) {
return str;
}
//$(window).bind('resize',_funResize);
var _funResize = function(){
document.body.scrollTop = document.body.scrollHeight;
target.scrollIntoView(true);
}
$(function() {
$('#commentInput').on('click', function () {
var target = this;
// 使用定时器是为了让输入框上滑时更加自然
/*setTimeout(function(){
target.scrollIntoView(true);
},100);*/
setTimeout(function(){
document.body.scrollTop = document.body.scrollHeight;
target.scrollIntoView(true);
},100);
});
})
})
</script>
</body>
</html>