房产评估重复提交问题

This commit is contained in:
尹吉欢
2018-04-17 14:28:05 +08:00
parent f67f0ffcda
commit a9b3401c70
2 changed files with 28 additions and 6 deletions
+6 -3
View File
@@ -1,6 +1,6 @@
axios.defaults.baseURL = BASE_PATH;
axios.defaults.headers.post['Content-Type'] = 'application/json';
axios.defaults.timeout = 10000;
axios.defaults.timeout = 15000;
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
@@ -15,14 +15,17 @@ axios.interceptors.request.use(function (config) {
axios.interceptors.response.use(function (response) {
return response;
}, function (error) {
if(error=="Error: Network Error"){
if (error.toString().indexOf('timeout') > -1) {
plus.nativeUI.alert("请求超时");
plus.nativeUI.closeWaiting();
}else if(error=="Error: Network Error"){
if(plus.webview.getWebviewById('error.html')==null){
clicked('error.html',true,false,{},{},function(){
window.location.reload();
})
}else{
$(".loadingBg").hide();
plus.nativeUI.closeWaiting();
plus.nativeUI.closeWaiting();
plus.webview.getWebviewById("error.html").show();
}
}