From 6b3a3fa81fe48f6b46e0891035f55f54508c655e Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Wed, 18 Apr 2018 11:35:24 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/user/myHouse.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fangija-zsyf/js/user/myHouse.js b/fangija-zsyf/js/user/myHouse.js index 70cf389..afc1347 100644 --- a/fangija-zsyf/js/user/myHouse.js +++ b/fangija-zsyf/js/user/myHouse.js @@ -131,9 +131,4 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, html += '立即申请'; } $('#myhouse').append(html); -} - -/* 说明-房产等级 */ -$(document).on('click','.alert-text-title', function () { - $.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级'); -}); \ No newline at end of file +} \ No newline at end of file From 6f35c4b57e63f28e16dc973b75a0f7987fe8afd3 Mon Sep 17 00:00:00 2001 From: gongjin Date: Wed, 18 Apr 2018 11:36:10 +0800 Subject: [PATCH 02/12] update --- fangija-zsyf/css/main.css | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css index 02bcd60..65aec81 100644 --- a/fangija-zsyf/css/main.css +++ b/fangija-zsyf/css/main.css @@ -478,13 +478,12 @@ input::-webkit-input-placeholder{ .recommend + .cardInfo{border-top:none;} .cardInfo01{color:#333;} -.cardInfo01 > img{width:100%;height:180px;} +.cardInfo01 > img{width:100%;} .cardInfo01 span{font-size:0.6rem;color:#666;} .cardInfo01 .card-header{padding:0;font-size:0.85rem;} .cardInfo01 .card-content-inner{padding:0;} .cardInfo01 .card-footer{padding:0;} -.cardInfo01a > img{height:142px;} .cardInfo01a .card-content-inner .tag{display:block;margin-bottom:0.5rem;} .cardInfo01a .card-content-inner .tag small{margin-left:0;margin-right:0.2rem;} .cardInfo01a .card-footer span{font-size:0.7rem;color:#999;text-align:left;width:50%;} @@ -1291,11 +1290,11 @@ input[type=range]::-webkit-slider-thumb { .rangeNote span.span07{float:right;} /* 启动页 */ -.contentStart{background:#21a5fe;} .contentStart .time{width:65px;height:30px;line-height:1.6rem;text-align:center;font-size:0.7rem;color:#fff;background:rgba(0,0,0,0.3);border-radius:1.25rem;display:block;position:absolute;top:0.75rem;right:0.75rem;} .contentStart #time{font-size:0.7rem;vertical-align:middle;} -.contentStart img{width:70%;margin:0 auto;margin-top:30%;} -.contentStart #test_btn{background:#fff;color:#21a5fe;width:10rem;margin:0 auto;margin-top:1.5rem;} +.contentStart .startImg01{width:30%;margin:0 auto;margin-top:45%;} +.contentStart .startImg02{width:179px;height:44px;background:url(../images/startImg02.png) no-repeat center center;text-align:center;position:absolute;bottom:4rem;left:50%;margin-left:-89.5px;} +.contentStart p{width:100%;font-size:0.55rem;color:#D7D7D7;text-align:center;position:absolute;bottom:0.5rem;} /* 引导页 */ .swiper-container{width:100%;height:100%;background:#fff;z-index:10000;} From 373aa89f8be90708d37cef2009046b812664323a Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Wed, 18 Apr 2018 11:36:28 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=8A=A0=E8=BD=BD,=20=E6=94=BE?= =?UTF-8?q?=E5=9C=A8=20plusReady=E5=90=8E=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/house/houseList.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fangija-zsyf/views/house/houseList.html b/fangija-zsyf/views/house/houseList.html index 8a12187..9905e06 100644 --- a/fangija-zsyf/views/house/houseList.html +++ b/fangija-zsyf/views/house/houseList.html @@ -115,7 +115,7 @@ $.config = {router: false} From 61bef702b527ce83206531a1cec8178302d1be26 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Wed, 18 Apr 2018 11:37:32 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=8A=A0=E8=BD=BD,=20=E6=94=BE?= =?UTF-8?q?=E5=9C=A8=20plusReady=E5=90=8E=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/user/userInfo.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fangija-zsyf/views/user/userInfo.html b/fangija-zsyf/views/user/userInfo.html index 14426db..030e992 100644 --- a/fangija-zsyf/views/user/userInfo.html +++ b/fangija-zsyf/views/user/userInfo.html @@ -251,7 +251,7 @@ $(document).on('click','.alert-text-title', function () { $.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级'); }); -//初始化init +//初始化init(init方法必须调用,屏蔽后,无线下拉刷新无效果) $.init(); //定义个人手机号,贷款页面需要传参数 @@ -416,9 +416,11 @@ function openSettingPage() { clicked('../setting/setting.html',true,false,{},{},function(){}) } -$(document).ready(function () { - checkIsLogin(); -}); +document.addEventListener('plusready', onPlusReady, false); + +function onPlusReady(){ + checkIsLogin(); +} From 7218041c66f1e15f58a07c2fbe9f8fd913d12ef0 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Wed, 18 Apr 2018 13:22:24 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E8=B0=83=E6=95=B4js=E5=8A=A0=E8=BD=BD=20?= =?UTF-8?q?=E5=86=8D=20=20plusready=E5=90=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/house/houseManageList.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/fangija-zsyf/views/house/houseManageList.html b/fangija-zsyf/views/house/houseManageList.html index 40b3e28..9bef9ff 100644 --- a/fangija-zsyf/views/house/houseManageList.html +++ b/fangija-zsyf/views/house/houseManageList.html @@ -104,7 +104,7 @@ $.config = {router: false} From 28c43d717c341ae45dca155dcf4e1952c60bc3eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Wed, 18 Apr 2018 13:37:30 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E6=8A=95=E7=A5=A8=E7=B1=BB=E6=96=B0?= =?UTF-8?q?=E9=97=BB=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/yfindex.html | 97 ++++++++++++++++++++++++++++----------- 1 file changed, 70 insertions(+), 27 deletions(-) diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index 664734e..e7dc6f9 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -1528,7 +1528,8 @@ function initNews(page){ axios.get("/rest/news/list", { params: { city: $("#input_city").text(), - page:page + page:page, + deviceId:plus.device.uuid } }) .then(function (response) { @@ -1578,44 +1579,85 @@ $("#region").click(function(e){ })*/ $("body").delegate(".vote01 .icon-light-grey", "click", function () { + if($(".vote01 .icon-light-grey").attr("class").indexOf("red") > 0){ + $.toast("已投票"); + return; + } var id = $(this).attr("data-val"); var voteFavorCount = parseInt($("#voteFavorCount_"+id).text().split("  ")[0].replace("票",""))+1; var voteNoFavorCount = parseInt($("#voteNoFavorCount_"+id).text().split("  ")[0].replace("票","")); var voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount)); var voteNoFavorCountRate = 100-voteFavorCountRate; - $("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%'); - $("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%'); - $("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%'); - $("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%'); - doVote(id,0); + axios.get("/rest/news/vote", { + params: { + newsId: id, + type:0, + deviceId:plus.device.uuid + } + }) + .then(function (response) { + if(!response.data.status){ + $.toast(response.data.message); + } else { + if (!response.data.data){ + $(".vote01 .icon-light-grey").addClass("icon-light-red"); + $(".vote02 .icon-light-grey").removeClass("icon-light-blue"); + $("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%'); + $("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%'); + $("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%'); + $("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%'); + } else { + $.toast("已投票"); + } + } + }) + .catch(function (error) { + console.log(error); + $.toast("投票失败,请重试"); + }); + }); $("body").delegate(".vote02 .icon-light-grey", "click", function () { + if($(".vote01 .icon-light-grey").attr("class").indexOf("blue") > 0){ + $.toast("已投票"); + return; + } var id = $(this).attr("data-val"); var voteFavorCount = parseInt($("#voteFavorCount_"+id).text().split("  ")[0].replace("票","")); var voteNoFavorCount = parseInt($("#voteNoFavorCount_"+id).text().split("  ")[0].replace("票",""))+1; var voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount)); var voteNoFavorCountRate = 100-voteFavorCountRate; - $("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%'); - $("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%'); - $("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%'); - $("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%'); - doVote(id,1); -}); - -function doVote(id,flag){ axios.get("/rest/news/vote", { params: { newsId: id, - type:flag + type:1, + deviceId:plus.device.uuid } }) .then(function (response) { + if(!response.data.status){ + $.toast(response.data.message); + } else { + if (!response.data.data){ + $("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%'); + $("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%'); + $("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%'); + $("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%'); + $(".vote01 .icon-light-grey").removeClass("icon-light-red"); + $(".vote02 .icon-light-grey").addClass("icon-light-blue"); + } else { + $.toast("已投票"); + } + } }) .catch(function (error) { console.log(error); + $.toast("投票失败,请重试"); }); -} + +}); + function changeRegion(){ axios.get("/rest/index/home", { @@ -1850,11 +1892,20 @@ function addItems(number, lastIndex) { voteNoFavorCountRate = 100-voteFavorCountRate; } + var colorClass = "icon-light-grey"; + var colorClass2 = "icon-light-grey"; + if (dataObj[i].vote) { + if (dataObj[i].voteType == 0) { + colorClass = "icon-light-grey icon-light-red"; + } else { + colorClass2 = "icon-light-grey icon-light-blue"; + } + } html += '
'+dataObj[i].title+ '
'+ - ''+dataObj[i].voteFavorText+''+ + ''+dataObj[i].voteFavorText+''+ '
'+ - '
'+dataObj[i].voteNoFavorText+''+ + '
'+dataObj[i].voteNoFavorText+''+ '
V.S
'; } } @@ -2638,15 +2689,7 @@ function openDistWindow(city, region, name){ } });*/ -/* 投票 */ -$("body").delegate(".vote01 .icon-light-grey", "click", function () { - $(".vote01 .icon-light-grey").addClass("icon-light-red"); - $(".vote02 .icon-light-grey").removeClass("icon-light-blue"); -}); -$("body").delegate(".vote02 .icon-light-grey", "click", function () { - $(".vote01 .icon-light-grey").removeClass("icon-light-red"); - $(".vote02 .icon-light-grey").addClass("icon-light-blue"); -}); + $("body").delegate("#hotList ul li", "click", function () { var select_city = $(this).find("a").attr("data-city"); From 56ec82603b0c2707d3c0245f169f1e4e1b8a61a0 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Wed, 18 Apr 2018 14:25:18 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B4=B7=E6=AC=BE?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/user/myHouse.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fangija-zsyf/js/user/myHouse.js b/fangija-zsyf/js/user/myHouse.js index afc1347..0f13b8d 100644 --- a/fangija-zsyf/js/user/myHouse.js +++ b/fangija-zsyf/js/user/myHouse.js @@ -128,7 +128,12 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, }else{ html += "其它"; } - html += '立即申请'; + //控制贷款按钮是否可以显示,便于ios版本审核 + if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){ + html += '立即申请'; + }else{ + html += ''; + } } $('#myhouse').append(html); } \ No newline at end of file From 18d901401103f2cb391a3f8387542f469958c9a2 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Wed, 18 Apr 2018 14:27:18 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B4=B7=E6=AC=BE?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/evaluate/evaluateReport.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index c7fd6f5..09d9cdd 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -276,9 +276,12 @@ $.config = {router: false} // evaluate_msg.msg=h.evaluateMsg if(typeof(h.imgId)!="undefined"&&h.imgId!=null&&$.trim(h.imgId)!=""){ $("#img").attr("src",BASE_PATH+"/img/"+h.imgId); - $("#img").click(function(){ - clicked('/views/loan/loanInfo.html',true,false,{},{houseId: hid, city: h.city, mobile: ""},function(){}) - }) + //控制贷款按钮是否可以显示,便于ios版本审核 + if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){ + $("#img").click(function(){ + clicked('/views/loan/loanInfo.html',true,false,{},{houseId: hid, city: h.city, mobile: ""},function(){}) + }) + } } loadingChart(h.city,h.region,h.name,2) //按照时间范围加载数据 From a315e9d135460f2e45850c168b6ce5ae59a51a2c Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Wed, 18 Apr 2018 14:28:15 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B4=B7=E6=AC=BE?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/house/detail.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fangija-zsyf/views/house/detail.html b/fangija-zsyf/views/house/detail.html index 33ff91f..6e6341e 100644 --- a/fangija-zsyf/views/house/detail.html +++ b/fangija-zsyf/views/house/detail.html @@ -102,7 +102,7 @@ 我要置换
--> -
+ @@ -333,7 +333,12 @@ var oriName; function onPlusReady(){ var self = plus.webview.currentWebview(); houseId = self.houseId; //type为1时是我的房产 - //houseId="106777351102136320"; + //控制贷款按钮是否可以显示,便于ios版本审核 + if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){ + $('#gotoLoanApply').show(); + }else{ + $('#gotoLoanApply').hide(); + } init(); } var baseInfo = new Vue({ From a9d0436ebf79dfc0629345ca827bde390c41ae2b Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Wed, 18 Apr 2018 14:28:45 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B4=B7=E6=AC=BE?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/house/houseList.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fangija-zsyf/views/house/houseList.html b/fangija-zsyf/views/house/houseList.html index 9905e06..9dc2545 100644 --- a/fangija-zsyf/views/house/houseList.html +++ b/fangija-zsyf/views/house/houseList.html @@ -366,7 +366,12 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq }else{ html += "其它"; } - html += '立即申请'; + //控制贷款按钮是否可以显示,便于ios版本审核 + if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){ + html += '立即申请'; + }else{ + html += ''; + } } $('.infinite-scroll-bottom .list-container').append(html); } From b43cd64d1bb903d36c9ef65c49904fb226d1b4d6 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Wed, 18 Apr 2018 14:30:35 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B4=B7=E6=AC=BE?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/main.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fangija-zsyf/main.html b/fangija-zsyf/main.html index cb018ca..fc84349 100644 --- a/fangija-zsyf/main.html +++ b/fangija-zsyf/main.html @@ -1,6 +1,5 @@ - Hello MUI @@ -104,7 +103,6 @@ } }); } - // 加载菜单信息,控制是否显示贷款菜单 $.ajax({ type: "GET", @@ -113,8 +111,14 @@ async : false, success: function(data) { if(data.status){ - localStorage.setItem("showLoanMenu", data.data.showLoanMenu) + //存入localStorage Boolean类型变成String + localStorage.setItem("showLoanMenu", data.data.showLoanMenu); + }else{ + localStorage.setItem("showLoanMenu", false); } + }, + error: function(err) { + localStorage.setItem("showLoanMenu", false); } }) From ce0d47eaa25bac38d508d212616054cabcf0b20d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Wed, 18 Apr 2018 14:52:45 +0800 Subject: [PATCH 12/12] add --- fangija-zsyf/css/main.css | 6 +++--- fangija-zsyf/js/axiosPlugin.js | 10 +--------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css index 65aec81..d083bfa 100644 --- a/fangija-zsyf/css/main.css +++ b/fangija-zsyf/css/main.css @@ -1290,11 +1290,11 @@ input[type=range]::-webkit-slider-thumb { .rangeNote span.span07{float:right;} /* 启动页 */ +.contentStart{background:#21a5fe;} .contentStart .time{width:65px;height:30px;line-height:1.6rem;text-align:center;font-size:0.7rem;color:#fff;background:rgba(0,0,0,0.3);border-radius:1.25rem;display:block;position:absolute;top:0.75rem;right:0.75rem;} .contentStart #time{font-size:0.7rem;vertical-align:middle;} -.contentStart .startImg01{width:30%;margin:0 auto;margin-top:45%;} -.contentStart .startImg02{width:179px;height:44px;background:url(../images/startImg02.png) no-repeat center center;text-align:center;position:absolute;bottom:4rem;left:50%;margin-left:-89.5px;} -.contentStart p{width:100%;font-size:0.55rem;color:#D7D7D7;text-align:center;position:absolute;bottom:0.5rem;} +.contentStart img{width:70%;margin:0 auto;margin-top:30%;} +.contentStart #test_btn{background:#fff;color:#21a5fe;width:10rem;margin:0 auto;margin-top:1.5rem;} /* 引导页 */ .swiper-container{width:100%;height:100%;background:#fff;z-index:10000;} diff --git a/fangija-zsyf/js/axiosPlugin.js b/fangija-zsyf/js/axiosPlugin.js index b302d7b..531b3ee 100644 --- a/fangija-zsyf/js/axiosPlugin.js +++ b/fangija-zsyf/js/axiosPlugin.js @@ -11,7 +11,6 @@ axios.interceptors.request.use(function (config) { return Promise.reject(error); }); -var showTimeOutTime = 0; // 添加响应拦截器 axios.interceptors.response.use(function (response) { try { @@ -22,14 +21,7 @@ axios.interceptors.response.use(function (response) { return response; }, function (error) { try { - if (error.toString().indexOf('timeout') > -1) { - var curTime = new Date(); - if (curTime - showTimeOutTime > 5000) { - plus.nativeUI.alert("请求超时"); - showTimeOutTime = new Date(); - } - plus.nativeUI.closeWaiting(); - }else if(error=="Error: Network Error"){ + if(error=="Error: Network Error" || error.toString().indexOf('timeout') > -1){ if(plus.webview.getWebviewById('error.html')==null){ clicked('error.html',true,false,{},{},function(){ window.location.reload();