Browse Source

容错处理

luolei 5 years ago
parent
commit
03a2e8bc94
2 changed files with 5 additions and 2 deletions
  1. 2 2
      src/utils/config.js
  2. 3 0
      src/utils/tools.js

+ 2 - 2
src/utils/config.js

@@ -1,8 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-const host='http://192.168.2.236:5050';//后端接口访问地址
-// const host='http://192.168.2.241:5050';//后端接口访问地址
+// const host='http://192.168.2.236:5050';//后端接口访问地址
+const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚

+ 3 - 0
src/utils/tools.js

@@ -558,6 +558,9 @@ function filterArr(arr){
 }
 
 function filterDataArr(arrTmp){   //数据处理
+  if(!Array.isArray(arrTmp)){
+    return
+  }
     let tmpArr = [];
     tmpArr = arrTmp.map((it,i)=>{     //连续的标点符号保留第一个
       if(!it)return '';