diff --git a/.env.development b/.env.development index f2c5228..6fd3f94 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ # 页面标题 -VITE_APP_TITLE = 天择管理系统 +VITE_APP_TITLE = 数字营销实训系统 # 开发环境配置 VITE_APP_ENV = 'development' diff --git a/.env.production b/.env.production index df88d43..3a89bcf 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ # 页面标题 -VITE_APP_TITLE = 天择管理系统 +VITE_APP_TITLE = 数字营销实训系统 # 生产环境配置 VITE_APP_ENV = 'production' diff --git a/.env.staging b/.env.staging index 85e93f9..bf38116 100644 --- a/.env.staging +++ b/.env.staging @@ -1,5 +1,5 @@ # 页面标题 -VITE_APP_TITLE = 天择管理系统 +VITE_APP_TITLE = 数字营销实训系统 # 生产环境配置 VITE_APP_ENV = 'staging' diff --git a/index.html b/index.html index d2fa440..fc34704 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ - 天择管理系统 + 数字营销实训系统 \ No newline at end of file + diff --git a/src/permission.js b/src/permission.js index ac364ca..d6209bf 100644 --- a/src/permission.js +++ b/src/permission.js @@ -13,21 +13,21 @@ NProgress.configure({ showSpinner: false }); const whiteList = ['/login', '/register']; -router.beforeEach((to, from, next) => { - NProgress.start() - if (!getToken()) { - next() - } else { - // 没有token - if (whiteList.indexOf(to.path) !== -1) { - // 在免登录白名单,直接进入 - next() - } else { - next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 - // NProgress.done() - } - } -}) +// router.beforeEach((to, from, next) => { +// NProgress.start() +// if (!getToken()) { +// next() +// } else { +// // 没有token +// if (whiteList.indexOf(to.path) !== -1) { +// // 在免登录白名单,直接进入 +// next() +// } else { +// next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 +// // NProgress.done() +// } +// } +// }) router.afterEach(() => { NProgress.done() diff --git a/src/router/index.js b/src/router/index.js index 0058bef..90161b6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,6 +1,6 @@ -import { createWebHistory, createRouter } from 'vue-router' +import { createWebHistory, createRouter } from "vue-router"; /* Layout */ -import Layout from '@/layout' +import Layout from "@/layout"; /** * Note: 路由配置项 @@ -27,64 +27,88 @@ import Layout from '@/layout' // 公共路由 export const constantRoutes = [ { - path: '/redirect', + path: "/redirect", component: Layout, hidden: true, children: [ { - path: '/redirect/:path(.*)', - component: () => import('@/views/redirect/index.vue') - } - ] + path: "/redirect/:path(.*)", + component: () => import("@/views/redirect/index.vue"), + }, + ], }, { - path: '/login', - component: () => import('@/views/login'), - hidden: true + path: "/login", + component: () => import("@/views/login"), + hidden: true, }, { - path: '/register', - component: () => import('@/views/register'), - hidden: true + path: "/register", + component: () => import("@/views/register"), + hidden: true, }, { path: "/:pathMatch(.*)*", - component: () => import('@/views/error/404'), - hidden: true + component: () => import("@/views/error/404"), + hidden: true, + }, + { + path: "/401", + component: () => import("@/views/error/401"), + hidden: true, + }, + { + path: "", + component: Layout, + redirect: "/index", + children: [ + { + path: "/index", + component: () => import("@/views/index"), + name: "Index", + meta: { title: "首页", icon: "dashboard", affix: true }, + }, + ], }, { - path: '/401', - component: () => import('@/views/error/401'), - hidden: true + path: "", + component: Layout, + redirect: "/digitalMarketAlgorithm", + children: [ + { + path: "/digitalMarketAlgorithm", + component: () => import("@/views/digitalMarketAlgorithm/index"), + name: "digitalMarketAlgorithm", + meta: { title: "数字营销算法", icon: "dashboard", affix: true }, + }, + ], }, { - path: '', + path: "", component: Layout, - redirect: '/index', + redirect: "/digitalMarketTech", children: [ { - path: '/index', - component: () => import('@/views/index'), - name: 'Index', - meta: { title: '首页', icon: 'dashboard', affix: true } - } - ] + path: "/digitalMarketTech", + component: () => import("@/views/digitalMarketTech/index"), + name: "digitalMarketTech", + meta: { title: "数字营销技术", icon: "dashboard", affix: true }, + }, + ], }, - -] +]; // 动态路由,基于用户权限动态去加载 -export const dynamicRoutes = [ -] +export const dynamicRoutes = []; const router = createRouter({ history: createWebHistory(), routes: constantRoutes, scrollBehavior(to, from, savedPosition) { if (savedPosition) { - return savedPosition + return savedPosition; } else { - return { top: 0 } + return { top: 0 }; } }, }); diff --git a/src/views/digitalMarketAlgorithm/index.vue b/src/views/digitalMarketAlgorithm/index.vue new file mode 100644 index 0000000..7bb9be9 --- /dev/null +++ b/src/views/digitalMarketAlgorithm/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/views/digitalMarketTech/index.vue b/src/views/digitalMarketTech/index.vue new file mode 100644 index 0000000..d16525d --- /dev/null +++ b/src/views/digitalMarketTech/index.vue @@ -0,0 +1,12 @@ + + + + + + diff --git a/src/views/index.vue b/src/views/index.vue index 5100048..f4887c7 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,1018 +1,410 @@ - -