浏览代码

Merge branch 'dev/4.8.52.6_zsy' of qmx/jy into hotfix/v4.8.52.6

zhangsiya 1 年之前
父节点
当前提交
06c7111fac

+ 7 - 1
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()
 		}
 	})
 }
@@ -1251,7 +1257,7 @@ $(function(){
 		if($("#bidLogin").attr("data-rec")){
       $("#bidLogin").removeAttr("data-rec");
 		}
-    if(Direct.loginInfo.userInfo.result === 'ok') {
+    if(Direct.loginInfo.userInfo && Direct.loginInfo.userInfo.result === 'ok') {
       location.reload()
     }
 	});

+ 12 - 9
src/web/staticres/js/superSearch.js

@@ -35,7 +35,7 @@ $(function() {
     let selectMinPrices = $(".PriceInput [name='minprice']").val();
 		let selectMaxPrices =  $(".PriceInput [name='maxprice']").val();
     console.log(selectMinPrices,selectMaxPrices)
-    
+
     if(selectMinPrices && selectMaxPrices){
       let val = selectMinPrices+'万'+'~'+selectMaxPrices+'万'
       $('.selectorMoney .valueBox .title').text(val)
@@ -1621,7 +1621,7 @@ function distributeInit(){
         if(r.data.admin_system || r.data.admin_department){
           $('#right-distribute').show();
           $('.line-distribute').show();
-        }  
+        }
       }
     }
   })
@@ -1630,7 +1630,7 @@ function distributeInit(){
   $('#right-distribute').off('click').bind('click',function(e){
     e.stopPropagation()
     let len = $('.custom-checkbox:not(".check-all"):checked').length;
-    let checkedArea = [] 
+    let checkedArea = []
     let checked_id = []
     $('.custom-checkbox:not(".check-area"):checked').each(function(){
       if ($(this).attr('data-area')) {
@@ -1646,7 +1646,7 @@ function distributeInit(){
         person_Dialog.selectAreas = checkedArea
       }else{
         // 无地区
-        person_Dialog.selectArea = []  
+        person_Dialog.selectArea = []
       }
       person_Dialog.titleMsg = '选择接收人员' // 设置弹窗标题
       person_Dialog.searchVal = ''
@@ -1722,7 +1722,7 @@ function joinBidsClick() {
     e.stopPropagation()
     var $that = $(this)
     var checked = $(this).hasClass('checked')
-    var checkedId =  $(this).attr('dataid')   
+    var checkedId =  $(this).attr('dataid')
     if (checked) {
       toastFn('如需终止参标,需要在详情页进行操作。', 800)
     } else {
@@ -1948,10 +1948,13 @@ function getWhetherInAntiSpiderWhiteList () {
         // 延迟执行,需要等到Vue实例初始化, clear按钮事件绑定完成, whitelist内容获取完成之后在校验
         var urlSearchValue = getParam('keywords')
         if (urlSearchValue && !onAntiSpiderWhitelist) {
-          setTimeout(function () {
-            var hasCommonWords = checkAndClearTextIncludesCommonWords(searchvalue || urlSearchValue)
-            if (hasCommonWords) {
-              showToast('请输入项目名称等关键词')
+          var timer = setInterval(function () {
+            if (typeof searchInnerVue === 'object' ) {
+              clearInterval(timer)
+              var hasCommonWords = checkAndClearTextIncludesCommonWords(searchvalue || urlSearchValue)
+              if (hasCommonWords) {
+                showToast('请输入项目名称等关键词')
+              }
             }
           }, 500)
         }

+ 8 - 5
src/web/staticres/tags/js/no-login-detail.js

@@ -1079,11 +1079,14 @@ function companyAdd(){
   }
 
   function getElementLeft(element){
-    var actualLeft = element.offsetLeft;
-    var current = element.offsetParent;
-    while (current !== null){
-      actualLeft += current.offsetLeft;
-      current = current.offsetParent;
+    var actualLeft = 0
+    if(element) {
+      actualLeft = element.offsetLeft;
+      var current = element.offsetParent;
+      while (current !== null){
+        actualLeft += current.offsetLeft;
+        current = current.offsetParent;
+      }
     }
     return actualLeft;
   }

+ 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");
               }
             }