Prechádzať zdrojové kódy

Merge branch 'master' into feature/v4.8.81

lianbingjie 1 rok pred
rodič
commit
0d31ad1b63

+ 7 - 3
src/web/staticres/css/dev2/biddingSearch.css

@@ -438,13 +438,13 @@ margin-left: 176px;
   color: #FFFFFF;
   background-color: #2cb7ca;
   border-radius:2px;
-  
-  
+
+
 }
 #searchInner .searchControl .searchTender .Price.select .Price-content span.active {
   background-color: #fff;
   background-image:url('/images/checked_.png')!important;
-  
+
 }
 
 #searchInner .searchControl .searchTender .Price .Price-content .PriceInput {
@@ -894,6 +894,10 @@ position: absolute;
 #right-export{
 	width: 100px !important;
 }
+#right-export[disabled] {
+  opacity: 0.5;
+  cursor: not-allowed;
+}
 
 #searchInner .split-line{
 	width:1px;

+ 1 - 17
src/web/staticres/js/superSearch.js

@@ -201,10 +201,6 @@ function getNewBids(pnum, size){
 			$(".pagination").hide();
 			$(".working").hide();
       $(".hasNoData").show();
-      $('#right-export').css({
-        'opacity': '0.5',
-        'cursor': 'not-allowed'
-      })
       // 隐藏页码
       searchInnerVue.showPage = false
     }
