From 2eafd0be85298006514e7c7984c703a450b71249 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Mon, 7 May 2018 12:57:03 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E7=9A=84=E5=88=A0=E9=99=A4=E5=90=8E=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=95=88=E6=9E=9C=EF=BC=8C=20=E4=B8=8D=E7=94=A8reload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/user/myHouse.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fangija-zsyf/js/user/myHouse.js b/fangija-zsyf/js/user/myHouse.js index c49a6a5..5c2139b 100644 --- a/fangija-zsyf/js/user/myHouse.js +++ b/fangija-zsyf/js/user/myHouse.js @@ -28,9 +28,14 @@ function selectHouseInfoList(){ var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap; var xqPotentialIndexMap = resultsMap.xqPotentialIndexMap; var houseInfoTotalMap = resultsMap.houseInfoTotalMap; + //调整统计num的顺序 + mh_totalRecords = resultsMap.houseInfoPageList.totalRecords; + tab.mh_num = mh_totalRecords; + if(resultList != null && resultList.length == 0){ // 删除加载提示符 - $('#loadTip1').remove(); + $('#loadTip1').hide(); + //$('#loadTip1').remove(); //$('.infinite-scroll-preloader').remove(); // 加载完毕,则注销无限加载事件,以防不必要的加载 //$.detachInfiniteScroll($('.infinite-scroll')); @@ -39,7 +44,8 @@ function selectHouseInfoList(){ if(resultsMap.houseInfoPageList.currentPage == resultsMap.houseInfoPageList.totalPages){ //如果此次查询刚好是page = totalPages // 删除加载提示符 - $('#loadTip1').remove(); + $('#loadTip1').hide(); + //$('#loadTip1').remove(); //$('.infinite-scroll-preloader').remove(); // 加载完毕,则注销无限加载事件,以防不必要的加载 //$.detachInfiniteScroll($('.infinite-scroll')); @@ -57,8 +63,6 @@ function selectHouseInfoList(){ mh_page = resultsMap.houseInfoPageList.currentPage; mh_pageSize = resultsMap.houseInfoPageList.limit; mh_totalPages = resultsMap.houseInfoPageList.totalPages; - mh_totalRecords = resultsMap.houseInfoPageList.totalRecords; - tab.mh_num = mh_totalRecords; mhAddItems(mh_itemsPerLoad, mh_lastIndex, dataObj, xqOneMonthUpDownRangeMap, xqPotentialIndexMap, houseInfoTotalMap); }).catch(function (error) { console.log(error); From 02727c6550d4b4b7acafb71452da16d4dc93b7f0 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Mon, 7 May 2018 12:58:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E7=9A=84=E5=88=A0=E9=99=A4=E5=90=8E=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=95=88=E6=9E=9C=EF=BC=8C=20=E4=B8=8D=E7=94=A8reload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/user/userInfo.html | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/fangija-zsyf/views/user/userInfo.html b/fangija-zsyf/views/user/userInfo.html index b332a83..6273d4e 100644 --- a/fangija-zsyf/views/user/userInfo.html +++ b/fangija-zsyf/views/user/userInfo.html @@ -227,7 +227,7 @@ $.config = {router: false} - + @@ -350,7 +350,8 @@ $(document).on('infinite', '.infinite-scroll',function() { // 加载完毕,则注销无限加载事件,以防不必要的加载 //$.detachInfiniteScroll($('.infinite-scroll')); // 删除加载提示符 - $('#loadTip1').remove(); + //$('#loadTip1').remove(); + $('#loadTip1').hide(); return; } //控制查询下一页的数据 @@ -466,7 +467,8 @@ $(document).on("click",".confirm-ok", function () { $.toast(response.data.data); //删除后,如果需要调用checkIsLogin,需要所有的参数初始化 //checkIsLogin(); - window.location.reload(); + //window.location.reload(); + initMyHouseParams(); //删除房产会影响个人中心房产列表, 刷新 /*if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ plus.webview.getWebviewById('views/user/userInfo.html').reload(); @@ -482,6 +484,24 @@ $(document).on("click",".confirm-ok", function () { $(".modal-text").css("text-align","center"); }); +//初始化分页参数, 防止回调时候重新请求出错 +function initMyHouseParams(){ + mh_loading = false; + mh_page = undefined; + var mh_pageSize = undefined; + var mh_totalPages = undefined; + var mh_totalRecords = undefined; + var mh_lastIndex = undefined; + var mh_itemsPerLoad = undefined; + var mh_maxItems = 100; + //清空构造的container + $('#myhouse').html(''); + // 删除加载提示符 + $('#loadTip1').show(); + //加载我的房产 + selectHouseInfoList(); +} + function openSettingPage() { clicked('../setting/setting.html',true,false,{},{},function(){}) } From b01066dc8d4888fc440367cf3374fe4a2a103e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Mon, 7 May 2018 13:41:01 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E9=9D=A2=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=8E=A8=E9=80=81=E5=88=87=E6=8D=A2=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/main.html | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/fangija-zsyf/main.html b/fangija-zsyf/main.html index 7ac35c6..f85cbe4 100644 --- a/fangija-zsyf/main.html +++ b/fangija-zsyf/main.html @@ -30,7 +30,7 @@