Browse Source

外链跳转代码注释

zhangqing 1 năm trước cách đây
mục cha
commit
225d0035f2
1 tập tin đã thay đổi với 12 bổ sung12 xóa
  1. 12 12
      src/router/index.js

+ 12 - 12
src/router/index.js

@@ -52,18 +52,18 @@ router.beforeEach((to, from, next) => {
           next();
         });
     } else {
-      // 判断外链并跳转
-      if (to.meta) {
-        if (to.meta.source && to.meta.source == 2) {
-          document.title = to.meta.title;
-          next({
-            path: `/sourceLink`,
-            query: { link: to.meta.path }
-          });
-          // window.open(`/sourceLink?link=${to.meta.path}`, '_blank');
-          return;
-        }
-      }
+      // 判断外链并跳转,注释停用
+      // if (to.meta) {
+      //   if (to.meta.source && to.meta.source == 2) {
+      //     document.title = to.meta.title;
+      //     next({
+      //       path: `/sourceLink`,
+      //       query: { link: to.meta.path }
+      //     });
+      //     // window.open(`/sourceLink?link=${to.meta.path}`, '_blank');
+      //     return;
+      //   }
+      // }
       // console.log(router.getRoutes(), 'router', routes);
       if (routes.length >= router.getRoutes()?.length) {
         router.addRoute(