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

This commit is contained in:
xuhe@fangjia.com
2018-04-12 19:42:44 +08:00
5 changed files with 44 additions and 40 deletions
+3 -2
View File
@@ -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?&quot;icon-arrow-red&quot;:&quot;&quot;,ci.oneMonthUpDownRange<0?&quot;icon-arrow-green&quot;:&quot;&quot;]"></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>'+
+36 -33
View File
@@ -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(){
+1 -1
View File
@@ -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);