From d73bef3b9648469392b527f999b736ba2e83bbf7 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Thu, 08 Sep 2022 16:32:49 +0800
Subject: [PATCH] lct
---
.env.development | 6 +++---
src/layout/navBars/breadcrumb/user.vue | 8 +++++++-
src/utils/setIconfont.ts | 2 +-
src/router/index.ts | 2 ++
4 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/.env.development b/.env.development
index 9feecc6..d739dab 100644
--- a/.env.development
+++ b/.env.development
@@ -1,10 +1,10 @@
# 本地环境
ENV = 'development'
-#VITE_API_URL = 'http://192.168.0.35:8008'
+VITE_API_URL = 'http://192.168.0.35:8008'
#李宇飞接口地址
-VITE_API_URL = 'http://192.168.0.50:8008'
+#VITE_API_URL = 'http://192.168.0.50:8008'
#张凤接口地址
#VITE_API_URL = 'http://192.168.0.29:8008'
@@ -35,7 +35,7 @@
#VITE_API_URL = 'http://192.168.0.52:7021/safeplatform'
#本地测试接口地址
-#VITE_API_URL_SOCKET = 'http://192.168.0.52:7021/safeplatform'
+VITE_API_URL_SOCKET = 'http://192.168.0.52:7021/safeplatform'
#本地测试websocket接口地址
#VITE_API_URL = 'http://192.168.0.29:7008'
diff --git a/src/layout/navBars/breadcrumb/user.vue b/src/layout/navBars/breadcrumb/user.vue
index 5a26dde..06157c4 100644
--- a/src/layout/navBars/breadcrumb/user.vue
+++ b/src/layout/navBars/breadcrumb/user.vue
@@ -101,6 +101,7 @@
import { useRequestOldRoutes } from '/@/stores/requestOldRoutes';
import { dynamicRoutes } from '/@/router/route';
import Cookies from 'js-cookie';
+import {useRoutesList} from "/@/stores/routesList";
export default defineComponent({
name: 'layoutBreadcrumbUser',
@@ -110,6 +111,7 @@
const { proxy } = <any>getCurrentInstance();
const router = useRouter();
const stores = useUserInfo();
+ const routeList = storeToRefs(useRoutesList())
const storesThemeConfig = useThemeConfig();
const { userInfos } = storeToRefs(stores);
const { themeConfig } = storeToRefs(storesThemeConfig);
@@ -261,7 +263,11 @@
}
};
const backToMenu = () => {
- router.push({ path: 'newMenu' });
+ router.push({ path: 'newMenu' }).then(()=>{
+ debugger
+ routeList.routesList.value = []
+ console.log(routeList);
+ });
};
// 页面加载时
onMounted(() => {
diff --git a/src/router/index.ts b/src/router/index.ts
index 11ec534..b49ba96 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -66,6 +66,7 @@
// 路由加载前
router.beforeEach(async (to, from, next) => {
+ debugger
if (to.path === '/intelligentLine') {
next();
} else {
@@ -87,6 +88,7 @@
const storesRoutesList = useRoutesList(pinia);
const { routesList } = storeToRefs(storesRoutesList);
if (routesList.value.length === 0) {
+
// 后端控制路由:路由数据初始化,防止刷新时丢失
await initBackEndControlRoutes();
// 动态添加路由:防止非首页刷新时跳转回首页的问题
diff --git a/src/utils/setIconfont.ts b/src/utils/setIconfont.ts
index a6acf68..b048dc8 100644
--- a/src/utils/setIconfont.ts
+++ b/src/utils/setIconfont.ts
@@ -1,7 +1,7 @@
// 字体图标 url
const cssCdnUrlList: Array<string> = [
'//at.alicdn.com/t/font_2298093_y6u00apwst.css',
- '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
+ // '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
];
// 第三方 js url
const jsCdnUrlList: Array<string> = [];
--
Gitblit v1.9.2