fix(router, plants): 调整路由模式和帮助引导描述
将路由模式改为hash模式适配nginx静态托管,修改帮助步骤中的进入平台按钮描述
This commit is contained in:
1 parent
9ddecbdb9a
commit
ce4e5f4c1f
2 files changed
+5
-4
No files matched your search
+4
-3
@@ -1,4 +1,4 @@
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
import { createRouter, createWebHashHistory } from "vue-router";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,8 @@ const routes = [
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
// hash 模式:`#` 后的路径不会发往服务器,nginx 静态托管下刷新不会 404
|
||||
history: createWebHashHistory(),
|
||||
routes,
|
||||
});
|
||||
|
||||
@@ -73,7 +74,7 @@ router.beforeEach((to, _from, next) => {
|
||||
|
||||
// 已登录用户访问登录页时重定向到首页
|
||||
if (to.name === "Login" && userStore.token) {
|
||||
next({ name: "Portal" });
|
||||
next({ name: "Plants" });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ const OPERATOR_OPTIONS = ["全部", "国网", "南网"];
|
||||
const helpSteps = [
|
||||
{ title: "查找平台", description: "可按国网、南网筛选,或搜索电厂名称与区域。" },
|
||||
{ title: "选择电厂", description: "点击电厂卡片,当前选择会显示在页面底部。" },
|
||||
{ title: "进入平台", description: '点击"进入虚拟电厂",使用统一身份安全接入。' },
|
||||
{ title: "进入平台", description: "点击底部进入按钮,使用统一身份安全接入。" },
|
||||
];
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
Reference in new issue
Block a user