From ba2a967b7e763b73308b4dadef7e5c241f5a262a Mon Sep 17 00:00:00 2001 From: gaojuan Date: Mon, 21 May 2018 17:55:32 +0800 Subject: [PATCH] fixbug --- fangija-zsyf/error.html | 19 ++++++++++++++++++- fangija-zsyf/js/axiosPlugin.js | 3 ++- fangija-zsyf/views/city/regionRanking.html | 2 +- fangija-zsyf/views/house/regions.html | 2 +- fangija-zsyf/views/news/newsDetail.html | 12 ++++++------ 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/fangija-zsyf/error.html b/fangija-zsyf/error.html index 5b68447..8f2ee38 100644 --- a/fangija-zsyf/error.html +++ b/fangija-zsyf/error.html @@ -38,12 +38,29 @@

重启应用 - 返回刷新 + 返回刷新

+ \ No newline at end of file diff --git a/fangija-zsyf/js/axiosPlugin.js b/fangija-zsyf/js/axiosPlugin.js index 4c7c481..1195d34 100644 --- a/fangija-zsyf/js/axiosPlugin.js +++ b/fangija-zsyf/js/axiosPlugin.js @@ -22,9 +22,10 @@ axios.interceptors.response.use(function (response) { return response; }, function (error) { try { + if(error=="Error: Network Error" || error.toString().indexOf('timeout') > -1){ if(plus.webview.getWebviewById('error.html')==null){ - clicked('error.html',true,false,{},{},function(){ + clicked('error.html',true,false,{},{flag:1},function(){ window.location.reload(); }) }else{ diff --git a/fangija-zsyf/views/city/regionRanking.html b/fangija-zsyf/views/city/regionRanking.html index 0e44e81..50df521 100644 --- a/fangija-zsyf/views/city/regionRanking.html +++ b/fangija-zsyf/views/city/regionRanking.html @@ -141,7 +141,7 @@ $.config = {router: false} //loadRegionInfo("上海"); function loadRegionRank(city){ - axios.get("/rest/quotations/regionInfos",{ + axios.get("/rest/quotations/regionPriceInfos",{ params:{ city : city } diff --git a/fangija-zsyf/views/house/regions.html b/fangija-zsyf/views/house/regions.html index f2609d2..9502f63 100644 --- a/fangija-zsyf/views/house/regions.html +++ b/fangija-zsyf/views/house/regions.html @@ -129,7 +129,7 @@ $.config = {router: false} //loadRegionInfo("上海"); function loadRegionInfo(city){ - axios.get("/rest/quotations/regionInfos",{ + axios.get("/rest/quotations/regionMarkupInfos",{ params:{ city : city } diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index 9b4193f..376c687 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -175,11 +175,11 @@ var vm = new Vue({ }) -//function onPlusReady() { -// var self = plus.webview.currentWebview(); -// id = self.newsId; -// shareId = id -// shareUrl = shareUrl+id +function onPlusReady() { + var self = plus.webview.currentWebview(); + id = self.newsId; + shareId = id + shareUrl = shareUrl+id axios.get("/rest/news/detail",{params:{newsId:id}}).then(function(response){ if(response.data.code==200){ @@ -211,7 +211,7 @@ var vm = new Vue({ }); getPosition(); updateSerivces(); -//} +} //数量进行转换 function numberConver(thumbsUpCount){