From 3df13f45bad6857ebef06421c6f580530fdf239c Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Thu, 29 Mar 2018 13:11:34 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/yfindex.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index aaff9b5..32836f6 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -75,7 +75,7 @@ {{regionRank}} - + {{priceRate}}% @@ -201,7 +201,7 @@ -
+
@@ -1207,6 +1207,7 @@ var scoreCount = 0; var lat = 0; var lng = 0; var address = ""; +var timestamp1 = new Date().getTime(); document.addEventListener('plusready', onPlusReady, false); //扩展API加载完毕,现在可以正常调用扩展API function onPlusReady(){ @@ -1354,6 +1355,16 @@ function initBaseInfo(city,region,address,lat,lng){ $(".loadingBg").hide(); }) .catch(function (error) { + setTimeout(function(){ + mui.init(); + mui.openWindow({ + url: 'error.html', + id:'error.html', + extras:{ + //扩展参数 + } + }); + },10000) console.log(error); }); initNearDistricts(cityParam,latParam,lngParam,regionParam,0,0,0,""); @@ -1817,6 +1828,7 @@ function addItems(number, lastIndex) { // 添加新条目 if(lastIndex2 == 0){ $('.infinite-scroll-bottom .list-container').html(html); + $("#nearDistrictContainer").show(); }else{ $('.infinite-scroll-bottom .list-container').append(html); } @@ -2069,7 +2081,7 @@ function req(cityStr){ initRegionSelect(city); $(".region a").text('不限'); $("#select_price_div a").text('不限'); - potenialIndex(city,sort); + //potenialIndex(city,sort); } function openUrl(url){ @@ -2395,6 +2407,7 @@ function getCityPriceLevel(cityParam){ } function getDistrictList(cityParam,latParam,lngParam,regionParam,order,minPrice,maxPrice,tag){ + $("#nearDistrictContainer").hide(); latParam=0; lngParam=0; axios.get(BASE_PATH+"/rest/index/districtList", { From ba58347b994160c18f4dd597dc54631a83bf78f5 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Thu, 29 Mar 2018 17:32:11 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E8=AF=84=E4=BC=B0?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=8A=A0=E8=BD=BDloading=20=E6=95=88?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/evaluate/evaluateList.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/fangija-zsyf/views/evaluate/evaluateList.html b/fangija-zsyf/views/evaluate/evaluateList.html index c6a0eb4..ed8e1c4 100644 --- a/fangija-zsyf/views/evaluate/evaluateList.html +++ b/fangija-zsyf/views/evaluate/evaluateList.html @@ -27,6 +27,9 @@ .list-block .item-subtitle em.em02{font-size:0.75rem;color:#EB5F34;} .list-block .item-subtitle div.price{position:absolute;bottom:-0.3rem;right:0;} .list-block .item-subtitle div.price em strong{font-size:1.4rem;color:#EB5F34;font-weight:bold;margin-right:0.1rem;} + /**添加loading加载效果**/ + .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%;} @@ -41,6 +44,12 @@

房产评估

