소스 검색

修改bug

chenrui 1 년 전
부모
커밋
375683afb3
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 4
      src/utils/request.js

+ 5 - 4
src/utils/request.js

@@ -168,11 +168,12 @@ service.interceptors.response.use((response) => {
   
   // 防重复提交时间戳
   const mainInterfaceList = store.getters.mainInterfaceList
-  const hasPath = mainInterfaceList.find(item => response.config.url.indexOf(item)>=0)
-  if(hasPath){
-    store.commit('SET_noRestTimeStr', response.data.data.updateDate)
+  if(mainInterfaceList){
+    const hasPath = mainInterfaceList.find(item => response.config.url.indexOf(item)>=0)
+    if(hasPath){
+      store.commit('SET_noRestTimeStr', response.data.data.updateDate)
+    }
   }
-  
   return response.data
 }, err)