ソースを参照

Merge branch 'develop_yh35' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh35

lilei 1 年間 前
コミット
927cd06425
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)