Browse Source

删除类型缓存+

zhouna 3 years ago
parent
commit
1b196cc35e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/js/searchStaticList.js

+ 3 - 3
src/js/searchStaticList.js

@@ -38,16 +38,16 @@ function renderTab(data){
   }
   }
 //获取字典信息
 //获取字典信息
 function getAllTypes(){
 function getAllTypes(){
-    const allTypes = localStorage.getItem('allTypes')&&JSON.parse(localStorage.getItem('allTypes'))||[];
+    /*const allTypes = localStorage.getItem('allTypes')&&JSON.parse(localStorage.getItem('allTypes'))||[];
     if(allTypes.length>0){
     if(allTypes.length>0){
       renderTab(allTypes)
       renderTab(allTypes)
       return
       return
-    }
+    }*/
     post(config.dictionaryInfo, {}).then((res) => {
     post(config.dictionaryInfo, {}).then((res) => {
       const result = res.data
       const result = res.data
       if(result.code==='0'){
       if(result.code==='0'){
         const data = result.data[7]||[];
         const data = result.data[7]||[];
-        localStorage.setItem('allTypes',JSON.stringify(data))
+        //localStorage.setItem('allTypes',JSON.stringify(data))
         renderTab(data)
         renderTab(data)
       }
       }
     })
     })