Bläddra i källkod

Merge branch 'dev/v4.9.6_cyl' of qmx/jy into feature/v4.9.6

cuiyalong 1 år sedan
förälder
incheckning
72a09025d9

+ 16 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -229,6 +229,13 @@ var vNode = {
     window.addEventListener('resize', function () {
       _this.getStickyTop()
     })
+
+    if (!this.restore) {
+      // 如果走缓存返回的,则不定位tab
+      setTimeout(() => {
+        _this.restoreTab()
+      }, 200)
+    }
   },
   beforeUpdate: function () {
     // console.log($('.win-analyse').length)
@@ -337,6 +344,15 @@ var vNode = {
     }
   },
   methods: {
+    restoreTab: function() {
+      var tab = utils.getParam('tab') || ''
+      if (tab) {
+        this.scrollToTab(tab)
+      }
+    },
+    scrollToTab: function (tabName) {
+      this.$refs.scrollspyTabs.scrollTo(tabName)
+    },
     getShareParams () {
       this.entParams = {
         type: '4',

+ 15 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -308,6 +308,12 @@ var vNode = {
           sessionStorage.removeItem('is-click-set')
         }, 100)
       }
+      if (!this.restore) {
+        // 如果走缓存返回的,则不定位tab
+        setTimeout(() => {
+          _this.restoreTab()
+        }, 200)
+      }
     }
   },
   created () {
@@ -345,6 +351,15 @@ var vNode = {
     window.removeEventListener("resize", this.init, 20);
   },
   methods: {
+    restoreTab: function() {
+      var tab = utils.getParam('tab') || ''
+      if (tab) {
+        this.scrollToTab(tab)
+      }
+    },
+    scrollToTab: function (tabName) {
+      this.$refs.scrollspyTabs.scrollTo(tabName)
+    },
     getStickyTop: function () {
       this.stickyTop = $('.j-header.jy-app-header').outerHeight()
     },

+ 16 - 0
src/web/staticres/big-member/js/ent_portrait.js

@@ -134,6 +134,13 @@ var vNode = {
             }, 0)
         }
 
+        if (!this.restore) {
+            // 如果走缓存返回的,则不定位tab
+            setTimeout(() => {
+              _this.restoreTab()
+            }, 200)
+        }
+
         window.addEventListener('resize', function() {
             _this.getStickyTop()
         })
@@ -171,6 +178,15 @@ var vNode = {
         },
     },
     methods: {
+        restoreTab: function() {
+            var tab = utils.getParam('tab') || ''
+            if (tab) {
+                this.scrollToTab(tab)
+            }
+        },
+        scrollToTab: function (tabName) {
+            this.$refs.scrollspyTabs.scrollTo(tabName)
+        },
         showToast: function (message) {
             this.$toast({
                 duration: 1500,

+ 15 - 0
src/web/staticres/big-member/js/unit_portrayal.js

@@ -301,6 +301,12 @@ var vNode = {
                 sessionStorage.removeItem('is-click-set')
             }, 100)
         }
+        if (!this.restore) {
+          // 如果走缓存返回的,则不定位tab
+          setTimeout(() => {
+            _this.restoreTab()
+          }, 200)
+        }
       }
     },
     created () {
@@ -324,6 +330,15 @@ var vNode = {
       window.removeEventListener("resize", this.init,20);
     },
     methods: {
+      restoreTab: function() {
+        var tab = sea.getParam('tab') || ''
+        if (tab) {
+          this.scrollToTab(tab)
+        }
+      },
+      scrollToTab: function (tabName) {
+        this.$refs.scrollspyTabs.scrollTo(tabName)
+      },
       getStickyTop: function () {
           // this.stickyTop = $('.j-header.jy-app-header').outerHeight()
       },

+ 15 - 0
src/web/staticres/common-module/big-member/js/client_portrayal.js

@@ -280,6 +280,12 @@ var vNode = {
           sessionStorage.removeItem('is-click-set')
         }, 100)
       }
+      if (!this.restore) {
+        // 如果走缓存返回的,则不定位tab
+        setTimeout(() => {
+          _this.restoreTab()
+        }, 200)
+      }
     }
   },
   created () {
@@ -312,6 +318,15 @@ var vNode = {
     window.removeEventListener("resize", this.init,20);
   },
   methods: {
+      restoreTab: function() {
+        var tab = utils.getParam('tab') || ''
+        if (tab) {
+          this.scrollToTab(tab)
+        }
+      },
+      scrollToTab: function (tabName) {
+        this.$refs.scrollspyTabs.scrollTo(tabName)
+      },
       getStickyTop: function () {
         if (utils.isWeiXinBrowser) {
           // do something

+ 15 - 0
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -225,6 +225,12 @@ var vNode = {
     window.addEventListener('resize', function () {
       _this.getStickyTop()
     })
+    if (!this.restore) {
+      // 如果走缓存返回的,则不定位tab
+      setTimeout(() => {
+        _this.restoreTab()
+      }, 200)
+    }
   },
   beforeUpdate: function(){
     // console.log($('.win-analyse').length)
@@ -336,6 +342,15 @@ var vNode = {
     }
   },
   methods: {
+    restoreTab: function() {
+      var tab = utils.getParam('tab') || ''
+      if (tab) {
+        this.scrollToTab(tab)
+      }
+    },
+    scrollToTab: function (tabName) {
+      this.$refs.scrollspyTabs.scrollTo(tabName)
+    },
     getShareParams () {
       this.entParams = {
         type: '4',