Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
Conflicts: fangija-zsyf/views/house/houseDetail.html
This commit is contained in:
@@ -33,7 +33,8 @@ function addCollect(){
|
||||
$(".collection02").show();
|
||||
$.toast("随时掌握小区动态");
|
||||
}
|
||||
plus.webview.getWebviewById('/views/user/userInfo.html').reload();
|
||||
alert(12)
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
@@ -65,7 +66,7 @@ function removeCollect(){
|
||||
$(".collection01").show();
|
||||
$.toast("取消关注");
|
||||
}
|
||||
plus.webview.getWebviewById('/views/user/userInfo.html').reload();
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
|
||||
@@ -27,8 +27,8 @@ Vue.component('city_increase_ranking',{
|
||||
'<em class="up">{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(100*ci.oneMonthUpDownRange).toFixed(2)+"%"}}<i class="icon" v-bind:class="[ci.oneMonthUpDownRange>0?"icon-arrow-red":"",ci.oneMonthUpDownRange<0?"icon-arrow-green":""]"></i></em>'+
|
||||
'</div>'+
|
||||
'<div class="col-20">'+
|
||||
'<i class="button theme collection collection01" v-on:click="follow(ci.city,$event)">关注</i>'+
|
||||
'<i class="button collection collection02 dn" v-on:click="abolish(ci.city,$event)">取消</i>'+
|
||||
'<i class="button theme collection collection01" v-bind:class="{dn:ci.follow}" v-on:click="follow(ci.city,$event)">关注</i>'+
|
||||
'<i class="button collection collection02" v-bind:class="{dn:!ci.follow}" v-on:click="abolish(ci.city,$event)">取消</i>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
|
||||
@@ -33,8 +33,8 @@ Vue.component('city_potential_ranking',{
|
||||
'</span>'+
|
||||
'</div>'+
|
||||
'<div class="col-20">'+
|
||||
'<i class="button theme collection collection01" v-on:click="follow(cp.city,$event)">关注</i>'+
|
||||
'<i class="button collection collection02 dn" v-on:click="abolish(cp.city,$event)">取消</i>'+
|
||||
'<i class="button theme collection collection01" v-bind:class="{dn:cp.follow}" v-on:click="follow(cp.city,$event)">关注</i>'+
|
||||
'<i class="button collection collection02" v-bind:class="{dn:!cp.follow}" v-on:click="abolish(cp.city,$event)">取消</i>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
|
||||
@@ -8,7 +8,6 @@ Vue.component('map-component', {
|
||||
},
|
||||
methods: {
|
||||
loadMap:function(){
|
||||
alert("map:"+lat+"address:"+address);
|
||||
baseInfo.address = address;
|
||||
if(lat && lng && address){
|
||||
|
||||
@@ -37,7 +36,6 @@ Vue.component('map-component', {
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
alert("map start.....")
|
||||
this.loadMap();
|
||||
}
|
||||
})
|
||||
@@ -40,6 +40,13 @@ Vue.component('near-dist-component', {
|
||||
if(o.city == city && o.district == region && o.name == name){
|
||||
continue;
|
||||
}else{
|
||||
var textName = o.name;
|
||||
var length = textName.length;
|
||||
var textStr = textName;
|
||||
if(length > 5){
|
||||
textStr = textName.substr(0,5)+ "...";
|
||||
}
|
||||
o.name=textStr;
|
||||
if(ret.length <= 5){
|
||||
ret.push(o);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
.tabChart2{z-index:-1;}
|
||||
.mark-icon-box .mark-icon {width: 20px;height: 30px;display: block;cursor: pointer;font-size: 14px; color: #fff;font-weight: bold;text-align: center;line-height: 24px;background: url(../../images/dw.png) no-repeat;}
|
||||
.mark-icon-box {width:24px;height:30px;position:absolute;z-index:98;}
|
||||
.loadingBg{width:100%;height:100%;background:#fff;overflow:hidden;position:absolute;top:11px;left:0;z-index:100;}
|
||||
.loadingBg .infinite-scroll-preloader{margin-top:30%;}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -41,6 +43,11 @@
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current" id="baseInfo">
|
||||
<div class="loadingBg">
|
||||
<div class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
</div>
|
||||
</div>
|
||||
<header class="bar bar-nav barBorder">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left"></span>
|
||||
@@ -95,7 +102,7 @@
|
||||
<i class="icon icon-evaluation03"></i>
|
||||
<span>我要置换</span>
|
||||
</div>-->
|
||||
<div onclick="openNewView('/views/loan/loanInfo.html')">
|
||||
<div onclick="gotoLoanApply()">
|
||||
<i class="icon icon-personal03"></i>
|
||||
<span>我要贷款</span>
|
||||
</div>
|
||||
@@ -344,6 +351,7 @@ function init(){
|
||||
})
|
||||
.then(function (response) {
|
||||
if(response.data.data){
|
||||
$(".loadingBg").hide();
|
||||
var houseInfo = response.data.data.houseInfo;
|
||||
lat = houseInfo.lat;
|
||||
lng = houseInfo.lng;
|
||||
@@ -388,9 +396,7 @@ function init(){
|
||||
baseInfo.minSellPrice=houseInfo.minSellPrice;
|
||||
baseInfo.maxSellPrice=houseInfo.maxSellPrice;
|
||||
baseInfo.rentRooms=response.data.data.rentRooms;
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
@@ -498,9 +504,11 @@ $("#tabRentDiv").on("click", function () {
|
||||
$("#tabChart1").css("z-index","-1");
|
||||
});
|
||||
function openNewView(viewHtml) {
|
||||
alert(viewHtml)
|
||||
clicked(viewHtml,true,false,{},{city:oriCity,region:oriRegion,name:oriName})
|
||||
}
|
||||
function gotoLoanApply(){
|
||||
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: houseId, city: oriCity, mobile: ""},function(){})
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</button>
|
||||
<h1 class="title">我的房产</h1>
|
||||
</header>
|
||||
<div class="content infinite-scroll infinite-scroll-bottom">
|
||||
<div class="content infinite-scroll infinite-scroll-bottom" data-distance="50">
|
||||
<div class="card cardPrice cardPrice01" id="houseInfo">
|
||||
<div class="card-header">
|
||||
<span>房产总值</span>
|
||||
@@ -93,29 +93,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-group" style="display: none;" id="page-group-login-temp">
|
||||
<div class="page page-current">
|
||||
<!-- 加载loading页 -->
|
||||
<div class="loadingBg">
|
||||
<div class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="list-block media-list">
|
||||
<!-- 动态封装部分 begin -->
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
<!-- 动态封装部分 end -->
|
||||
</div>
|
||||
<div class="content-block" style="display: none;">
|
||||
<p><a onclick="openaddWindow()" class="button button-big button-fill theme">立即评估</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-group" style="display: none;" id="page-group-login-temp"></div>
|
||||
|
||||
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
|
||||
<script>
|
||||
@@ -149,7 +127,6 @@ var baseInfo = new Vue({
|
||||
oneYearUpDownPrice: ""
|
||||
}
|
||||
})
|
||||
|
||||
// 加载flag
|
||||
var loading = false;
|
||||
|
||||
@@ -181,7 +158,7 @@ $(document).on('infinite', '.infinite-scroll-bottom', function() {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
$('.infinite-scroll-preloader').hide();
|
||||
return;
|
||||
}
|
||||
//控制查询下一页的数据
|
||||
@@ -218,19 +195,20 @@ function selectHouseInfoList(){
|
||||
$('#page-group-nologin').hide();
|
||||
$('#page-group-login').show();
|
||||
}
|
||||
$('#page-group-login-temp').hide();
|
||||
if(resultList != null && resultList.length == 0){
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').hide();
|
||||
return;
|
||||
}
|
||||
if(resultsMap.houseInfoPageList.currentPage == resultsMap.houseInfoPageList.totalPages){
|
||||
//如果此次查询刚好是page = totalPages
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').hide();
|
||||
}
|
||||
//封装list数据
|
||||
var dataObj = [];
|
||||
@@ -253,14 +231,39 @@ function selectHouseInfoList(){
|
||||
//判断是否登录
|
||||
function checkIsLogin(){
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
$('#page-group-login').hide();
|
||||
$('#page-group-nologin').show();
|
||||
$('#page-group-login').hide();
|
||||
$('#page-group-login-temp').hide();
|
||||
}else{
|
||||
//控制显示
|
||||
$('#page-group-login-temp').html('<div class="page page-current"><div class="loadingBg"><div class="infinite-scroll-preloader"><div class="preloader"></div></div></div></div>');
|
||||
$('#page-group-login-temp').show();
|
||||
$('#page-group-nologin').hide();
|
||||
$('#page-group-login').hide();
|
||||
//初始化分页参数, 防止回调时候重新请求出错
|
||||
initParams();
|
||||
selectHouseInfoList();
|
||||
}
|
||||
}
|
||||
|
||||
//初始化分页参数, 防止回调时候重新请求出错
|
||||
function initParams(){
|
||||
loading = false;
|
||||
page = undefined;
|
||||
pageSize = undefined;
|
||||
totalPages = undefined;
|
||||
totalRecords = undefined;
|
||||
lastIndex = undefined;
|
||||
itemsPerLoad = undefined;
|
||||
maxItems = 100;
|
||||
//清空构造的container
|
||||
$('.infinite-scroll-bottom .list-container').html('');
|
||||
//不用考虑下拉刷新的还在不在,先移除在添加
|
||||
$('.infinite-scroll-preloader').show();
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
$.attachInfiniteScroll('.infinite-scroll');
|
||||
}
|
||||
|
||||
//跳转添加房产
|
||||
function gotoAddHouse(){
|
||||
clicked('/views/house/add.html',true,false,{},{type:0},function(){
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="../../js/zepto.js" charset="utf-8"></script>
|
||||
|
||||
<script>
|
||||
|
||||
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||
|
||||
@@ -502,8 +502,8 @@ function addItems(number, lastIndex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
html += '<li>'+
|
||||
"<a onclick=clicked('${basePath}/district/details?city="+dataObj[i].city+"®ion="+dataObj[i].district+"&name="+dataObj[i].name+"',true) class='external item-content'>"+
|
||||
html += '<li onclick="openDistWindow(\''+dataObj[i].city+'\',\''+dataObj[i].district+'\',\''+dataObj[i].name+'\')">'+
|
||||
'<a class=external item-content>'+
|
||||
'<div class="item-inner">'+
|
||||
'<div class="item-title-row"><div class="item-title">'+dataObj[i].name+'</div><div class="item-after"><em>¥'+dataObj[i].avgPrice+'元/㎡</em></div></div>'+
|
||||
'<div class="item-title-row"><div class="item-title"><i class="icon icon-address03"></i><small>'+dataObj[i].city+dataObj[i].district+dataObj[i].address+'</small></div>'+
|
||||
@@ -524,8 +524,8 @@ function addItems(number, lastIndex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
html += '<li>'+
|
||||
"<a onclick=clicked('${basePath}/district/details?city="+dataObj[i].city+"®ion="+dataObj[i].district+"&name="+dataObj[i].name+"',true) class='external item-content'>"+
|
||||
html += '<li onclick="openDistWindow(\''+dataObj[i].city+'\',\''+dataObj[i].district+'\',\''+dataObj[i].name+'\')">'+
|
||||
"<a class='external item-content'>"+
|
||||
'<div class="item-inner">'+
|
||||
'<div class="item-title-row"><div class="item-title">'+dataObj[i].name+'</div><div class="item-after"><em>¥'+dataObj[i].avgPrice+'元/㎡</em></div></div>'+
|
||||
'<div class="item-title-row"><div class="item-title"><i class="icon icon-address03"></i><small>'+dataObj[i].city+dataObj[i].district+dataObj[i].address+'</small></div>'+
|
||||
@@ -582,6 +582,9 @@ $(document).on('infinite', '.infinite-scroll-bottom',function() {
|
||||
// $.refreshScroller();
|
||||
}, 500);
|
||||
});
|
||||
function openDistWindow(city, region, name){
|
||||
clicked('/views/district/detail.html',true,false,{},{city:city,region:region,name:name});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -525,7 +525,7 @@ function collect(){
|
||||
$(".collection").removeClass("collection02")
|
||||
$(".collection i").removeClass("icon-collection02")
|
||||
}
|
||||
plus.webview.getWebviewById('/views/user/userInfo.html').reload()
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
||||
}
|
||||
$.toast(msg);
|
||||
|
||||
|
||||
@@ -307,9 +307,6 @@ function gotoLoanApply(houseId, city){
|
||||
}
|
||||
//跳转到小区详情
|
||||
function gotoDistrictDetail(city,region,name){
|
||||
alert(city)
|
||||
alert(region)
|
||||
alert(name)
|
||||
clicked('/views/district/detail.html',true,false,{},{city:city,region:region,name:name},function(){})
|
||||
}
|
||||
//跳转房产详情
|
||||
|
||||
Reference in New Issue
Block a user