Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
Conflicts: fangija-zsyf/config.js fangija-zsyf/yfindex.html
This commit is contained in:
@@ -73,9 +73,11 @@ $.config = {router: false}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../../js/beacon_release.js"></script>
|
||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||
<script src="../../config.js"></script>
|
||||
<script type="text/javascript" src="../../js/mui.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../config.js"></script>
|
||||
<script type="text/javascript" src="../../js/common.js" ></script>
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
@@ -83,6 +85,8 @@ $.config = {router: false}
|
||||
|
||||
<script>
|
||||
var uid = "162167854504869888";
|
||||
//调用mui.init方法
|
||||
$.init()
|
||||
|
||||
/* 房产用途 */
|
||||
$(document).on('click','.open-vertical-modal', function () {
|
||||
@@ -120,7 +124,7 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
|
||||
//添加管理AJAX请求
|
||||
function addManagement(id, houseStatus, liveStatus){
|
||||
axios.post("/rest/evaluate/addManagement",
|
||||
axios.post(BASE_PATH + "/rest/evaluate/addManagement",
|
||||
{
|
||||
id: id,
|
||||
houseStatus: houseStatus,
|
||||
@@ -143,7 +147,7 @@ function selectEvaluateList(){
|
||||
//先清空列表
|
||||
$('.list-block ul').html("");
|
||||
var htmlContent = '';
|
||||
axios.get("/rest/evaluate/houseinfolist",
|
||||
axios.get(BASE_PATH + "/rest/evaluate/houseinfolist",
|
||||
{
|
||||
params: {
|
||||
uid: uid
|
||||
|
||||
@@ -104,19 +104,19 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="ad" href=""><img src="../../images/adImg.png"></a>
|
||||
<a class="ad" href=""><img src="../../images/adImg.png" id="img"></a>
|
||||
<div class="topic">
|
||||
<div class="topicTitle" style="position:relative;">均价走势
|
||||
<div class="content-block">
|
||||
<div class="buttons-row theme">
|
||||
<a href="#tabChartAvg1" class="tab-link button active">半年</a>
|
||||
<a href="#tabChartAvg2" class="tab-link button">一年</a>
|
||||
<a href="#tabChartAvg3" class="tab-link button">三年</a>
|
||||
<div class="buttons-row theme avgPriceTrend">
|
||||
<a href="#tabChartAvg1" data-id="2" class="tab-link button active">半年</a>
|
||||
<a href="#tabChartAvg2" data-id="3" class="tab-link button">一年</a>
|
||||
<a href="#tabChartAvg3" data-id="5" class="tab-link button">三年</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topicContent" style="padding:0;">
|
||||
<div class="chart" id="chart"></div>
|
||||
<div class="chart" id="chart02"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -128,7 +128,7 @@
|
||||
<script>
|
||||
|
||||
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||
Zepto = $
|
||||
var jQuery = $
|
||||
$.config = {router: false}
|
||||
|
||||
</script>
|
||||
@@ -238,6 +238,15 @@ $.config = {router: false}
|
||||
evaluate_msg.evaluate_words="暂无"
|
||||
}
|
||||
evaluate_msg.msg=h.evaluateMsg
|
||||
$("#img").attr("src","http://192.168.10.161:8084/img/"+h.imgId);
|
||||
loadingChart(h.city,h.region,h.name,2)
|
||||
//按照时间范围加载数据
|
||||
$(".avgPriceTrend a").click(function(){
|
||||
var type = $(this).attr("data-id");
|
||||
$(".avgPriceTrend a").removeClass("active")
|
||||
$(this).addClass('active');
|
||||
loadingChart(h.city,h.region,h.name,type);
|
||||
});
|
||||
}
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
@@ -295,199 +304,76 @@ $(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', {
|
||||
// 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+"®ion="+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]]);
|
||||
}
|
||||
|
||||
|
||||
function getNowFormatDate(date) {
|
||||
var seperator1 = "-";
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth() + 1;
|
||||
if (month >= 1 && month <= 9) {
|
||||
month = "0" + month;
|
||||
}
|
||||
var currentdate = year + seperator1 + month ;
|
||||
return currentdate;
|
||||
}
|
||||
function loadingChart(city, region, name,type){
|
||||
axios.get("/fsh/getDistrictPriceZouShi",{
|
||||
params:{city : city,region:region,name:name,type:type}
|
||||
}).then(function(response){
|
||||
var re = response.data;
|
||||
var categories = new Array();
|
||||
var series = new Array();
|
||||
var cityObj = new Object();
|
||||
var regionObj = new Object();
|
||||
var districtObj = new Object();
|
||||
|
||||
districtObj.name = '小区';
|
||||
regionObj.name = '区县';
|
||||
cityObj.name = '城市';
|
||||
|
||||
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(getNowFormatDate(date));
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
cityObj.data = cityDatas;
|
||||
regionObj.data = regionDatas;
|
||||
districtObj.data = districtDatas;
|
||||
|
||||
showChat(categories, series);
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,10 @@
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">城<small class="spacing"> </small>市</div>
|
||||
<div class="item-after">
|
||||
<input type="text" id="input_city" class="textAlignLeft open-about01" placeholder="请选择城市" value="上海">
|
||||
<input type="hidden" name="region">
|
||||
<input type="hidden" name="address">
|
||||
<input name ="cityAddress" type="hidden">
|
||||
<input type="text" id="input_city" class="textAlignLeft open-about01" placeholder="请选择城市" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,7 +62,7 @@
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">房屋地址</div>
|
||||
<div class="item-after">
|
||||
<input type="text" id="input_address" class="textAlignLeft open-about02" placeholder="请选择房屋地址">
|
||||
<input type="text" id="input_address" class="textAlignLeft open-about02" placeholder="请选择房屋地址" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -89,20 +92,6 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<!--
|
||||
<li>
|
||||
<a class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">楼栋室号</div>
|
||||
<div class="item-after">
|
||||
<input type="text" id="input_building01" class="textAlignLeft" placeholder="请输入楼栋室号">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
-->
|
||||
<li>
|
||||
<a class="item-link item-content">
|
||||
<div class="item-inner">
|
||||
@@ -135,7 +124,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popover">
|
||||
<!--<div class="popover">
|
||||
<div class="popover-angle"></div>
|
||||
<div class="popover-inner">
|
||||
<div class="list-block">
|
||||
@@ -147,7 +136,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<!-- About Popup -->
|
||||
@@ -165,6 +154,13 @@
|
||||
<a href="#tabCity2" class="tab-link button">按城市等级</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-block content-block01 content dn" style="top:66px;z-index:100;" id="selectContainer">
|
||||
<div class="container" style="top:0;">
|
||||
<div class="city" style="width:100%;">
|
||||
<div class="city-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<div id="tabCity1" class="tab active">
|
||||
<div class="content-block content-block01 content">
|
||||
@@ -179,8 +175,8 @@
|
||||
<div class="city-list01">
|
||||
<span class="city-letter" id="Hot">热门城市</span>
|
||||
<div>
|
||||
<p class="close-popup collectionCity">北京<i class="icon-collection03"></i></p>
|
||||
<p class="close-popup collectionCity active">上海<i class="icon-collection03"></i></p>
|
||||
<p class="close-popup">北京</i></p>
|
||||
<p class="close-popup">上海</i></p>
|
||||
<p class="close-popup">广州</p>
|
||||
</div>
|
||||
<div>
|
||||
@@ -198,7 +194,7 @@
|
||||
<div class="city">
|
||||
<div class="city-list"><span class="city-letter" id="A1">A</span>
|
||||
<p class="close-popup">阿坝州</p>
|
||||
<p class="close-popup collectionCity">阿克苏<i class="icon-collection03"></i></p>
|
||||
<p class="close-popup">阿克苏</p>
|
||||
<p class="close-popup">阿拉尔</p>
|
||||
<p class="close-popup">阿勒泰</p>
|
||||
<p class="close-popup">阿里</p>
|
||||
@@ -640,8 +636,8 @@
|
||||
<div class="city-list">
|
||||
<span class="city-letter" id="City1">一线城市</span>
|
||||
<div>
|
||||
<p class="close-popup collectionCity">北京<i class="icon-collection03"></i></p>
|
||||
<p class="close-popup collectionCity active">上海<i class="icon-collection03"></i></p>
|
||||
<p class="close-popup">北京</p>
|
||||
<p class="close-popup">上海</p>
|
||||
<p class="close-popup">广州</p>
|
||||
<p class="close-popup">深圳</p>
|
||||
</div>
|
||||
@@ -938,7 +934,7 @@
|
||||
<p class="close-popup">陇南</p>
|
||||
<p class="close-popup">吴忠</p>
|
||||
<p class="close-popup">晋城</p>
|
||||
<p class="close-popup collectionCity">阿克苏<i class="icon-collection03"></i></p>
|
||||
<p class="close-popup">阿克苏</p>
|
||||
<p class="close-popup">喀什</p>
|
||||
<p class="close-popup">昌吉</p>
|
||||
<p class="close-popup">楚雄</p>
|
||||
@@ -1034,144 +1030,21 @@
|
||||
<input type="search" id="districtName" placeholder="请输入小区名或地址">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-block dn" id="notFound" style="margin-top:50%;">
|
||||
<p style="text-align:center;">没有找到相关的小区</p>
|
||||
<p><a class="button button-big theme open-modal" id="notFound_btn" style="font-size:0.8rem;">没搜到?立刻告诉我们</a></p>
|
||||
<p style="text-align:center;text-decoration:underline;margin-top:2rem;"><a class="close-popup">返回</a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="content-block content-block01 content">
|
||||
<div class="container">
|
||||
<!--
|
||||
<div class="list-block media-list aroundList">
|
||||
<div class="searchHistory"><i class="icon icon-near"></i>附近小区</div>
|
||||
<div>
|
||||
<ul>
|
||||
<li>
|
||||
<a class="item-link item-content close-popup">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">
|
||||
<font>龙盛佳苑</font><br>
|
||||
<small>上海市静安区沪太路1329弄</small>
|
||||
</div>
|
||||
<div class="item-after">8m</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content close-popup">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">
|
||||
<font>米扬公寓</font><br>
|
||||
<small>上海市宝山区沪太路1598号</small>
|
||||
</div>
|
||||
<div class="item-after">175m</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content close-popup">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">
|
||||
<font>大华阳城花园一期</font><br>
|
||||
<small>上海市静安区沪太路1589号</small>
|
||||
</div>
|
||||
<div class="item-after">201m</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content close-popup">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">
|
||||
<font>大华阳城花园七期</font><br>
|
||||
<small>上海市静安区阳城路433号</small>
|
||||
</div>
|
||||
<div class="item-after">201m</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content close-popup">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">
|
||||
<font>沪太路1700弄小区</font><br>
|
||||
<small>上海市宝山区沪太路1700弄</small>
|
||||
</div>
|
||||
<div class="item-after">267m</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content close-popup">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">
|
||||
<font>浦联佳苑</font><br>
|
||||
<small>上海市静安区阳城路388弄</small>
|
||||
</div>
|
||||
<div class="item-after">269m</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content close-popup">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">
|
||||
<font>大华阳城花园</font><br>
|
||||
<small>上海市静安区阳城路283弄</small>
|
||||
</div>
|
||||
<div class="item-after">276m</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content close-popup">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">
|
||||
<font>大华阳城花园六期</font><br>
|
||||
<small>上海市静安区沪太路1580号</small>
|
||||
</div>
|
||||
<div class="item-after">276m</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="list-block media-list aroundList newCss dn">
|
||||
<div class="searchHistory" id="searchAroundDiv">附近小区</div>
|
||||
<div id="aroundList">
|
||||
<ul>
|
||||
<li><span class="close-popup">龙盛佳苑</span></li>
|
||||
<li><span class="close-popup">米扬公寓</span></li>
|
||||
<li><span class="close-popup">大华阳城花园一期</span></li>
|
||||
<li><span class="close-popup">大华阳城花园七期</span></li>
|
||||
<li><span class="close-popup">沪太路1700弄小区</span></li>
|
||||
<li><span class="close-popup">浦联佳苑</span></li>
|
||||
<li><span class="close-popup">大华阳城花园</span></li>
|
||||
<li><span class="close-popup">大华阳城花园六期</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-block media-list hotList newCss">
|
||||
<div class="list-block media-list hotList newCss">
|
||||
<div class="searchHistory" id="searchHotDiv">热门小区</div>
|
||||
<div id="hotList">
|
||||
<ul>
|
||||
<li><span class="close-popup">龙盛佳苑</span></li>
|
||||
<li><span class="close-popup">水韵华庭</span></li>
|
||||
<li v-for="dist in hotDists"><a v-bind:data-name="dist.name" v-bind:data-region="dist.region" v-bind:data-city="dist.city">{{dist.name}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1179,39 +1052,28 @@
|
||||
<div class="searchHistory" id="searchHistoryDiv">历史记录<a id="clearSearchHistory"></a></div>
|
||||
<div id="districtList">
|
||||
<ul>
|
||||
<li><span class="close-popup">龙盛佳苑</span></li>
|
||||
<li><span class="close-popup">水韵华庭</span></li>
|
||||
<li><span class="close-popup">中远两湾城</span></li>
|
||||
<li><span class="close-popup">康宁坊</span></li>
|
||||
<li><span class="close-popup">雅鹿新苑</span></li>
|
||||
<li v-for="(history,index) in histories" @click="openHistoryDetail(index)">{{history.name}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-block media-list searchList dn">
|
||||
<div id="searchList">
|
||||
<ul>
|
||||
<li v-for="(searchDist,index) in searchDistricts" @click="openDistrictDetail(index)">
|
||||
<a class="item-link item-content close-popup" v-bind:data-name="searchDist.name" v-bind:data-region="searchDist.region" v-bind:data-city="searchDist.city" v-bind:data-address="searchDist.address">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">{{searchDist.name}}<br><small>{{searchDist.city}}{{searchDist.region}}{{searchDist.address}}</small></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="popup popup-about popup-about02">
|
||||
<div class="bar">
|
||||
<div class="searchbar row">
|
||||
<a class="col-5 close-popup"><span class="icon icon-left"></span></a>
|
||||
<div class="search-input col-95">
|
||||
<label class="icon icon-search" for="search"></label>
|
||||
<input type="search" id="districtName" placeholder="请输入小区名或地址">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-block content-block01 content">
|
||||
<div class="container">
|
||||
<div class="content-block" style="margin-top:50%;">
|
||||
<p style="text-align:center;">没有找到相关的小区</p>
|
||||
<p><a class="button button-big theme open-modal" id="notFound_btn" style="font-size:0.8rem;">没搜到?立刻告诉我们</a></p>
|
||||
<p style="text-align:center;text-decoration:underline;margin-top:2rem;"><a class="close-popup">返回</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="popup popup-about popup-about03">
|
||||
<div class="bar">
|
||||
@@ -1320,63 +1182,52 @@ Zepto = $
|
||||
$.config = {router: false}
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/sm.js" charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript" src="../../config.js"></script>
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<script type='text/javascript' src='../../js/city-app.js?version=${version!}' charset='utf-8'></script>
|
||||
<script type='text/javascript' src='../../js/searchDistrict-add.js?' charset='utf-8'></script>
|
||||
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||
<script>
|
||||
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
//扩展API加载完毕,现在可以正常调用扩展API
|
||||
function onPlusReady(){
|
||||
var city_map = localStorage.getItem("init_city");
|
||||
if(city_map){
|
||||
$("#input_city").val(city_map)
|
||||
$(".nowCity").text(city_map)
|
||||
curCity = city;
|
||||
city= city;
|
||||
}else{
|
||||
$("#input_city").val("上海");
|
||||
$(".nowCity").text("上海");
|
||||
}
|
||||
}
|
||||
/* 弹出城市选择页面 */
|
||||
$(document).on("click",".open-about01", function () {
|
||||
$.popup(".popup-about01");
|
||||
});
|
||||
|
||||
/* 定位城市 */
|
||||
$("body").on("click", ".letter a", function () {
|
||||
var s = $(this).html();
|
||||
$(".popup-about01 .content").scrollTop(0);
|
||||
$(".popup-about01 .content").scrollTop($("#" + s + "1").offset().top - 106);
|
||||
});
|
||||
$("#tabCity1 .content-block01").scroll(function () {
|
||||
$("#tabCity1 .content-block01 .letter").css("position","absolute");
|
||||
$("#tabCity1 .content-block01 .letter").css("top", 85 - $("#cityContainer").position().top);
|
||||
});
|
||||
|
||||
/* 获取城市 */
|
||||
$(".popup-about01 .cityGPS").on("click", function () {
|
||||
$("#input_city").val($(this).find("p").text());
|
||||
$(".cityChoice a").text($(this).find("p").text());
|
||||
$(".popup-about01 p").removeClass("active");
|
||||
});
|
||||
$(".popup-about01 p").on("click", function () {
|
||||
$("#input_city").val($(this).text());
|
||||
$(".cityChoice a").text($(this).text());
|
||||
$(".popup-about01 p").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
});
|
||||
|
||||
/* 弹出房屋地址搜索页面 */
|
||||
$(document).on("click",".open-about02", function () {
|
||||
$.popup(".popup-about02");
|
||||
});
|
||||
|
||||
/* #districtName获取焦点时,显示搜索历史 */
|
||||
$("#districtName").focus(function(){
|
||||
$(".aroundList").hide();
|
||||
$(".historyList").show();
|
||||
});
|
||||
|
||||
/* 清空搜索历史 */
|
||||
$("#clearSearchHistory").click(function(){
|
||||
$(this).parents(".historyList").hide();
|
||||
});
|
||||
|
||||
function req(city){
|
||||
city=city.replace("<i></i>","")
|
||||
$("#input_city").val(city);
|
||||
}
|
||||
/* 获取房屋地址 */
|
||||
$(".popup-about02 ul li").on("click", function () {
|
||||
$("#input_address").val($(this).find("span").text());
|
||||
$("#input_address").val($(this).find(".item-title font").text());
|
||||
});
|
||||
|
||||
|
||||
$("body").delegate("#hotList ul li", "click", function () {
|
||||
$("#input_address").val($(this).find("a").attr("data-name"));
|
||||
$("[name=region]").val($(this).find("a").attr("data-region"));
|
||||
$("[name=name]").val($(this).find("a").attr("data-name"));
|
||||
$("[name=cityAddress]").val($(this).find("a").attr("data-city"));
|
||||
$.popup(".popup-about02")
|
||||
});
|
||||
/* 选择-房屋类型 */
|
||||
//$("#input_houseType").picker({
|
||||
// toolbarTemplate: '<header class="bar bar-nav bar-nav01">\
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>我的关注</title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||
<link rel="stylesheet" href="../../css/main.css">
|
||||
<link rel="stylesheet" href="../../css/theme-blue.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<header class="bar bar-nav">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left"></span>
|
||||
</button>
|
||||
<!-- <button class="button button-link button-nav pull-right open-popover">
|
||||
<span class="icon icon-path"></span>
|
||||
</button> -->
|
||||
<h1 class="title">我的关注</h1>
|
||||
</header>
|
||||
<div class="bar bar-header-secondary">
|
||||
<div class="buttons-row theme">
|
||||
<a href="#tab1" class="tab-link button active">小区</a>
|
||||
<a href="#tab2" class="tab-link button">城市</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content contentSuggest infinite-scroll infinite-scroll-bottom" data-distance="50">
|
||||
<div class="tabs">
|
||||
<div id="tab1" class="tab active">
|
||||
<div class="content-block content-block01">
|
||||
<div class="list-block media-list">
|
||||
<ul class="list-container" id="ulTab1">
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 加载提示符 -->
|
||||
<div id="loadTip1" class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab2" class="tab">
|
||||
<div class="content-block content-block01">
|
||||
<div class="list-block media-list">
|
||||
<ul class="list-container" id="ulTab2">
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 加载提示符 -->
|
||||
<div id="loadTip2" class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<#include "/customMenu.html" />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
|
||||
|
||||
<script>
|
||||
|
||||
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||
jQuery = $
|
||||
$.config = {router: false}
|
||||
|
||||
</script>
|
||||
|
||||
<script type='text/javascript' src='../../js/light7.js?version=${version!}' charset='utf-8'></script>
|
||||
<script type="text/javascript" src="../../js/cn.js?version=${version!}" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/common.js?version=${version!}"></script>
|
||||
<script src="../../config.js"></script>
|
||||
<script type="text/javascript" src="../../js/common.js" ></script>
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<#include "/monitor/monitor.html">
|
||||
<script type="text/javascript">
|
||||
$("#ulTab1").empty();
|
||||
$("#ulTab2").empty();
|
||||
//$.init()
|
||||
//加载flag
|
||||
var loading = false;
|
||||
//最多可加载的条目
|
||||
var maxItems = 100;
|
||||
|
||||
//上次加载的序号小区
|
||||
var lastIndex = 0;
|
||||
//上次加载的序号城市
|
||||
var lastIndex2 = 0;
|
||||
|
||||
//每次加载添加多少条目
|
||||
var itemsPerLoad = 8;
|
||||
var itemsPerLoadCity = 20;
|
||||
var url = "loadCollections?pageSize="+itemsPerLoad;
|
||||
var urlCity = "loadCityCollections?pageSize="+itemsPerLoadCity;
|
||||
var curpage = 1;
|
||||
var curpageCity = 1;
|
||||
var totalCount = 0;
|
||||
var tatalCountCity = 0;
|
||||
|
||||
function addEstate(number, lastIndex) {
|
||||
|
||||
curpage = lastIndex/itemsPerLoad + 1;
|
||||
|
||||
|
||||
axios.get("/myCollection/loadCollections",{params:{pageSize:itemsPerLoad,page:curpage}}).then(function(response){
|
||||
data = response.data;
|
||||
//data = eval( '(' + data + ')' );
|
||||
if(data['results']==null || data['results'].length==0) {
|
||||
$('#loadTip1').remove();
|
||||
$('.infinite-scroll-bottom #tab1').html("<div class='noData'><img src='../images/noData.png'><p>您还没有关注小区</p></div>");
|
||||
return;
|
||||
}
|
||||
totalCount = data.totalCount;
|
||||
// 生成新条目的HTML
|
||||
var html = '';
|
||||
$.each(data['results'], function(i){
|
||||
var tag = this.tag;
|
||||
var tagStr = "";
|
||||
if(tag){
|
||||
var tags = tag.split("_")
|
||||
for(var j=0;j<tags.length;j++){
|
||||
if(j<3){
|
||||
var tag = tags[j];
|
||||
|
||||
tagStr = tagStr + '<small class="small01">'+tag+'</small>';
|
||||
}
|
||||
}
|
||||
}
|
||||
//'<div class="item-after"><em>'+(this.minPrice?this.minPrice:'')+'万-'+(this.maxPrice?this.maxPrice:'')+'万</em></div>'+
|
||||
var priceStr = this.minPrice+'万-'+this.maxPrice+'万';
|
||||
if(this.minPrice==null||this.minPrice==0||this.maxPrice==null||this.maxPrice==0){
|
||||
priceStr="暂无数据";
|
||||
}
|
||||
html+= '<li>'+
|
||||
'<a onclick="clicked(\'${basePath}/district/details?city='+this.city+'®ion='+this.region+'&name='+this.name+'\',true)" class="item-link item-content">'+
|
||||
'<div class="item-inner">'+
|
||||
'<div class="item-title-row">'+
|
||||
'<div class="item-title">'+this.name+'</div>'+
|
||||
'<div class="item-after">¥'+(this.avgPrice?this.avgPrice:'')+ '元/㎡</div>'+
|
||||
'</div>'+
|
||||
'<div class="item-title-row">'+
|
||||
'<div class="item-title"><small>'+(this.address?(this.city+this.region+this.address):'')+'</small></div>'+
|
||||
'</div>'+
|
||||
'<div class="item-subtitle row">'+
|
||||
'<div class="col-50">潜力指数: <em class="em01">68</em></div>'+
|
||||
'<div class="col-50">涨跌幅: <em class="up">↑24.96%</em></div>'+
|
||||
'<div class="col-100">租金回报率: <em class="em02">2.08%</em></div>'+
|
||||
'</div>'+
|
||||
'<div class="item-subtitle">'+tagStr+'</div>'+
|
||||
'</div>'+
|
||||
'</a>'+
|
||||
'</li>';
|
||||
});
|
||||
|
||||
// 添加新条目
|
||||
$('#ulTab1').append(html);
|
||||
|
||||
if(totalCount<=itemsPerLoad){
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
// $.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').remove();
|
||||
}
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
|
||||
function addCity(number, lastIndex){
|
||||
curpageCity = lastIndex2/itemsPerLoadCity + 1;
|
||||
|
||||
axios.get("/myCollection/loadCityCollections",{params:{pageSize:itemsPerLoadCity,page:curpageCity}}).then(function(response){
|
||||
data = response.data;
|
||||
//data = eval( '(' + data + ')' );
|
||||
if(data['results']==null || data['results'].length==0) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
//$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip2').remove();
|
||||
$('.infinite-scroll-bottom #tab2').html("<div class='noData'><img src='../../images/noData.png'><p>您还没有关注城市</p></div>");
|
||||
return;
|
||||
}
|
||||
totalCountCity = data.totalCount;
|
||||
// 生成新条目的HTML
|
||||
var html = '';
|
||||
$.each(data['results'], function(i){
|
||||
avgPriceStr = '¥'+this.avgPrice+' 元/㎡';
|
||||
if(this.avgPrice==null||this.avgPrice==0){
|
||||
avgPriceStr="暂无数据";
|
||||
}
|
||||
html += '<li>'+
|
||||
'<a href="../quotations/building?cityName='+this.city+'" class="item-link item-content">'+
|
||||
'<div class="item-inner">'+
|
||||
'<div class="item-title-row">'+
|
||||
'<div class="item-title">'+this.city+'</div>'+
|
||||
'<div class="item-after">'+avgPriceStr+'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</a>'+
|
||||
'</li>' ;
|
||||
});
|
||||
|
||||
// 添加新条目
|
||||
$('#ulTab2').append(html);
|
||||
if(totalCountCity<=itemsPerLoadCity){
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
//$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip2').remove();
|
||||
}
|
||||
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
//预先加载8条
|
||||
addEstate(itemsPerLoad, 0);
|
||||
addCity(itemsPerLoadCity, 0);
|
||||
|
||||
//注册'infinite'事件处理函数
|
||||
$(document).on('infinite', '.infinite-scroll-bottom',function() {
|
||||
if($("#tab1").hasClass("active"))
|
||||
{
|
||||
// 如果正在加载,则退出
|
||||
if (loading) return;
|
||||
// 设置flag
|
||||
loading = true;
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
loading = false;
|
||||
// 更新最后加载的序号
|
||||
lastIndex = $('#ulTab1').find('li').length;
|
||||
if (lastIndex >= totalCount) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
// $.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').remove();
|
||||
return;
|
||||
}
|
||||
// 添加新条目
|
||||
addEstate(itemsPerLoad, $('#ulTab1').find('li').length);
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
// $.refreshScroller();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
if($("#tab2").hasClass("active"))
|
||||
{
|
||||
// 如果正在加载,则退出
|
||||
if (loading) return;
|
||||
// 设置flag
|
||||
loading = true;
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
loading = false;
|
||||
// 更新最后加载的序号
|
||||
lastIndexCity = $('#ulTab2').find('li').length;
|
||||
if (lastIndexCity >= totalCountCity) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
// $.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip2').remove();
|
||||
return;
|
||||
}
|
||||
|
||||
// 添加新条目
|
||||
addCity(itemsPerLoad, $('#ulTab2').find('li').length);
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
// $.refreshScroller();
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,337 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>我的收藏</title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="stylesheet" href="../../css/sm.css">
|
||||
<link rel="stylesheet" href="../../css/main.css">
|
||||
<link rel="stylesheet" href="../../css/mui.min.css">
|
||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||
|
||||
<style>
|
||||
.bar{background:#fff;}
|
||||
.selectBox{border-top:solid 0.5rem #f3f3f3;border-bottom:solid 1px #e5e5e5;}
|
||||
.selectContent .topic{border-bottom:solid 1px #e5e5e5;}
|
||||
.selectContent .list-block .item-title{font-size:0.7rem;}
|
||||
.buttons-row.theme .button{border:solid 1px #D7D7D7;color:#333;}
|
||||
.buttons-row.theme .button.active{background:none;color:#F18D00;}
|
||||
.content-block01 .row{margin-left:0;}
|
||||
.content-block01 .row .col-50 .button.button-fill{height:2rem;line-height:2rem;}
|
||||
.content-block01 .row .col-50 .button.button-fill.reset_btn{background:#fff;border:none;border-top:solid 1px #e5e5e5;}
|
||||
.content-block01 .row .col-50 .button.button-fill.confirm_btn{background:#F18D00;border:solid 1px #F18D00;}
|
||||
.info-container input{float:none;width:100%;}
|
||||
.picker-item{padding:0 5rem;font-size:18px;}
|
||||
.loadingBg{width:100%;height:100%;background:#fff;overflow:hidden;position:absolute;top:71px;left:0;z-index:100;}
|
||||
.loadingBg .infinite-scroll-preloader{margin-top:60%;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<header class="bar bar-nav">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left"></span>
|
||||
</button>
|
||||
<h1 class="title">我的收藏</h1>
|
||||
</header>
|
||||
<div class="content infinite-scroll infinite-scroll-bottom" data-distance="50">
|
||||
<div class="list-block">
|
||||
<ul class="list-container">
|
||||
<!-- 动态拼接内容 -->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 分页加载效果, 默认不显示, 和 加载loading页区分开-->
|
||||
<div class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="../../js/zepto.js" charset="utf-8"></script>
|
||||
<script>
|
||||
|
||||
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||
Zepto = $
|
||||
$.config = {router: false}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="../../js/beacon_release.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||
<script type="text/javascript" src="../../js/light7-2.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/mui.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../config.js"></script>
|
||||
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
||||
|
||||
<script>
|
||||
var uid = "162167854504869888";
|
||||
// 加载flag
|
||||
var loading = false;
|
||||
//空置第一次显示
|
||||
var yesterDayDeployFlag = true;
|
||||
|
||||
//分页部分参数定义
|
||||
var page;
|
||||
var pageSize;
|
||||
var totalPages;
|
||||
|
||||
// 上次加载的序号
|
||||
var lastIndex;
|
||||
// 每次加载添加多少条目
|
||||
var itemsPerLoad;
|
||||
// 最多可加载的条目
|
||||
var maxItems = 100;
|
||||
|
||||
//初始化init
|
||||
$.init();
|
||||
|
||||
// 注册'infinite'事件处理函数
|
||||
$(document).on('infinite', '.infinite-scroll-bottom', function() {
|
||||
// 如果正在加载,则退出
|
||||
if(loading) return;
|
||||
// 设置flag
|
||||
loading = true;
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
loading = false;
|
||||
//如果当前页大于等于总页数
|
||||
if(page >= totalPages) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
return;
|
||||
}
|
||||
//控制查询下一页的数据
|
||||
page = page + 1;
|
||||
selectNewsCollectList();
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
//$.refreshScroller();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
//我的收藏查询请求
|
||||
function selectNewsCollectList(){
|
||||
axios.get(BASE_PATH + "/rest/news/collectList",
|
||||
{
|
||||
params: {
|
||||
uid: uid,
|
||||
page: page,
|
||||
pageSize: pageSize
|
||||
}
|
||||
}).then(function (response) {
|
||||
var resultList = response.data.data.list;
|
||||
if(resultList != null && resultList.length == 0){
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
return;
|
||||
}
|
||||
if(response.data.data.currentPage == response.data.data.totalPages){
|
||||
//如果此次查询刚好是page = totalPages
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
}
|
||||
//封装list数据
|
||||
var dataObj = [];
|
||||
for(var i in resultList){
|
||||
dataObj.push(resultList[i])
|
||||
}
|
||||
// 上次加载的序号
|
||||
lastIndex = $('.cardInfo').length;
|
||||
//每次加载添加多少条目
|
||||
itemsPerLoad = resultList.length;
|
||||
//请求后对page进行赋值
|
||||
page = response.data.data.currentPage;
|
||||
pageSize = response.data.data.limit;
|
||||
totalPages = response.data.data.totalPages;
|
||||
addItems(itemsPerLoad, lastIndex, dataObj);
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//界面加载
|
||||
$(document).ready(function () {
|
||||
selectNewsCollectList();
|
||||
});
|
||||
|
||||
function openUrl(url){
|
||||
clicked(url, true);
|
||||
}
|
||||
|
||||
function openNewsView(newId) {
|
||||
clicked('/fangija-zsyf/views/news/newsDetail.html',true,false,{},{newsId:newId},function(newId){
|
||||
axios.post(BASE_PATH + "/rest/comment/getCommentCount",{commentObjId : newId}).then(function (response) {
|
||||
var msg = response.data.message
|
||||
if(response.data.status){
|
||||
$("#visitComment_"+newId).text(response.data.data+"条");
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},newId);
|
||||
var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1;
|
||||
$("#visitCount_"+newId).text(count+'人');
|
||||
}
|
||||
|
||||
/* 分页构造数据 */
|
||||
function addItems(itemsPerLoad, lastIndex, dataObj) {
|
||||
var html = '';
|
||||
for(var i in dataObj) {
|
||||
/*if(dataObj[i].yesterDayDeploy && yesterDayDeployFlag) {
|
||||
yesterDayDeployFlag = false;
|
||||
html += '<div class="content-block-title recommend" style="border-top:solid 0.5rem #f3f3f3;">历史推荐</div>';
|
||||
}*/
|
||||
if(dataObj[i].type == "专题") {
|
||||
html += '<div class="card cardInfo cardInfo01" onclick="openNewsView(\'' + dataObj[i].id + '\')">' +
|
||||
'<div class="card-header">' + dataObj[i].title + '</div>' +
|
||||
'<img src=' + dataObj[i].coverImg + '>' +
|
||||
'<div class="card-footer">' +
|
||||
'<span>' +
|
||||
'<i class="icon icon-eye-orange"></i><label id="visitCount_' + dataObj[i].id + '">' + dataObj[i].visitCount + '人</label>' +
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_' + dataObj[i].id + '">' + dataObj[i].recommendCommentCount + '条</label>' +
|
||||
'</span>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
if(dataObj[i].type == "推荐小区") {
|
||||
html += '<div class="card cardInfo cardInfo02" onclick="openUrl(\'' + BASE_PATH + '/district/details?city=' + dataObj[i].recommendDistrictCity + '®ion=' + dataObj[i].recommendDistrictRegion + '&name=' + dataObj[i].recommendDistrictName + '\')">' +
|
||||
'<div class="card-content">' +
|
||||
'<div class="list-block media-list"><ul><li class="item-content">' +
|
||||
'<div class="item-media"><img src=' + dataObj[i].coverImg + '></div>' +
|
||||
'<div class="item-inner" style="padding-right:0;">' +
|
||||
'<div class="item-title-row"><div class="item-title">' + dataObj[i].recommendDistrictName + '</div>' +
|
||||
'<div class="item-after"><span>' + dataObj[i].recommendDistrictCity + '-' + dataObj[i].recommendDistrictRegion +
|
||||
'</span></div></div>';
|
||||
if(dataObj[i].recommendDistrictTags != "" && dataObj[i].recommendDistrictTags != null) {
|
||||
var arry = dataObj[i].recommendDistrictTags.split("_");
|
||||
html += '<div class="item-subtitle"><span class="tag">';
|
||||
for(var j in arry) {
|
||||
html += '<small>' + arry[j] + '</small>';
|
||||
}
|
||||
html += '</span></div>';
|
||||
}
|
||||
html += '<div class="item-subtitle"><span class="star">推荐指数:<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i></span></div>';
|
||||
if(dataObj[i].recommendDistrictPrice) {
|
||||
html += '<div class="item-subtitle"><em><strong>' + dataObj[i].recommendDistrictPrice + '</strong>元/㎡</em></div>';
|
||||
}
|
||||
html += '</div></li></ul></div></div></div>';
|
||||
}
|
||||
if(dataObj[i].type == "活动") {
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01b" onclick="openNewsView(\'' + dataObj[i].id + '\')">' +
|
||||
'<div class="card-header">' + dataObj[i].title + '</div>' +
|
||||
'<img src=' + dataObj[i].coverImg + '>' +
|
||||
'<div class="card-footer"><span>' + dataObj[i].introduction + '</span></div></div>';
|
||||
}
|
||||
if(dataObj[i].type == "推荐城市") {
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01a" onclick="openUrl(\'' + BASE_PATH + '/quotations/building?cityName=' + dataObj[i].recommendCity + '\')">' +
|
||||
'<div class="card-header">推荐城市——' + dataObj[i].recommendCity + '</div>';
|
||||
if(dataObj[i].recommendCityTags != "" && dataObj[i].recommendCityTags != null) {
|
||||
var arry = dataObj[i].recommendCityTags.split("_");
|
||||
html += '<div class="card-content"><div class="card-content-inner"><span class="tag">';
|
||||
for(var j in arry) {
|
||||
html += '<small>' + arry[j] + '</small>';
|
||||
}
|
||||
html += '</span></div></div>';
|
||||
}
|
||||
html += '<img src=' + dataObj[i].coverImg + '>' +
|
||||
'<div class="card-footer"><span>均价:<em>' + dataObj[i].recommendCityAvgPrice + '元/㎡</em></span>' +
|
||||
'<span class="star">潜力指数:';
|
||||
if(dataObj[i].recommendCityIndex < 4) {
|
||||
html += '<i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 5 && dataObj[i].recommendCityIndex < 15) {
|
||||
html += '<i class="icon icon-star02"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 15 && dataObj[i].recommendCityIndex < 25) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 25 && dataObj[i].recommendCityIndex < 35) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star02"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 35 && dataObj[i].recommendCityIndex < 45) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 45 && dataObj[i].recommendCityIndex < 55) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star02"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 55 && dataObj[i].recommendCityIndex < 65) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 65 && dataObj[i].recommendCityIndex < 75) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star02"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 75 && dataObj[i].recommendCityIndex < 85) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 85 && dataObj[i].recommendCityIndex < 95) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star02"></i>';
|
||||
} else {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i>';
|
||||
}
|
||||
html += '</span></div><div class="card-footer" style="margin-top:-0.75rem;">';
|
||||
if(dataObj[i].recommendCityYoy) {
|
||||
html += '<span>近1年涨跌幅:';
|
||||
if(dataObj[i].recommendCityYoy > 0) {
|
||||
html += '<strong>' + (dataObj[i].recommendCityYoy * 100).toFixed(2) + '%</strong><i class="icon icon-arrow-red"></i>';
|
||||
} else {
|
||||
html += '<strong>' + (dataObj[i].recommendCityYoy * 100).toFixed(2) + '%</strong><i class="icon icon-arrow-green"></i>';
|
||||
}
|
||||
html += '</span>';
|
||||
}
|
||||
if(dataObj[i].recommendCityIndexTrend) {
|
||||
html += '<span>';
|
||||
if(dataObj[i].recommendCityIndexTrend >= 0) {
|
||||
html += '上涨概率:<strong>' + dataObj[i].recommendCityIndexTrend + '%</strong><i class="icon icon-arrow-red"></i>';
|
||||
} else {
|
||||
html += '下跌概率:<strong>' + dataObj[i].recommendCityYoy * (-1) + '%</strong><i class="icon icon-arrow-green"></i>';
|
||||
}
|
||||
html += '</span>';
|
||||
}
|
||||
html += '</div></div>';
|
||||
}
|
||||
if(dataObj[i].type == "新闻") {
|
||||
html += '<div class="card cardInfo cardInfo02" onclick="openNewsView(\'' + dataObj[i].id + '\')"><div class="card-content"><div class="list-block media-list">' +
|
||||
'<ul><li class="item-content">' +
|
||||
'<div class="item-inner"><div class="item-title-row"><div class="item-title">' +
|
||||
dataObj[i].title + '</div></div>' +
|
||||
'<div class="item-subtitle"><font>' + dataObj[i].introduction + '</font></div>' +
|
||||
'<div class="item-subtitle"><span><i class="icon icon-eye-orange"></i><label id="visitCount_' + dataObj[i].id + '">' + dataObj[i].visitCount + '人</label>' +
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_' + dataObj[i].id + '">' + dataObj[i].recommendCommentCount + '条</label></span></div></div>' +
|
||||
'<div class="item-media"><img src=' + dataObj[i].coverImg + '></div>' +
|
||||
'</li></ul></div></div></div>';
|
||||
}
|
||||
if(dataObj[i].type == "投票") {
|
||||
var voteFavorCount = dataObj[i].voteFavorCount;
|
||||
var voteNoFavorCount = dataObj[i].voteNoFavorCount;
|
||||
var voteFavorCountRate = 50
|
||||
var voteNoFavorCountRate = 50
|
||||
if(voteFavorCount == 0 && voteNoFavorCount == 0) {
|
||||
|
||||
} else {
|
||||
voteFavorCountRate = Math.round((voteFavorCount * 100) / (voteFavorCount + voteNoFavorCount));
|
||||
voteNoFavorCountRate = 100 - voteFavorCountRate;
|
||||
}
|
||||
|
||||
html += '<div class="card cardInfo cardInfo03"><div class="card-header">' + dataObj[i].title +
|
||||
'</div><div class="card-content"><div class="card-content-inner row"><div class="vote01 col-50">' +
|
||||
'<i class="icon icon-light-red" data-val="' + dataObj[i].id + '"></i><span>' + dataObj[i].voteFavorText + '</span>' +
|
||||
'<font style="width:' + voteFavorCountRate + '%;" id="voteFavorCountRate_' + dataObj[i].id + '"></font><label id="voteFavorCount_' + dataObj[i].id + '">' + voteFavorCount + '票 ' + voteFavorCountRate + '%</label></div>' +
|
||||
'<div class="vote02 col-50"><i class="icon icon-light-grey" data-val="' + dataObj[i].id + '"></i><span>' + dataObj[i].voteNoFavorText + '</span>' +
|
||||
'<font style="width:' + voteNoFavorCountRate + '%;" id="voteNoFavorCountRate' + dataObj[i].id + '"></font><label id="voteNoFavorCount_' + dataObj[i].id + '">' + voteNoFavorCount + '票 ' + voteNoFavorCountRate + '%</label></div><em>V.S</em></div></div></div>';
|
||||
}
|
||||
}
|
||||
$('.infinite-scroll-bottom .list-container').append(html);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -71,9 +71,9 @@
|
||||
<span>第三方登录</span>
|
||||
</p>
|
||||
<p>
|
||||
<a class="icon icon-loginMode01" id="wxLogin" onclick="webChatLogin()"></a>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode02"></a>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode03" id="qqLogin"></a>
|
||||
<a class="icon icon-loginMode01" id="wxLogin" onclick="loginInfo('weixin')"></a>
|
||||
<a class="icon icon-loginMode02" id="qqLogin" onclick="loginInfo('sinaweibo')"></a>
|
||||
<a class="icon icon-loginMode03" id="qqLogin" onclick="loginInfo('qq')"></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -97,7 +97,7 @@ $.config = {router: false}
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<script type="text/javascript" src="../../js/login/codeSms.js" ></script>
|
||||
<script type="text/javascript" src="../../js/login/wxLogin.js" ></script>
|
||||
<script type="text/javascript" src="../../js/login/thirdLogin.js" ></script>
|
||||
<script type="text/javascript" src="../../js/common.js" ></script>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user