ソースを参照

fix:常用功能锚点滚动定位、画像中转路由参数

yangfeng 2 年 前
コミット
188f47c5d0

+ 2 - 2
src/router/router-interceptors.js

@@ -72,7 +72,7 @@ router.beforeEach(async (to, from, next) => {
       // 大会员有画像权限用户,访问超级订阅画像,则重定向到大会员画像
       if (to.name === 'ent_ser_portrait') {
         next({
-          path: `/ent_portrait/${to.params.eId}`,
+          path: `/ent_portrait/${encodeURIComponent(to.params.eId)}`,
           replace: true,
           query: {
             // ?ismedical=1
@@ -86,7 +86,7 @@ router.beforeEach(async (to, from, next) => {
       if (to.name === 'ent_portrait') {
         // 其他无画像权限用户,访问大会员画像,则重定向到超级订阅画像
         next({
-          path: `/svip/ent_ser_portrait/${to.params.eId}`,
+          path: `/svip/ent_ser_portrait/${encodeURIComponent(to.params.eId)}`,
           replace: true
         })
       } else {

+ 1 - 1
src/views/portrayal/Loading.vue

@@ -25,7 +25,7 @@ export default {
   },
   created () {
     this.type = this.$route.params.type // ent企业画像 buyer采购单位画像
-    this.params = this.$route.params.params // 企业画像id 或 采购单位名称
+    this.params = encodeURIComponent(this.$route.params.params) // 企业画像id 或 采购单位名称
     this.position = this.$route.query?.position // 定位到画像哪个模块
   },
   mounted () {

+ 1 - 1
src/views/workspace/components/CommonUse.vue

@@ -349,7 +349,7 @@ export default {
         const scrollItemTop = this.getOffsetTop(scrollItems[i])
         // 判断滚动条滚动距离是否大于当前滚动项可滚动距离
         const judge =
-          e.target.scrollTop >= scrollItemTop
+          e.target.scrollTop >= scrollItemTop - 70 - 48 - 60
         if (judge) {
           this.tabActive = i
           break