瀏覽代碼

删除类型缓存

zhouna 4 年之前
父節點
當前提交
a7e648470c
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/js/homeStatic.js

+ 3 - 3
src/js/homeStatic.js

@@ -40,16 +40,16 @@ function goSearchList(){
 }
 }
 //获取字典信息
 //获取字典信息
 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)
     }
     }
   })
   })