+ +
+
+
+
+
@@ -49,7 +58,7 @@
- @@ -179,6 +188,9 @@ function selectEvaluateList(){ //动态追加内容 $('.list-block ul').html(htmlContent); } + //添加loading等待效果 + $(".loadingBg").hide(); + $(".content-block").show(); }).catch(function (error) { console.log(error); }); From b58cc2781afe7444581553fe3ccc29e062b9872a Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Thu, 29 Mar 2018 17:44:04 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=20loading=20=E6=95=88?= =?UTF-8?q?=E6=9E=9C=EF=BC=8C=20=E8=B0=83=E6=95=B4=20js=20=E5=85=88em=20cs?= =?UTF-8?q?s=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/evaluate/evaluateList.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fangija-zsyf/views/evaluate/evaluateList.html b/fangija-zsyf/views/evaluate/evaluateList.html index ed8e1c4..4780695 100644 --- a/fangija-zsyf/views/evaluate/evaluateList.html +++ b/fangija-zsyf/views/evaluate/evaluateList.html @@ -13,9 +13,9 @@ + @@ -31,7 +36,7 @@

-


+


@@ -75,7 +80,7 @@ @@ -109,7 +114,7 @@ $.config = {router: false} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fangija-zsyf/views/house/add_noData.html b/fangija-zsyf/views/house/add_noData.html new file mode 100644 index 0000000..4bdcc9b --- /dev/null +++ b/fangija-zsyf/views/house/add_noData.html @@ -0,0 +1,54 @@ + + + + + +房产评估 + + + + + + + + + + + + + +
+
+
+ +

房产评估

+
+
+
+ +

评估房产  发现价值

+ +
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index f8db054..0807bcb 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -101,6 +101,7 @@ $.config = {router: false} + @@ -109,7 +110,7 @@ $.config = {router: false} \ No newline at end of file diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index 32836f6..d5dd780 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -64,21 +64,28 @@
-
{{momAvgPrice}}元/㎡
+
暂无数据
+
{{momAvgPrice}}元/㎡
@@ -124,7 +131,7 @@
-
+
@@ -132,7 +139,7 @@
-
'+ '
'+dataObj[i].introduction+'
'+ '
'+ - ''+dataObj[i].recommendCommentCount+'条
'+ + '
'+ '
'+ '
'; } if(dataObj[i].type=="投票"){ var voteFavorCount = dataObj[i].voteFavorCount; var voteNoFavorCount = dataObj[i].voteNoFavorCount; - var voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount)); - var voteNoFavorCountRate = 100-voteFavorCountRate; + var voteFavorCountRate = 50 + var voteNoFavorCountRate = 50 + if(voteFavorCount == 0 && voteNoFavorCount==0){ + + }else{ + voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount)); + voteNoFavorCountRate = 100-voteFavorCountRate; + } + html += '
'+dataObj[i].title+ '
'+ ''+dataObj[i].voteFavorText+''+ @@ -1792,7 +1864,6 @@ function addItems(number, lastIndex) { } tagStr += '
'; } - html += '
  • '+ ''+ '
    '+ @@ -2329,7 +2400,7 @@ $("#select_order li").on("click", function () { //查询城市价格区间 function getCityPriceLevel(cityParam){ - axios.get(BASE_PATH+"/house/getCityPriceLevel", { + axios.get("/house/getCityPriceLevel", { params: { city: cityParam } @@ -2410,7 +2481,7 @@ function getDistrictList(cityParam,latParam,lngParam,regionParam,order,minPrice, $("#nearDistrictContainer").hide(); latParam=0; lngParam=0; - axios.get(BASE_PATH+"/rest/index/districtList", { + axios.get("/rest/index/districtList", { params: { city: cityParam, lat:latParam, @@ -2455,7 +2526,7 @@ function openNewsView(newId) { } }); var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1; - $("#visitCount_"+newId).text(count+'人'); + $("#visitCount_"+newId).text(count+'人'); } From e01253754ceecf63383a45f748c5732a00662f81 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Fri, 30 Mar 2018 09:39:09 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E8=B0=83=E6=95=B4js=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/evaluate/evaluateList.html | 126 ++++++++++-------- 1 file changed, 68 insertions(+), 58 deletions(-) diff --git a/fangija-zsyf/views/evaluate/evaluateList.html b/fangija-zsyf/views/evaluate/evaluateList.html index 4780695..fb0bf9e 100644 --- a/fangija-zsyf/views/evaluate/evaluateList.html +++ b/fangija-zsyf/views/evaluate/evaluateList.html @@ -96,19 +96,21 @@ $(document).on('click','.open-vertical-modal', function () { { text: '自住', onClick: function() { - window.location.href = "01_index01_myHouse01_index.html"; + //window.location.href = "01_index01_myHouse01_index.html"; + + } }, { text: '出租', onClick: function() { - window.location.href = "01_index01_myHouse01_index.html"; + //window.location.href = "01_index01_myHouse01_index.html"; } }, { text: '空置', onClick: function() { - window.location.href = "01_index01_myHouse01_index.html"; + //window.location.href = "01_index01_myHouse01_index.html"; } }, { @@ -118,6 +120,7 @@ $(document).on('click','.open-vertical-modal', function () { }) }); +//查询房产评估列表 function selectEvaluateList(){ //先清空列表 $('.list-block ul').html(""); @@ -132,62 +135,11 @@ function selectEvaluateList(){ var results = resultsMap.houseInfoList; var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap; var cityAvgPriceMap = resultsMap.cityAvgPriceMap; + //构造数据列表 + htmlContent = constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap, htmlContent); - if(results!=null && results.length>0){ - for(var i in results){ - var result = results[i]; - var tempTotalPrice = result.totalPrice; - //考虑是否为数字,加强逻辑判断 - if(!isNaN(tempTotalPrice)){ - //转换成元,四舍五入 - tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2); - } - htmlContent = htmlContent +"
  • "; - htmlContent = htmlContent +"
    "; - htmlContent = htmlContent +"
    "+result.name+""+result.city+"-"+result.region+"
    "; - htmlContent = htmlContent +"
    "; - htmlContent = htmlContent +"
    "+result.roomCount+"室"+result.hallCount+"厅  "+result.area+"m  "+result.floor+"/"+result.height+"层
    "; - htmlContent = htmlContent +"
    "; - //对应城市地区小区30天涨跌幅 - //动态构建key - var xqOneMonthUpDownRangeKey = result.city+"-"+result.region +"-"+result.name; - //取得key对于的value - var xqOneMonthUpDownRangeValue = xqOneMonthUpDownRangeMap[xqOneMonthUpDownRangeKey]; - if(!isNaN(xqOneMonthUpDownRangeValue)){ - //涨跌幅大于零 - if(parseFloat(xqOneMonthUpDownRangeValue)>=0){ - htmlContent = htmlContent + "
    近30天涨跌幅: "+xqOneMonthUpDownRangeValue+"%
    "; - }else{ - //涨跌幅小于零 - htmlContent = htmlContent + "
    近30天涨跌幅: "+Math.abs(xqOneMonthUpDownRangeValue)+"%
    "; - } - }else{ - //为非数字清空放空格 - htmlContent = htmlContent + "
    近30天涨跌幅: "+ +"%
    "; - } - - //相比对于城市均价 - var cityAvgPriceKey = result.city; - //取得对应城市的value - var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey]; - if(!isNaN(cityAvgPriceValue)){ - if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){ - htmlContent = htmlContent + "
    相比"+result.city+"均价: "+'高'+(parseInt(cityAvgPriceValue)-parseInt(result.price))+'元'+"
    "; - }else{ - htmlContent = htmlContent + "
    相比"+result.city+"均价: "+'低'+(parseInt(result.price)-parseInt(cityAvgPriceValue))+'元'+"
    "; - } - }else{ - //为非数字清空放空格 - htmlContent = htmlContent + "
    相比"+result.city+"均价: "+' '+"
    "; - } - htmlContent = htmlContent + "
    均价: "+result.price+"元/㎡
    "; - htmlContent = htmlContent + "
    "+tempTotalPrice+"万
    "; - htmlContent = htmlContent + "
    添加管理" - htmlContent = htmlContent +"
  • "; - } - //动态追加内容 - $('.list-block ul').html(htmlContent); - } + //动态追加内容 + $('.list-block ul').html(htmlContent); //添加loading等待效果 $(".loadingBg").hide(); $(".content-block").show(); @@ -196,6 +148,64 @@ function selectEvaluateList(){ }); } +//动态构造房产评估列表 +function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap, htmlContent){ + if(results!=null && results.length>0){ + for(var i in results){ + var result = results[i]; + var tempTotalPrice = result.totalPrice; + //考虑是否为数字,加强逻辑判断 + if(!isNaN(tempTotalPrice)){ + //转换成元,四舍五入 + tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2); + } + htmlContent = htmlContent +"
  • "; + htmlContent = htmlContent +"
    "; + htmlContent = htmlContent +"
    "+result.name+""+result.city+"-"+result.region+"
    "; + htmlContent = htmlContent +"
    "; + htmlContent = htmlContent +"
    "+result.roomCount+"室"+result.hallCount+"厅  "+result.area+"m  "+result.floor+"/"+result.height+"层
    "; + htmlContent = htmlContent +"
    "; + //对应城市地区小区30天涨跌幅 + //动态构建key + var xqOneMonthUpDownRangeKey = result.city+"-"+result.region +"-"+result.name; + //取得key对于的value + var xqOneMonthUpDownRangeValue = xqOneMonthUpDownRangeMap[xqOneMonthUpDownRangeKey]; + if(!isNaN(xqOneMonthUpDownRangeValue)){ + //涨跌幅大于零 + if(parseFloat(xqOneMonthUpDownRangeValue)>=0){ + htmlContent = htmlContent + "
    近30天涨跌幅: "+xqOneMonthUpDownRangeValue+"%
    "; + }else{ + //涨跌幅小于零 + htmlContent = htmlContent + "
    近30天涨跌幅: "+Math.abs(xqOneMonthUpDownRangeValue)+"%
    "; + } + }else{ + //为非数字清空放空格 + htmlContent = htmlContent + "
    近30天涨跌幅: "+ +"%
    "; + } + + //相比对于城市均价 + var cityAvgPriceKey = result.city; + //取得对应城市的value + var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey]; + if(!isNaN(cityAvgPriceValue)){ + if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){ + htmlContent = htmlContent + "
    相比"+result.city+"均价: "+'高'+(parseInt(cityAvgPriceValue)-parseInt(result.price))+'元'+"
    "; + }else{ + htmlContent = htmlContent + "
    相比"+result.city+"均价: "+'低'+(parseInt(result.price)-parseInt(cityAvgPriceValue))+'元'+"
    "; + } + }else{ + //为非数字清空放空格 + htmlContent = htmlContent + "
    相比"+result.city+"均价: "+' '+"
    "; + } + htmlContent = htmlContent + "
    均价: "+result.price+"元/㎡
    "; + htmlContent = htmlContent + "
    "+tempTotalPrice+"万
    "; + htmlContent = htmlContent + "
    添加管理" + htmlContent = htmlContent +"
  • "; + } + } + return htmlContent; +} + //界面加载 $(document).ready(function () { selectEvaluateList(); From 6d681f8488d8fabc7b2ae03d44ccb620ca341268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Fri, 30 Mar 2018 09:42:14 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/user/bindingMobile.html | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 fangija-zsyf/views/user/bindingMobile.html diff --git a/fangija-zsyf/views/user/bindingMobile.html b/fangija-zsyf/views/user/bindingMobile.html new file mode 100644 index 0000000..cd2cc36 --- /dev/null +++ b/fangija-zsyf/views/user/bindingMobile.html @@ -0,0 +1,164 @@ + + + + + + +绑定账号 + + + + + + + + + + + + + + +
    +
    +
    + +

    绑定账号

    +
    + +
    +
    + + + + + + + + + + + + + + + + \ No newline at end of file From a4be112e1a5f003c2aebae57825a25a88e55d1b6 Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Fri, 30 Mar 2018 09:50:10 +0800 Subject: [PATCH 09/12] aa --- fangija-zsyf/yfindex.html | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index d5dd780..e7d21d4 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -2054,17 +2054,23 @@ $(document).on('click','#notFound_btn', function () { }); /* 获取城市 */ $("body").delegate(".popup-about01 p", "click", function () { - - $("#input_city").text($(this).text()); - $(".cityChoice a").text($(this).text()); + changeCity($(this).text()) +}); +$("body").delegate(".popup-about01 .cityGPS", "click", function () { + changeCity($(this).find('p')[0].innerHTML) +}); + +function changeCity(cityStr){ + $("#input_city").text(cityStr); + $(".cityChoice a").text(cityStr); $(".popup-about01 p").removeClass("active"); $(this).addClass("active"); var sort = 1; - city = $(this).text() - if(oriCity== $(this).text()){ + city = cityStr + if(oriCity== cityStr){ lat = oriLat; lng = oriLng; - if($(this).text()=="上海"){ + if(cityStr=="上海"){ $("#ShangHaiDiv").show(); $("#otherCityDiv").hide(); //initNearDistricts($(this).text(),lat,lng,"",0,0,0,""); @@ -2080,7 +2086,7 @@ $("body").delegate(".popup-about01 p", "click", function () { }else{ lat = 0; lng = 0; - if($(this).text()=="上海"){ + if(cityStr=="上海"){ $("#ShangHaiDiv").show(); $("#otherCityDiv").hide(); //initNews() @@ -2093,11 +2099,11 @@ $("body").delegate(".popup-about01 p", "click", function () { } } - if($(this).text()=="上海"){ + if(cityStr=="上海"){ $("#ShangHaiDiv").show(); $("#otherCityDiv").hide(); //initNearDistricts($(this).text(),0,0,"",0,0,0,""); - initBaseInfo($(this).text(),"",address,lat,lng); + initBaseInfo(cityStr,"",address,lat,lng); }else{ $("#ShangHaiDiv").hide(); $("#otherCityDiv").show(); @@ -2105,24 +2111,23 @@ $("body").delegate(".popup-about01 p", "click", function () { dataObj2 = {}; $(".infinite-scroll-preloader").show(); $('.infinite-scroll-bottom .list-container').html(''); - city = $(this).text(); - initRegionSelect($(this).text()); + city = cityStr; + initRegionSelect(cityStr); $(".region a").text('不限'); $("#select_price_div a").text('不限'); //不同城市查询价格区间 - getCityPriceLevel($(this).text()); + getCityPriceLevel(cityStr); //加载列表 sort=6; - getDistrictList($(this).text(),lat,lng,"",sort,0,0,""); - initBaseInfo($(this).text(),"","",0,0); + getDistrictList(cityStr,lat,lng,"",sort,0,0,""); + initBaseInfo(cityStr,"","",0,0); } $(".selectContent").hide(); //刷新下拉滚动加载事件 $.attachInfiniteScroll($('.infinite-scroll')) //potenialIndex($(this).text(),sort); -}); - +} function req(cityStr){ city=cityStr.replace("","") $("#input_city").text(city); From 4731927d59d7641233a4cc56e7d9df05ddcb3eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Fri, 30 Mar 2018 09:52:19 +0800 Subject: [PATCH 10/12] update main --- fangija-zsyf/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fangija-zsyf/manifest.json b/fangija-zsyf/manifest.json index fbbfc9c..98399d1 100644 --- a/fangija-zsyf/manifest.json +++ b/fangija-zsyf/manifest.json @@ -14,7 +14,7 @@ "icons": { "144": "icon.png" }, - "launch_path": "/views/evaluate/evaluateReport.html",/*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/ + "launch_path": "main.html",/*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/ "developer": { "name": "",/*开发者名称*/ "email": "",/*开发者邮箱地址*/ From 5fab6ca812423c87fea1946492c5ef715b2f386d Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Fri, 30 Mar 2018 10:08:55 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/news/newsDetail.html | 12 ++++++++++++ fangija-zsyf/yfindex.html | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index 8b785d2..a7884c1 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -28,6 +28,7 @@ + @@ -106,6 +107,7 @@ $.config = {router: false} + @@ -537,6 +539,16 @@ function addComment(){ }); } +mui.init({ + beforeback: function() { +     //获得父页面的webview + var list = plus.webview.getWebviewById('yfindex.html'); +     //触发父页面的自定义事件(refresh),从而进行刷新 + mui.fire(list, 'refresh'); + //返回true,继续页面关闭逻辑 + return true; + } +}); \ No newline at end of file diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index e7d21d4..f2c4bd5 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -2534,6 +2534,10 @@ function openNewsView(newId) { $("#visitCount_"+newId).text(count+'人'); } +window.addEventListener('refresh', function(e){//执行刷新 + alert("aa"); +}); +