@@ -268,10 +264,6 @@ function getNewBiddings(num, size){
 			$(".pagination").hide();
 			$(".working").hide();
       $(".hasNoData").show();
-      $('#right-export').css({
-        'opacity': '0.5',
-        'cursor': 'not-allowed'
-      })
       // 隐藏页码
       searchInnerVue.showPage = false
       allCount = 0
@@ -896,10 +888,6 @@ function getVIPData(clickpaging){
 			}else{
 				$(".working").hide();
         $(".hasNoData").show();
-        $('#right-export').css({
-          'opacity': '0.5',
-          'cursor': 'not-allowed'
-        })
         // 隐藏页码
         searchInnerVue.showPage = false
 			}
@@ -1365,10 +1353,6 @@ function pcAjaxReqCallBack(r){
 		$(".pagination").hide();
 		$(".working").hide();
     $(".hasNoData").show();
-    $('#right-export').css({
-      'opacity': '0.5',
-      'cursor': 'not-allowed'
-    })
     // 隐藏页码
     searchInnerVue.showPage = false
 		submitflag=true;
@@ -1848,7 +1832,7 @@ function getEmployData () {
 // 收录操作
 $(document).on('click', '.icon-shoulu', function() {
   const id = $(this).attr('dataid')
-  const isChecked = $(this).hasClass('icon-a-Property1yishoulu') 
+  const isChecked = $(this).hasClass('icon-a-Property1yishoulu')
   const url = '/jyapi/crmApplication/employ/operate'
   const params = {
     idArr: id,

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
src/web/staticres/public-pc/js/detection-min.js


+ 51 - 11
src/web/staticres/public-pc/js/detection.js

@@ -3,9 +3,9 @@
     try {
       Sentry.init({
         dsn: "https://ea0521e5b3584ca1879b940c165916e4@jysentry.jydev.jianyu360.cn/3",
-        release: "v4.8.7910",
+        release: "v4.8.7930",
         environment: "produce",
-        sampleRate: 0.1
+        sampleRate: 0.08
       });
       Sentry.setTag("url", location.href);
       var id = document.cookie.match(/(^|;)\s*ud_safe\s*=\s*([^;]+)/);
@@ -217,11 +217,11 @@
 
   // 异常资源数组
   const failedResources = []
+  const failedResourcesMap = {}
   // 异常域名数组
   const domains = []
   // 备用域名映射
   const BackCDNs = {
-    'cdn-jybx-webtest.jydev.jianyu360.com': 'jybx-webtest.jydev.jianyu360.com',
     'cdn-ali.jianyu360.cn': 'cdn-ali.jianyu360.com',
     'cdn-ali2.jianyu360.cn': 'cdn-ali2.jianyu360.com',
     'cdn-ali3.jianyu360.cn': 'cdn-ali3.jianyu360.com',
@@ -232,8 +232,13 @@
   const BackDomains = Object.keys(BackCDNs)
 
   // 处理异常资源
-  const handleResourceError = (url) => {
+  const handleResourceError = (url, type) => {
     failedResources.push(url);
+    if (!failedResourcesMap[type]) {
+      failedResourcesMap[type] = []
+    }
+    failedResourcesMap[type].push(url)
+
     // 提取域名
     const domain = new URL(url).hostname
     if(!domains.includes(domain)) {
@@ -249,21 +254,42 @@
   window.addEventListener('error', (e) => {
     // 脚本错误、图片错误
     if(e.target.src && (e.target.tagName === 'SCRIPT' || e.target.tagName === 'IMG')) {
-      handleResourceError(e.target.src)
+      handleResourceError(e.target.src, e.target.tagName)
     }
 
     // CSS错误
     if(e.target.href && e.target.tagName === 'LINK') {
-      handleResourceError(e.target.href)
+      handleResourceError(e.target.href, e.target.tagName)
     }
   }, true)
 
   const currentTime = Date.now()
 
-  function sendError (content) {
+  function sendError (content, options) {
     if (window.Sentry && typeof window.Sentry.captureMessage === 'function') {
-      Sentry.captureMessage(content)
+      Sentry.captureMessage(content, options)
+    }
+  }
+
+  // 异常资源随机取样
+  function getRandomResourceByType () {
+    let randomData = {}
+
+    for (let type in failedResourcesMap) {
+      if (failedResourcesMap.hasOwnProperty(type)) {
+        const group = failedResourcesMap[type]
+
+        // 检查 group 是否为数组
+        if (Object.prototype.toString.call(group) === '[object Array]' && group.length > 0) {
+          const realGroup = filterErrorURL(group)
+          if (realGroup.length > 0) {
+            randomData[type] = realGroup[Math.floor(Math.random() * realGroup.length)]
+          }
+        }
+      }
     }
+
+    return randomData
   }
 
   function filterErrorURL (urls) {
@@ -284,8 +310,14 @@
   window.addEventListener('load', () => {
     // 页面完全加载完毕
     // console.log('load Failed resources:', failedResources)
-    if (failedResources.length > 0) {
-      sendError("[CDN] Has failedResources: " + filterErrorURL(failedResources).join('、'))
+    if (filterErrorURL(failedResources).length > 0) {
+      sendError(new Error('Error Resource'), {
+        level: 'info',
+        tags: getRandomResourceByType(),
+        extra: {
+          failedResources: failedResources
+        }
+      })
     }
     // console.log('load Extracted domains:', domains)
 
@@ -304,7 +336,15 @@
         })))
       })
 
-      sendError("[CDN] Has wrong cdn: " + domains.join('、'))
+      sendError(new Error('Error CDN'), {
+        level: 'info',
+        tags: filterErrorURL(domains).join('、'),
+        extra: {
+          domains: domains,
+          failedResources: failedResources
+        }
+      })
+
       addCDNDialogNode('加载中……')
 
       function stopUnlimitedReload (callback) {

+ 6 - 10
src/web/templates/pc/supsearch.html

@@ -198,10 +198,6 @@
           $(".pagination").hide();
           $(".working").hide();
           $(".hasNoData").show();
-          $('#right-export').css({
-            'opacity': '0.5',
-            'cursor': 'not-allowed'
-          })
           if(isLimit==-1){
             $("#hasNoData_tiptext>font:eq(0)").hide();
             $("#hasNoData_tiptext>font:eq(1)").show();
@@ -229,10 +225,6 @@
           $(".pagination").hide();
           $(".working").hide();
           $(".hasNoData").show();
-          $('#right-export').css({
-            'opacity': '0.5',
-            'cursor': 'not-allowed'
-          })
           if(isLimit==-1){
             $("#hasNoData_tiptext>font:eq(0)").hide();
             $("#hasNoData_tiptext>font:eq(1)").show();
@@ -1573,7 +1565,7 @@
               <button  id="right-table" :class="{'active': dataTab=='table'}" @click="onCheckTypeData('table')">表格</button>
             </template>
             <div class="split-line line-common"></div>
-            <button id="right-export" data-need-bind-phone>数据导出</button>
+            <button id="right-export" data-need-bind-phone :disabled="!canNextDataExport">数据导出</button>
             <template v-if="!inResourceBIiframe">
               <div class="split-line line-common"></div>
               <button id="bid-collect">标讯收藏</button>
@@ -3095,7 +3087,11 @@ function checkTagDisabled () {
         } else {
           return '(包含任意关键词)'
         }
-      }
+      },
+      // 是否可进行数据导出
+      canNextDataExport: function () {
+        return this.listState.allCount > 0
+      },
     },
     watch: {
       'listState.allCount': function (val) {

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov