浏览代码

筛选分值数据缓存删除

zhouna 4 年之前
父节点
当前提交
bf95917803
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/js/utils.js

+ 5 - 5
src/js/utils.js

@@ -543,7 +543,7 @@ function initScroll(el, sliderDir, sliderMode, top) {
 }
 //获取筛选分值、任务来源列表
 function getScoreTabList(fn,isSource){
-    let val='';
+    /*let val='';
     if(isSource){
         val = localStorage.getItem('sourceList');
     }else{
@@ -553,18 +553,18 @@ function getScoreTabList(fn,isSource){
     if((val||'').trim()){
         fn(isSource?JSON.parse(val):val.split(","));
         return;
-    }
+    }*/
     post(ywCheckApi.getCheckType).then(res =>{
         if(res.data.code == '0'){
             const data = res.data.data;
-            localStorage.setItem('sourceList',JSON.stringify(data.source));
-            localStorage.setItem('valueList',data.value.join(","));
+            //localStorage.setItem('sourceList',JSON.stringify(data.source));
+            //localStorage.setItem('valueList',data.value.join(","));
             fn(isSource?data.source:data.value)
         }else{
             $.alerModal({"message":res.data.msg,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
         }
     }).catch((e) =>{
-
+        $.alerModal({"message":'获取任务来源及筛选分值数据失败',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
     })
 }
 function listenScroll(dom) {