feat: 修改平台信息

This commit is contained in:
NiceAsiv 2024-08-08 16:42:21 +08:00
parent c0f3dcbbb7
commit adc385edca
9 changed files with 42 additions and 107 deletions

View File

@ -1,43 +1,5 @@
// 模拟后端动态生成路由 // 模拟后端动态生成路由
import { defineFakeRoute } from "vite-plugin-fake-server/client"; import { defineFakeRoute } from "vite-plugin-fake-server/client";
/**
* roles "admin""common"
* admin
* common
*/
const permissionRouter = {
path: "/permission",
meta: {
title: "权限管理",
icon: "ep:lollipop",
rank: 10
},
children: [
{
path: "/permission/page/index",
name: "PermissionPage",
meta: {
title: "页面权限",
roles: ["admin", "common"]
}
},
{
path: "/permission/button/index",
name: "PermissionButton",
meta: {
title: "按钮权限",
roles: ["admin", "common"],
auths: [
"permission:btn:add",
"permission:btn:edit",
"permission:btn:delete"
]
}
}
]
};
export default defineFakeRoute([ export default defineFakeRoute([
{ {
url: "/get-async-routes", url: "/get-async-routes",
@ -45,7 +7,7 @@ export default defineFakeRoute([
response: () => { response: () => {
return { return {
success: true, success: true,
data: [permissionRouter] data: []
}; };
} }
} }

View File

@ -10,9 +10,9 @@ export default defineFakeRoute([
return { return {
success: true, success: true,
data: { data: {
avatar: "https://avatars.githubusercontent.com/u/44761321", avatar: "https://avatars.githubusercontent.com/u/70969752?v=4",
username: "admin", username: "admin",
nickname: "小铭", nickname: "NiceAsiv",
// 一个用户可能有多个角色 // 一个用户可能有多个角色
roles: ["admin"], roles: ["admin"],
accessToken: "eyJhbGciOiJIUzUxMiJ9.admin", accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",

View File

@ -1,6 +1,6 @@
{ {
"Version": "5.7.0", "Version": "1.0.0",
"Title": "PureAdmin", "Title": "安全赋能平台",
"FixedHeader": true, "FixedHeader": true,
"HiddenSideBar": false, "HiddenSideBar": false,
"MultiTagsCache": false, "MultiTagsCache": false,
@ -11,7 +11,7 @@
"OverallStyle": "light", "OverallStyle": "light",
"Grey": false, "Grey": false,
"Weak": false, "Weak": false,
"HideTabs": false, "HideTabs": true,
"HideFooter": false, "HideFooter": false,
"Stretch": false, "Stretch": false,
"SidebarStatus": true, "SidebarStatus": true,

View File

@ -8,7 +8,7 @@ const TITLE = getConfig("Title");
<footer <footer
class="layout-footer text-[rgba(0,0,0,0.6)] dark:text-[rgba(220,220,242,0.8)]" class="layout-footer text-[rgba(0,0,0,0.6)] dark:text-[rgba(220,220,242,0.8)]"
> >
Copyright © 2020-present Copyright © 2024 XJTU Open Source Team
<a <a
class="hover:text-primary" class="hover:text-primary"
href="https://github.com/pure-admin" href="https://github.com/pure-admin"

View File

@ -0,0 +1,23 @@
// src/router/modules/dashboard.ts
export default {
path: "/",
name: "Dashbroad",
redirect: "/dashboard/index",
meta: {
icon: "ri:dashboard-line",
title: "仪表盘",
rank: 0
},
component: () => import("@/layout/index.vue"),
children: [
{
path: "/dashboard/index",
name: "DashbroadIndex",
component: () => import("@/views/dashboard/index.vue"),
meta: {
title: "仪表盘首页",
showLink: true
}
}
]
} satisfies RouteConfigsTable;

View File

@ -1,36 +0,0 @@
export default {
path: "/error",
redirect: "/error/403",
meta: {
icon: "ri:information-line",
// showLink: false,
title: "异常页面",
rank: 9
},
children: [
{
path: "/error/403",
name: "403",
component: () => import("@/views/error/403.vue"),
meta: {
title: "403"
}
},
{
path: "/error/404",
name: "404",
component: () => import("@/views/error/404.vue"),
meta: {
title: "404"
}
},
{
path: "/error/500",
name: "500",
component: () => import("@/views/error/500.vue"),
meta: {
title: "500"
}
}
]
} satisfies RouteConfigsTable;

View File

@ -1,25 +0,0 @@
const { VITE_HIDE_HOME } = import.meta.env;
const Layout = () => import("@/layout/index.vue");
export default {
path: "/",
name: "Home",
component: Layout,
redirect: "/welcome",
meta: {
icon: "ep:home-filled",
title: "首页",
rank: 0
},
children: [
{
path: "/welcome",
name: "Welcome",
component: () => import("@/views/welcome/index.vue"),
meta: {
title: "首页",
showLink: VITE_HIDE_HOME === "true" ? false : true
}
}
]
} satisfies RouteConfigsTable;

View File

@ -0,0 +1,11 @@
<script setup lang="ts"></script>
<template>
<div>
<h1>软件安全赋能平台</h1>
</div>
</template>
<style scoped lang="scss">
/* Add your styles here */
</style>

View File

@ -5,5 +5,5 @@ defineOptions({
</script> </script>
<template> <template>
<h1>Pure-Admin-Thin非国际化版本</h1> <h1>软件安全赋能平台</h1>
</template> </template>