Browse Source

fix:退出登录清除缓存数据处理

zhangsiya 1 year ago
parent
commit
3f590166cb
2 changed files with 6 additions and 12 deletions
  1. 6 0
      src/web/staticres/js/login.js
  2. 0 12
      src/web/templates/pc/supsearch.html

+ 6 - 0
src/web/staticres/js/login.js

@@ -734,6 +734,10 @@ function clearLoginStorage (reg) {
   clearObjKeyForRegFn(localStorage, reg)
 }
 
+var removeLocalStorage = function(){
+  // 移除userId (大会员中标预测历史记录用到)
+  localStorage.removeItem('BIGMEMBER_PC')
+}
 
 //退出登录
 var signout = function(){
@@ -765,6 +769,8 @@ var signout = function(){
             window.localStorage.removeItem('bus-key-group-SCOPE')
             window.localStorage.removeItem('noMesg')
             clearInterval(msgTimer)
+      // 移除浏览器缓存
+      removeLocalStorage()
 		}
 	})
 }

+ 0 - 12
src/web/templates/pc/supsearch.html

@@ -1969,7 +1969,6 @@
       // 条件:1.精准搜索模式 2.返回无数据 3.有主关键词或附加词
       var jzModel = goTemplateData.params.searchMode == 0 && (goTemplateData.params.searchvalue || goTemplateData.params.additionalWords) && goTemplateData.params.listLength == 0
       var mhModel = goTemplateData.params.searchMode == 1 && (goTemplateData.params.searchvalue || goTemplateData.params.additionalWords)
-      console.log(jzModel, autoSwitchModel);
       if (jzModel && !autoSwitchModel) {
         autoSwitchModel = true
         $("#zbSeatchT [name='searchMode']").val(1)
@@ -1987,8 +1986,6 @@
           autoSwitchModel = false
         }
       }
-      console.log(mhModel)
-      console.log( autoSwitchModel)
     }
     if(!loginflag){//未登录隐藏
       $('#go-customer-4').addClass('hide')
@@ -2307,7 +2304,6 @@
         $(this).css("border-color", '#e0e0e0').children('.icon-arrow').removeClass('up')
         $(this).siblings().hide()
       }
-      console.log($(this).siblings().css('display'))
       $('.custom-option li').off('click').bind('click',function(e) {
         e.stopPropagation()
         $(this).parent().hide().siblings().children('.icon-arrow').removeClass('up')
@@ -2487,7 +2483,6 @@
       var hasVipIcon = $(this).siblings().hasClass('icon-vip'); // 有无点击付费的搜索范围
       // 如果是老用户(版本更新前注册的用户)可以使用中标企业搜索范围
       // 不是付费用户引导去付费
-      console.log(vipState, hasVipIcon);
       if (!vipState && hasVipIcon) {
         if($(this).text().indexOf('中标企业')> -1 && isOld) {
           var typeArr = selectType ? selectType.split(',') : []
@@ -2531,7 +2526,6 @@
         selectType = typeArr.toString()
         beforeSubmit('filter-selectType');
       }
-      console.log(selectType, 'selectType');
       // 筛选条件优化缓存选中标题/正文状态
       changeDefaultForSearchRange('set', 'Title', selectType.indexOf('title') !== -1)
       changeDefaultForSearchRange('set', 'Content', selectType.indexOf('content') !== -1)
@@ -3266,7 +3260,6 @@ function checkTagDisabled () {
           area_arr = []
         }
         city = data.city
-        console.log(city,area_arr)
         $("#zbSeatchT [name='area']").val(area_arr.toString())
         $("#zbSeatchT [name='city']").val(city.toString())
         beforeSubmit('filter-area')
@@ -3352,7 +3345,6 @@ function checkTagDisabled () {
       },
       // 点击感兴趣
       onClickInterested: function (type) {
-        console.log(this.nowModuleName)
         const title = type === 'A' ? '体验超前项目推荐服务!' : '为您量身定制个性化报告!'
         this.showAdvancedDialog(title)
         try {
@@ -3376,7 +3368,6 @@ function checkTagDisabled () {
       },
       // 查看完整报告
       goToReport: function () {
-        console.log(this.nowModuleName)
         try {
           this.ajaxSetLeadGetDateRecordOfJq({ type: 'B' })
         } catch (e) {
@@ -4088,7 +4079,6 @@ function checkTagDisabled () {
                     }
                   }
                   _this.curFilter = _this.formatFilterData(params)
-                  console.log(_this.curFilter, '22');
                   _this.filterInkey = r.data
                 } else {
                   toastFn(r.error_msg, 3000)
@@ -4361,7 +4351,6 @@ function checkTagDisabled () {
         }
         // 回显行业
         if(item.industry){
-          console.log(item.industry,'行业回显数据')
           $("#induAll").removeClass("active");
           item.industry = item.industry.toString().split(",");
           $('.industry-content font').removeClass('active').removeClass('secondActice')
@@ -4473,7 +4462,6 @@ function checkTagDisabled () {
               if(childLen == childActiveLen){
                 $(this).addClass("active");
               }else if(childActiveLen>0){
-                console.log($(this));
                 $(this).addClass("secondActice");
               }
             }