Преглед на файлове

fix:企业画像loading加载问题

yangfeng преди 3 години
родител
ревизия
0c1bf83682

+ 8 - 11
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -331,7 +331,6 @@ var vNode = {
     // 获取画像信息
     getEntPortrait: function (callback) {
       var storageSet = JSON.parse(sessionStorage.getItem('winner_high_set'))
-      // if (!storageSet) return
       var _this = this
       var data = {
         entId: _this.entInfo.id
@@ -354,11 +353,6 @@ var vNode = {
       } else {
         urls = '/bigmember/portrait/subVipPortrait/winner'
       }
-      // if (_this.powerInfo.memberStatus <= 0 || _this.svip || _this.isVip) {
-      //   urls = '/bigmember/portrait/subVipPortrait/winner'
-      // } else {
-      //   urls = '/bigmember/portrait/winner/getData'
-      // }
       _this.getEntPortraitInfoTimes++
       $.ajax({
         type: 'POST',
@@ -388,7 +382,7 @@ var vNode = {
               }
             }
           } else {
-            _this.loading.clear()
+            _this.$toast(res.error_msg)
             _this.show.yearData = false
             _this.show.monthData = false
             _this.show.areaData = false
@@ -399,6 +393,7 @@ var vNode = {
         },
         error: function (error) {
           // _this.$toast('请求失败')
+          _this.loading.clear()
         }
       })
     },
@@ -448,7 +443,6 @@ var vNode = {
     // 获取项目动态
     getProjectNews: function () {
       var storageSet = JSON.parse(sessionStorage.getItem('winner_high_set'))
-      // if (!storageSet) return
       var _this = this
       var data = {
         entId: _this.entInfo.id,
@@ -477,13 +471,13 @@ var vNode = {
               _this.topProject.list = res.data.list
             }
           } else {
-            // _this.$toast(res.error_msg)
-            _this.loading.clear()
+            _this.$toast(res.error_msg)
             _this.show.dt = false
           }
         },
         error: function (error) {
           // _this.$toast('请求失败')
+          _this.loading.clear()
         }
       })
     },
@@ -513,11 +507,12 @@ var vNode = {
             }
           } else {
             // 不显示提示信息
-            // _this.$toast(res.error_msg)
+            _this.$toast(res.error_msg)
           }
         },
         error: function (error) {
           console.log(error)
+          _this.loading.clear()
         }
       })
     },
@@ -633,6 +628,7 @@ var vNode = {
         },
         error: function (error) {
           console.log(error)
+          _this.loading.clear()
         }
       })
     },
@@ -669,6 +665,7 @@ var vNode = {
         },
         error: function (error) {
           console.log(error)
+          loading.clear()
         }
       })
     },

+ 7 - 9
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -393,7 +393,7 @@ var vNode = {
               }
             }
           } else {
-            _this.loading.clear()
+            _this.$toast(res.error_msg)
             _this.show.yearData = false
             _this.show.monthData = false
             _this.show.areaData = false
@@ -403,7 +403,7 @@ var vNode = {
           }
         },
         error: function (error) {
-          // _this.$toast('请求失败')
+          _this.loading.clear()
         }
       })
     },
@@ -450,7 +450,6 @@ var vNode = {
     // 获取项目动态
     getProjectNews: function () {
       var storageSet = JSON.parse(sessionStorage.getItem('winner_high_set'))
-      // if (!storageSet) return
       var _this = this
       var data = {
         entId: _this.entInfo.id,
@@ -479,13 +478,12 @@ var vNode = {
               _this.topProject.list = res.data.list
             }
           } else {
-            // _this.$toast(res.error_msg)
-            _this.loading.clear()
+            _this.$toast(res.error_msg)
             _this.show.dt = false
           }
         },
         error: function (error) {
-          // _this.$toast('请求失败')
+          _this.loading.clear()
         }
       })
     },
@@ -522,11 +520,11 @@ var vNode = {
             }
           } else {
             // 不显示提示信息
-            // _this.$toast(res.error_msg)
+            _this.$toast(res.error_msg)
           }
         },
         error: function (error) {
-          console.log(error)
+          _this.loading.clear()
         }
       })
     },
@@ -641,7 +639,7 @@ var vNode = {
           }
         },
         error: function (error) {
-          console.log(error)
+          _this.loading.clear()
         }
       })
     },