Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/**服务端地址**/
|
||||
//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:8086";
|
||||
var BASE_PATH = "http://192.168.10.161:8084";
|
||||
//var BASE_PATH = "http://192.168.10.53:8084";
|
||||
var BASE_PATH = "http://192.168.10.171:8084";
|
||||
//var BASE_PATH = "http://192.168.10.170:8084";
|
||||
/**是否显示过启动页面**/
|
||||
var lauchFlag = false;
|
||||
@@ -298,8 +298,9 @@ em.down{color:#88D053;}
|
||||
.popup-about02 .list-block.historyList{margin-top:-1px;}
|
||||
.popup-about02 .list-block.historyList .searchHistory{padding-top:0;}
|
||||
.newCss ul{padding:0.75rem;padding-top:0;padding-left:0.25rem;overflow:hidden;}
|
||||
.newCss ul li{background:#F4F4F4;border-radius:0.16rem;display:inline-block;margin-left:0.5rem;margin-bottom:0.5rem;padding:0 0.5rem;line-height:1.5rem;}
|
||||
.newCss ul li{background:#F4F4F4;border-radius:0.16rem;display:inline-block;margin-left:0.5rem;margin-bottom:0.5rem;padding:0 0.5rem;line-height:1.5rem;font-size:0.65rem;color:#333;}
|
||||
.newCss ul li span{font-size:0.65rem;color:#333;}
|
||||
.newCss ul li a{font-size:0.65rem;color:#333;}
|
||||
.newCss ul:before,.popup-about02 .list-block.newCss ul:after{height:0;}
|
||||
.content-padded + .newCss ul{padding-bottom:0;}
|
||||
|
||||
@@ -479,7 +480,7 @@ input::-webkit-input-placeholder{
|
||||
.tag small:nth-child(5){background:#F5EFFF;color:#A585D6;}
|
||||
*/
|
||||
|
||||
.cardInfo01b .card-footer span{font-size:0.7rem;color:#999;}
|
||||
.cardInfo01b .card-footer span{font-size:0.7rem;color:#999;display:inline-block;width:100%;word-wrap:break-word;white-space:normal;}
|
||||
|
||||
.cardInfo02{padding:0.25rem 0;}
|
||||
.cardInfo02 img{width:6.5rem;height:5.2rem;}
|
||||
@@ -538,13 +539,13 @@ 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;}
|
||||
.commentBox .searchbar span{text-align:center;}
|
||||
.commentBox .searchbar span a font{font-size:0.65rem;color:#666;line-height:36px;}
|
||||
.commentBox .searchbar span .collection{margin-left:0.75rem;position:static;}
|
||||
.commentBox .searchbar span{text-align:center;line-height:36px;}
|
||||
.commentBox .searchbar span font{font-size:0.65rem;color:#666;}
|
||||
.commentBox .searchbar span.collection{margin-left:0.75rem;position:static;}
|
||||
.commentBox .searchbar > a{line-height:36px;}
|
||||
.icon-comments{width:17px;height:16px;background:url(../images/icon-comments.png) no-repeat center center;background-size:100%;margin-left:0.3rem;vertical-align:baseline;}
|
||||
|
||||
@@ -1211,6 +1212,8 @@ input[type=range]::-webkit-slider-thumb {
|
||||
|
||||
.icon-around03:before { content: "\e610"; }
|
||||
|
||||
.icon-star:before { content: ""; }
|
||||
|
||||
/* 自适应 */
|
||||
@media(max-width:414px){
|
||||
.list-block .item-title span.c3a{max-width:220px;}
|
||||
|
||||
@@ -7,22 +7,40 @@ document.addEventListener('touchstart',shield,false);//取消浏览器的所有
|
||||
document.oncontextmenu=shield;//屏蔽选择函数
|
||||
// H5 plus事件处理
|
||||
var ws=null,as='pop-in';
|
||||
(function() {
|
||||
var first = null;
|
||||
mui.back = function() { //首次按键,提示‘再按一次退出应用’
|
||||
if (!first) {
|
||||
first = new Date().getTime();
|
||||
mui.toast('再按一次退出应用');
|
||||
setTimeout(function() {
|
||||
first = null;
|
||||
}, 1000);
|
||||
} else {
|
||||
if (new Date().getTime() - first > 1000) {
|
||||
plus.runtime.quit();
|
||||
}
|
||||
}
|
||||
};
|
||||
})
|
||||
function plusReady(){
|
||||
ws=plus.webview.currentWebview();
|
||||
/*ws=plus.webview.currentWebview();
|
||||
// Android处理返回键
|
||||
plus.key.addEventListener('backbutton',function(){
|
||||
/*if (ws.id == 'yfindex.html') {
|
||||
if (ws.id == 'yfindex.html') {
|
||||
alert("aa")
|
||||
plus.nativeUI.confirm("确认退出",function(e) {
|
||||
alert(e.index);
|
||||
if(e.index == 0) {
|
||||
plus.runtime.quit();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
back();
|
||||
}*/
|
||||
}
|
||||
back();
|
||||
},false);
|
||||
compatibleAdjust();
|
||||
compatibleAdjust();*/
|
||||
}
|
||||
if(w.plus){
|
||||
plusReady();
|
||||
|
||||
@@ -78,6 +78,7 @@ $("#login_btn").on("click", function () {
|
||||
var token = resData.data;
|
||||
localStorage.setItem("user_token", token);
|
||||
$.toast(resData.message);
|
||||
back();
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
}
|
||||
|
||||
@@ -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>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<label>近30天涨跌幅</label>
|
||||
</span>
|
||||
<span>
|
||||
<em>{{compare_word}} <strong>{{compare_money}}</strong> 元</em>
|
||||
<em>{{compare_word}} <strong>{{compare_money}}</strong> {{words}}</em>
|
||||
<label>相比{{city}}均价</label>
|
||||
</span>
|
||||
</div>
|
||||
@@ -77,7 +77,7 @@
|
||||
<label>{{evaluate_words}}</label>
|
||||
</span>
|
||||
<span>
|
||||
<label style="color:#666;">{{evaluate_msg}}</label>
|
||||
<label style="color:#666;">{{msg}}</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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>
|
||||
@@ -144,33 +144,35 @@ $.config = {router: false}
|
||||
var house_info = new Vue({
|
||||
el:'#house_info',
|
||||
data:{
|
||||
name:"龙盛佳苑",
|
||||
city_region:"上海-静安",
|
||||
house_type:"2室1厅 60m 1/6层"
|
||||
name:"",
|
||||
city_region:"",
|
||||
house_type:""
|
||||
}
|
||||
})
|
||||
var house_price = new Vue({
|
||||
el:"#house_price",
|
||||
data:{
|
||||
total_price:"391",
|
||||
avg_price:"65241",
|
||||
percentage_30:3.37,
|
||||
arrow:"icon icon-arrow-green",
|
||||
city:"上海",
|
||||
compare_word:"低",
|
||||
compare_money:"2888"
|
||||
total_price:"",
|
||||
avg_price:"",
|
||||
percentage_30:"",
|
||||
arrow:"",
|
||||
city:"",
|
||||
compare_word:"",
|
||||
compare_money:"",
|
||||
words:""
|
||||
}
|
||||
})
|
||||
var evaluate_msg = new Vue({
|
||||
el:"#evaluate_msg",
|
||||
data:{
|
||||
evaluate_percent:12,
|
||||
evaluate_words:"下跌概率",
|
||||
arrow:"icon icon-arrow-green",
|
||||
evaluate_msg:"本小区2月活跃度为20;价格近3个月处于下跌趋势,小区物业一般,交通不便利,所属板块为不活跃。"
|
||||
evaluate_percent:"",
|
||||
evaluate_words:"",
|
||||
arrow:"",
|
||||
msg:""
|
||||
}
|
||||
})
|
||||
var hid = 1111111111111;
|
||||
var hid = '104631167348637696';
|
||||
|
||||
var price_feedback = new Vue({
|
||||
el:"#price_feedback",
|
||||
data:{
|
||||
@@ -191,6 +193,64 @@ $.config = {router: false}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
axios.get("/rest/evaluate/queryHouseInfo",{
|
||||
params:{id : hid}
|
||||
}).then(function(response){
|
||||
if(response.data.status){
|
||||
h = response.data.data
|
||||
house_info.name = h.name
|
||||
house_info.city_region = h.city+"-"+h.region
|
||||
house_info.house_type = (h.roomCount==0?"":h.roomCount+"室")+(h.hallCount==0?"":h.hallCount+"厅 ")+(h.area==0?"":h.area+"m ")+((h.floor==0||h.height==0)?"":h.floor+"/"+h.height+"层")
|
||||
house_price.total_price = h.totalPrice==0?"暂无":(h.totalPrice/10000).toFixed(0)
|
||||
house_price.avg_price = h.avgPrice==0?"暂无":h.avgPrice
|
||||
house_price.percentage_30=h.oneMonthUpDownRange==0?"暂无":h.oneMonthUpDownRange
|
||||
if(h.oneMonthUpDownRange<0){
|
||||
house_price.arrow="icon icon-arrow-green"
|
||||
house_price.percentage_30=-h.oneMonthUpDownRange
|
||||
}else if(h.oneMonthUpDownRange>0){
|
||||
house_price.arrow="icon icon-arrow-red"
|
||||
house_price.percentage_30=h.oneMonthUpDownRange
|
||||
}else{
|
||||
house_price.percentage_30="暂无"
|
||||
}
|
||||
house_price.city=h.city
|
||||
if(h.compareMoney<0){
|
||||
house_price.compare_word="低"
|
||||
house_price.words="元"
|
||||
house_price.compare_money=-h.compareMoney
|
||||
}else if(h.compareMoney>0){
|
||||
house_price.compare_word="高"
|
||||
house_price.words="元"
|
||||
house_price.compare_money=h.compareMoney
|
||||
}else{
|
||||
house_price.compare_money="相等"
|
||||
}
|
||||
if(h.evaluatePercent<0){
|
||||
evaluate_msg.evaluate_words="下跌概率"
|
||||
evaluate_msg.arrow="icon icon-arrow-green"
|
||||
evaluate_msg.evaluate_percent=-h.evaluatePercent
|
||||
}else if(h.evaluatePercent>0){
|
||||
evaluate_msg.evaluate_words="上涨概率"
|
||||
evaluate_msg.arrow="icon icon-arrow-red"
|
||||
evaluate_msg.evaluate_percent=h.evaluatePercent
|
||||
}else{
|
||||
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)
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
@@ -244,96 +304,99 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* 均价走势 */
|
||||
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 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'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -345,43 +408,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>
|
||||
|
||||
@@ -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>
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
<style>
|
||||
.list-block .item-text{-webkit-line-clamp:unset;}
|
||||
.content-padded img {width: auto;}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -41,7 +42,7 @@
|
||||
<div id="content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="newCss">
|
||||
<ul>
|
||||
<li><span>房贷</span></li>
|
||||
@@ -49,6 +50,7 @@
|
||||
<li><span>首套房</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
<div class="adBoxApp">
|
||||
<img src="../../images/wx_app.png">
|
||||
<p><label>有房 有家 有爱</label><br><small>更多房产资讯上有房APP</small></p>
|
||||
@@ -69,19 +71,26 @@
|
||||
|
||||
<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>
|
||||
<span class="col-33">
|
||||
<!--<span class="col-33">
|
||||
<a class="praise"><i class="icon icon-praise-grey02"></i><font id="newsPraise">{{ newsDzCount }}</font></a>
|
||||
<a class="collection collection01"><i class="icon icon-collection01"></i></a>
|
||||
</span>
|
||||
</span>-->
|
||||
|
||||
<span class="praise col-20">
|
||||
<i class="icon icon-praise-grey02"></i><font id="newsPraise">{{ newsDzCount }}</font>
|
||||
</span>
|
||||
<span class="collection collection01 col-15">
|
||||
<i class="icon icon-collection01"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="searchbar row commentReleaseBox dn">
|
||||
<div class="search-input col-85">
|
||||
<input type="text" maxlength="250">
|
||||
<input type="text" maxlength="250" id="commentInput">
|
||||
</div>
|
||||
<a class="col-15" id="publishBtn">发布</a>
|
||||
</div>
|
||||
@@ -116,7 +125,7 @@ $.config = {router: false}
|
||||
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
||||
<script>
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
var id//= "183627425584775168";
|
||||
var id; //= "186182250936643584";
|
||||
var shareUrl = BASE_PATH+"/news/newDetail?newsId=";
|
||||
var sharehrefTitle = "停车坐爱枫林晚,霜叶红于二月花";
|
||||
var sharehrefDes = "客观里面请!";
|
||||
@@ -178,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
|
||||
@@ -199,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(){
|
||||
@@ -288,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 = "";
|
||||
@@ -412,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();
|
||||
@@ -472,10 +491,21 @@ $(".praise").on("click", function () {
|
||||
|
||||
//收藏
|
||||
$(".collection").on("click", function () {
|
||||
//doCollect();
|
||||
collect();
|
||||
});
|
||||
|
||||
function doCollect() {
|
||||
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
|
||||
clicked('../user/codeSms.html',true,false,{},{},function(){
|
||||
doCollect();
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
collect();
|
||||
}
|
||||
}
|
||||
function collect(){
|
||||
|
||||
axios.post("/rest/news/collect",{newsId : id}).then(function (response) {
|
||||
|
||||
var msg = response.data.message
|
||||
@@ -525,6 +555,7 @@ $(".commentReleaseBox a").on("click", function () {
|
||||
|
||||
function addComment(){
|
||||
var content = $(".commentReleaseBox input").val();
|
||||
content = utf16toEntities(content);
|
||||
axios.post("/rest/comment/add",{commentObjId : id, content:content, commentUserProvince:province, commentUserCity:city}).then(function (response) {
|
||||
var msg = response.data.message
|
||||
if(msg){
|
||||
@@ -538,17 +569,47 @@ function addComment(){
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
mui.init({
|
||||
beforeback: function() {
|
||||
//获得父页面的webview
|
||||
var list = plus.webview.getWebviewById('yfindex.html');
|
||||
//触发父页面的自定义事件(refresh),从而进行刷新
|
||||
mui.fire(list, 'refresh');
|
||||
//返回true,继续页面关闭逻辑
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
function utf16toEntities(str) {
|
||||
var patt = /[\ud800-\udbff][\udc00-\udfff]/g; // 检测utf16字符正则
|
||||
str = str.replace(patt, function(char) {
|
||||
var H, L, code;
|
||||
if (char.length === 2) {
|
||||
H = char.charCodeAt(0);
|
||||
// 取出高位
|
||||
L = char.charCodeAt(1);
|
||||
// 取出低位
|
||||
code = (H - 0xD800) * 0x400 + 0x10000 + L - 0xDC00;
|
||||
//转换算法
|
||||
return "&#" + code + ";";
|
||||
} else {
|
||||
return char;
|
||||
}
|
||||
});
|
||||
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(){
|
||||
document.body.scrollTop = document.body.scrollHeight;
|
||||
target.scrollIntoView(true);
|
||||
},100);
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -64,7 +64,7 @@
|
||||
</p>
|
||||
<div class="content-block loginBox">
|
||||
<p><a class="button button-big button-fill theme" id="login_btn">登录</a></p>
|
||||
<p><a onclick="clicked('passLogin.html', true)">账号密码登录</a></p>
|
||||
<p><a href="passLogin.html">账号密码登录</a></p>
|
||||
</div>
|
||||
<div class="content-block loginMode">
|
||||
<p class="line">
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
<div class="content-block loginBox">
|
||||
<p><a class="button button-big button-fill theme" id="login_btn" @click="passLogin">登录</a></p>
|
||||
<p><a @click="openSmsLoginPage">快捷登录</a></p>
|
||||
<p><a href="codeSms.html">快捷登录</a></p>
|
||||
</div>
|
||||
<div class="content-block loginMode">
|
||||
<p class="line">
|
||||
@@ -151,10 +151,6 @@ new Vue({
|
||||
$(".list-block .item-after .icon-eye-orange").hide();
|
||||
$(".list-block .item-after .icon-eye-grey").show();
|
||||
$("#input_password").attr("type","password");
|
||||
},
|
||||
// 打开验证码登录页面
|
||||
openSmsLoginPage: function() {
|
||||
back(),plus.nativeUI.closeWaiting();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+96
-33
@@ -60,7 +60,7 @@
|
||||
<i class="icon icon-address04"></i>
|
||||
<input type="hidden" id="region_copy" v-model="region" readonly="readonly">
|
||||
<a id="region">{{region}}</a>
|
||||
<i class="icon icon-down"></i>
|
||||
<i class="icon icon-down" id="regionIcon"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
@@ -1197,7 +1197,6 @@ String.prototype.endWith = function(str) {
|
||||
var reg = new RegExp(str + "$");
|
||||
return reg.test(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取手机上的信息,比如位置,手机ID
|
||||
* @author yinjihuan
|
||||
@@ -1247,13 +1246,12 @@ function getPosition(){
|
||||
}
|
||||
localStorage.setItem("init_city", city);
|
||||
addLocation(lat,lng);
|
||||
|
||||
$(".nowCity").text(city);
|
||||
/*city="北京";
|
||||
region="";
|
||||
$("#input_city").text("北京");
|
||||
getDistrictList($("#input_city").text(),0,0,"",6,0,0,"");*/
|
||||
|
||||
|
||||
initBaseInfo(city,region,address,lat,lng);
|
||||
if(city!="上海"){
|
||||
initRegionSelect(city);
|
||||
@@ -1269,7 +1267,9 @@ function getPosition(){
|
||||
initRegionSelect(city);
|
||||
localStorage.setItem("init_city", city);
|
||||
addLocation(lat,lng);
|
||||
initBaseInfo(city,"","",0,0);
|
||||
initBaseInfo(city,"","",0,0);
|
||||
$("#ShangHaiDiv").show();
|
||||
$("#otherCityDiv").hide();
|
||||
},
|
||||
{
|
||||
provider:'baidu',
|
||||
@@ -1436,6 +1436,27 @@ function loadRegion(){
|
||||
regionChangeCount = 0;
|
||||
}
|
||||
});
|
||||
$("#regionIcon").picker({
|
||||
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01c">\
|
||||
<button class="button button-link pull-right close-picker" id="regionStatusButton">确定</button>\
|
||||
<h1 class="title">选择区域</h1>\
|
||||
</header>',
|
||||
cols: [
|
||||
{
|
||||
textAlign: "center",
|
||||
values: regionList
|
||||
}
|
||||
],onOpen:function(p){
|
||||
p.cols[0].replaceValues(regionList);
|
||||
},onClose:function(p){
|
||||
regionPicker = p.value[0];
|
||||
if(!regionChangeRegion && regionChangeCount==1){
|
||||
document.getElementById("regionStatusButton").click();
|
||||
}
|
||||
regionChangeRegion = true;
|
||||
regionChangeCount = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
$("body").delegate("#regionStatusButton", "click", function (){
|
||||
regionChangeRegion = false;
|
||||
@@ -1527,7 +1548,6 @@ function initNews(page){
|
||||
}else{
|
||||
$(".infinite-scroll-preloader").hide();
|
||||
}*/
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
@@ -1702,8 +1722,8 @@ function addItems(number, lastIndex) {
|
||||
'<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+'条'+
|
||||
'<i class="icon icon-eye-orange"></i><label id="visitCount_'+dataObj[i].id+'">'+numberConver(dataObj[i].visitCount)+'人</label>'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+numberConver(dataObj[i].recommendCommentCount)+'条</label>'+
|
||||
'</span>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
@@ -1732,10 +1752,14 @@ function addItems(number, lastIndex) {
|
||||
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].adUrl!=null && dataObj[i].adUrl!=""){
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01b" onclick="openUrl(\''+dataObj[i].adUrl+'\')">';
|
||||
}else{
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01b">';
|
||||
}
|
||||
html += '<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+'\')">'+
|
||||
@@ -1802,8 +1826,8 @@ function addItems(number, lastIndex) {
|
||||
'<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+'条</span></div></div>'+
|
||||
'<div class="item-subtitle"><span><i class="icon icon-eye-orange"></i><label id="visitCount_'+dataObj[i].id+'">'+numberConver(dataObj[i].visitCount)+'人</label>'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+numberConver(dataObj[i].recommendCommentCount)+'条</label></span></div></div>'+
|
||||
'<div class="item-media"><img src='+dataObj[i].coverImg+'></div>'+
|
||||
'</li></ul></div></div></div>';
|
||||
}
|
||||
@@ -1853,9 +1877,9 @@ function addItems(number, lastIndex) {
|
||||
if(i>=lastIndex2){
|
||||
if((dataObj2.length<lastIndex2 + number) || (i < lastIndex2 + number)){
|
||||
var tags = dataObj2[i].poiTags;
|
||||
|
||||
var tagStr = '';
|
||||
if(tags){
|
||||
var tagStr = '<div class="item-subtitle"><span class="tag">';
|
||||
tagStr = '<div class="item-subtitle"><span class="tag">';
|
||||
for(var j=0;j<tags.length;j++){
|
||||
if(j<3){
|
||||
var tag = tags[j];
|
||||
@@ -1874,11 +1898,34 @@ function addItems(number, lastIndex) {
|
||||
html += '<div class="item-after"><span>距您'+dataObj2[i].distance+'m</span></div>';
|
||||
}
|
||||
html += '</div><div class="item-subtitle">';
|
||||
if(dataObj2[i].index == 0){
|
||||
html += '<div>潜力指数: <em class="em01">暂无</em></div>';
|
||||
}else{
|
||||
html += '<div>潜力指数: <em class="em01">'+dataObj2[i].index+'</em></div>';
|
||||
}
|
||||
|
||||
html += '<div>潜力指数: <span class="star">';
|
||||
|
||||
if(dataObj2[i].index<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(dataObj2[i].index>=5 && dataObj2[i].index<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(dataObj2[i].index>=15 && dataObj2[i].index<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(dataObj2[i].index>=25 && dataObj2[i].index<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(dataObj2[i].index>=35 && dataObj2[i].index<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(dataObj2[i].index>=45 && dataObj2[i].index<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(dataObj2[i].index>=55 && dataObj2[i].index<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(dataObj2[i].index>=65 && dataObj2[i].index<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(dataObj2[i].index>=75 && dataObj2[i].index<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(dataObj2[i].index>=85 && dataObj2[i].index<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>";
|
||||
|
||||
if(dataObj2[i].weekendMarkup){
|
||||
if(dataObj2[i].weekendMarkup>=0){
|
||||
html += '<div>近30天涨跌幅: <em class="up">'+(dataObj2[i].weekendMarkup/100).toFixed(2)+'%<i class="icon icon-arrow-red"></i></em></div>';
|
||||
@@ -1907,6 +1954,17 @@ function addItems(number, lastIndex) {
|
||||
|
||||
}
|
||||
|
||||
//数量进行转换
|
||||
function numberConver(thumbsUpCount){
|
||||
var thumbsUpCountStr = ""
|
||||
if(thumbsUpCount>=10000){
|
||||
thumbsUpCountStr = (thumbsUpCount/10000).toFixed(1)+"万"
|
||||
}else{
|
||||
thumbsUpCountStr = thumbsUpCount
|
||||
}
|
||||
return thumbsUpCountStr;
|
||||
}
|
||||
|
||||
// 上次加载的序号
|
||||
var lastIndex = 5;
|
||||
var lastIndex2 = 5;
|
||||
@@ -2250,7 +2308,7 @@ $("body").delegate("#select_region .button", "click", function () {
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2325,7 +2383,7 @@ $(".confirm_btn").on("click", function () {
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2378,7 +2436,7 @@ $("#select_order li").on("click", function () {
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2448,7 +2506,7 @@ function getCityPriceLevel(cityParam){
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2520,7 +2578,6 @@ function getDistrictList(cityParam,latParam,lngParam,regionParam,order,minPrice,
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
mui.init();
|
||||
function openNewsView(newId) {
|
||||
//mui.openWindow({
|
||||
@@ -2531,16 +2588,22 @@ function openNewsView(newId) {
|
||||
// }
|
||||
// });
|
||||
clicked('views/news/newsDetail.html',true,false,{},{newsId:newId},function(newId){
|
||||
alert(newId);
|
||||
axios.post("/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+'人');
|
||||
if($("#visitCount_"+newId).text().indexOf("万")<0){
|
||||
var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1;
|
||||
$("#visitCount_"+newId).text(count+'人');
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('refresh', function(e){//执行刷新
|
||||
alert("aa");
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
/* 获取附近小区名称字数,截取附近小区名称前5字,并添加... */
|
||||
|
||||
Reference in New Issue
Block a user