Browse Source

测试跳转,并弹框登录后重试隐藏

ming 3 years ago
parent
commit
70ff1d683a
2 changed files with 15 additions and 8 deletions
  1. 7 7
      src/main.js
  2. 8 1
      src/views/index.vue

+ 7 - 7
src/main.js

@@ -20,7 +20,7 @@ import * as echarts from 'echarts'
 import 'echarts/lib/component/tooltip';
 import 'echarts/lib/component/title';
 import 'echarts/lib/component/legend';
-import { ElMessage } from "element-plus";
+// import { ElMessage } from "element-plus";
 import { removeToken } from './utils/auth';
 
 const app = createApp(App);
@@ -52,12 +52,12 @@ router.beforeEach((to, from, next) => {
         if (sessionStorage.getItem('userInfo') === null) {
             next({ path: '/' })
             document.getElementById('routers').style.display = "none"
-            setTimeout(() => {
-                ElMessage.warning({
-                    message: '请登录后重试!',
-                    type: 'warning'
-                });
-            }, 100);
+                // setTimeout(() => {
+                //     ElMessage.warning({
+                //         message: '请登录后重试!',
+                //         type: 'warning'
+                //     });
+                // }, 100);
 
         } else {
             next();

+ 8 - 1
src/views/index.vue

@@ -20,7 +20,14 @@
           >后台管理</a
         >
 
-        <!-- <router-link  class="router-left router_left1" to="https://www.baidu.com/"></router-link> -->
+        <!-- <a
+          :href="'http://localhost:9999/#/login?userName=admin'"
+          target="_blank"
+          class="router-left router_left1"
+          >后台管理</a
+        > -->
+
+
       </div>
       <!-- 主页路由菜单 结束 -->
       <!-- 站点路由菜单 开始 -->