Jelajahi Sumber

fix:采购单位画像接口调整、通讯录拨打电话处理

yangfeng 3 tahun lalu
induk
melakukan
add6ed5f7d

+ 6 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -399,7 +399,12 @@ var vNode = {
                       that.chartLoading = false;
                       that.initChartData('', res.data)
                   } else {
-                    that.getSectionChartData('a')
+                    // that.getSectionChartData('a')
+                    if (that.reqCount < 5) {
+                      that.getChartData()
+                    } else {
+                      that.chartLoading = false;
+                    }
                   }
                 }
             },

+ 8 - 2
src/web/staticres/big-member/js/unit_portrayal.js

@@ -394,11 +394,17 @@ var vNode = {
             data:storageSet ? Object.assign(data, storageSet) : data,
             success:function(res) {
                 if(res.error_code == 0) {
+                  that.reqCount++;
                   if(res.data && Object.keys(res.data).length > 0) {
                       that.chartLoading = false;
                       that.initChartData('', res.data)
                   } else {
-                    that.getSectionChartData('a')
+                    // that.getSectionChartData('a')
+                    if (that.reqCount < 5) {
+                      that.getChartData()
+                    } else {
+                      that.chartLoading = false;
+                    }
                   }
                 }
             },
@@ -415,7 +421,7 @@ var vNode = {
             url:'/bigmember/portrait/buyer/getData',
             data:{
               buyer: decodeURIComponent(utils.getParam('entName')),
-              flag: type
+              flag: type //先a再b再c
             },
             success:function(res) {
                 if(res.error_code == 0) {

+ 6 - 4
src/web/staticres/common-module/collection/js/history-project.js

@@ -153,8 +153,9 @@ var hisproComponent = {
       if(!utils.isWeiXinBrowser) {
         e.preventDefault()
         try {
-          if(tel.indexOf('、') > -1) {
-            tel = tel.split('、')[0]
+          var f = /[^\s\、,,;;./。??]+(?=[\s\、,,;;./。??])/g
+          if(tel.match(f)) {
+            tel = tel.match(f)[0]
           }
           JyObj.callPhone(tel);
         } catch (error) {
@@ -172,8 +173,9 @@ var hisproComponent = {
     },
     // 联系方式取第一个
     formatTel: function (tel) {
-      if(tel.indexOf('、') > -1) {
-        tel = tel.split('、')[0]
+      var f = /[^\s\、,,;;./。??]+(?=[\s\、,,;;./。??])/g
+      if(tel.match(f)) {
+        tel = tel.match(f)[0]
       }
       return tel
     }