From 5a537dd66e8722547dd54246b47c4013de31249c Mon Sep 17 00:00:00 2001 From: zwq Date: Thu, 10 Aug 2023 10:20:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 4 +- src/router/index.js | 39 ++++---- src/utils/request.js | 4 +- src/views/main-navbar.vue | 6 +- src/views/modules/bottomInfo.vue | 138 ++++++++++++++++---------- src/views/modules/ceshi1.vue | 6 +- src/views/modules/echart1.vue | 24 ++--- src/views/modules/main.vue | 164 ++++++++++++++++++++++++++----- src/views/pages/404.vue | 9 +- src/views/pages/login.vue | 2 +- 10 files changed, 274 insertions(+), 122 deletions(-) diff --git a/public/index.html b/public/index.html index 8fb3a56..7267c6b 100644 --- a/public/index.html +++ b/public/index.html @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2022-08-22 14:57:50 * @LastEditors: zwq - * @LastEditTime: 2023-06-02 10:02:23 + * @LastEditTime: 2023-08-07 16:11:40 * @Description: --> @@ -58,7 +58,7 @@ <% if (process.env.VUE_APP_NODE_ENV === 'prod') { %> <% } %> diff --git a/src/router/index.js b/src/router/index.js index bf4276d..a00ef6b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2023-01-04 10:29:39 * @LastEditors: zwq - * @LastEditTime: 2023-05-31 11:00:34 + * @LastEditTime: 2023-08-08 09:19:20 * @Description: */ import Vue from 'vue' @@ -37,7 +37,7 @@ export const moduleRoutes = { path: '/', component: () => import('@/views/main'), name: 'main', - redirect: { name: 'home' }, + redirect: { name: 'main' }, meta: { title: '主入口布局' }, children: [ { path: '/home', component: () => import('@/views/modules/home'), name: 'home', meta: { title: '首页', isTab: true } }, @@ -86,24 +86,25 @@ router.beforeEach((to, from, next) => { return next() } // 获取字典列表, 添加并全局变量保存 - http.get('/sys/dict/type/all').then(({ data: res }) => { - if (res.code !== 0) { - return - } - window.SITE_CONFIG['dictList'] = res.data - }).catch(() => {}) + // http.get('/sys/dict/type/all').then(({ data: res }) => { + // if (res.code !== 0) { + // return + // } + // window.SITE_CONFIG['dictList'] = res.data + // }).catch(() => {}) // 获取菜单列表, 添加并全局变量保存 - http.get('/sys/menu/nav').then(({ data: res }) => { - if (res.code !== 0) { - Vue.prototype.$message.error(res.msg) - return next({ name: 'main' }) - } - window.SITE_CONFIG['menuList'] = res.data - fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList']) - next({ ...to, replace: true }) - }).catch(() => { - next({ name: 'main' }) - }) + // http.get('/sys/menu/nav').then(({ data: res }) => { + // if (res.code !== 0) { + // Vue.prototype.$message.error(res.msg) + // return next({ name: 'main' }) + // } + // window.SITE_CONFIG['menuList'] = res.data + // fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList']) + // next({ ...to, replace: true }) + // }).catch(() => { + // next({ name: 'main' }) + // }) + next({ name: 'main' }) }) /** diff --git a/src/utils/request.js b/src/utils/request.js index d0c4115..657b5f7 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2023-01-04 10:29:39 * @LastEditors: zwq - * @LastEditTime: 2023-06-01 09:23:35 + * @LastEditTime: 2023-08-07 15:44:58 * @Description: */ import axios from 'axios' @@ -62,7 +62,7 @@ http.interceptors.request.use(config => { http.interceptors.response.use(response => { if (response.data.code === 401 || response.data.code === 10001) { clearLoginInfo() - router.replace({ name: 'ceshi' }) + router.replace({ name: 'main' }) return Promise.reject(response.data.msg) } return response diff --git a/src/views/main-navbar.vue b/src/views/main-navbar.vue index e8dcae0..755e535 100644 --- a/src/views/main-navbar.vue +++ b/src/views/main-navbar.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2022-08-22 14:57:51 * @LastEditors: zwq - * @LastEditTime: 2023-02-28 15:17:13 + * @LastEditTime: 2023-08-07 15:46:06 * @Description: -->