diff --git a/public/cropped.svg b/public/cropped.svg
new file mode 100644
index 0000000..b8ea92a
--- /dev/null
+++ b/public/cropped.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/public/intopagedir.svg b/public/intopagedir.svg
new file mode 100644
index 0000000..61ab18d
--- /dev/null
+++ b/public/intopagedir.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/Start.vue b/src/Start.vue
index 63cf316..c768dca 100644
--- a/src/Start.vue
+++ b/src/Start.vue
@@ -1,9 +1,11 @@
-
+
+
+
diff --git a/src/components/ServiceProcess.vue b/src/components/ServiceProcess.vue
index b59547b..24f7727 100644
--- a/src/components/ServiceProcess.vue
+++ b/src/components/ServiceProcess.vue
@@ -48,13 +48,6 @@ const { breakpoint } = useBootstrapBreakpoint();
-
-
-
-
-
-
-
diff --git a/src/components/Tools/MobileToolbar.vue b/src/components/Tools/MobileToolbar.vue
index ff6a35a..2005d9b 100644
--- a/src/components/Tools/MobileToolbar.vue
+++ b/src/components/Tools/MobileToolbar.vue
@@ -6,7 +6,7 @@ import FooterContent from './FooterContent.vue'
-
+
{
+ // 如果直接访问 /index.html,重定向到根路径的 start.html
+ if (window.location.pathname === '/index.html') {
+ window.location.href = '/';
+ return '/';
+ }
+ // 否则渲染 Homepage 组件
+ return { name: 'Homepage' };
+ }
+ },
+ {
+ path: '/Homepage',
name: 'Homepage',
component: ()=>import('./components/Homepage.vue'),
meta: { title: 'KDESIGN - 首页' }
diff --git a/src/startRouter.js b/src/startRouter.js
new file mode 100644
index 0000000..c650851
--- /dev/null
+++ b/src/startRouter.js
@@ -0,0 +1,32 @@
+import { createRouter, createWebHistory } from 'vue-router'
+import HeaderVideo from './components/HeaderVideo.vue'
+
+const routes = [
+ {
+ path: '/',
+ name: 'StartPage',
+ component: HeaderVideo,
+ meta: { title: 'KDESIGN - 欢迎' }
+ },
+ {
+ path: '/:pathMatch(.*)*',
+ redirect: to => {
+ window.location.href = `/index.html${to.fullPath}`
+ return '/'
+ }
+ }
+]
+
+const router = createRouter({
+ history: createWebHistory(),
+ routes
+})
+
+router.beforeEach((to, from, next) => {
+ if (to.meta && to.meta.title) {
+ document.title = to.meta.title
+ }
+ next()
+})
+
+export default router
diff --git a/start.html b/start.html
index 3dfe538..d948392 100644
--- a/start.html
+++ b/start.html
@@ -1,24 +1,34 @@
-
-
+
KDesign - 欢迎光临
-
-
-
-
+
+
+
diff --git a/vite.config.js b/vite.config.js
index aab632f..f95c21b 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,15 +1,44 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
-
-// https://vitejs.dev/config/
+import fs from 'fs'
export default defineConfig({
- plugins: [vue()],
+ plugins: [
+ vue(),
+ // 添加自定义中间件来处理根路径
+ {
+ name: 'configure-server',
+ configureServer(server) {
+ server.middlewares.use((req, res, next) => {
+ if (req.url === '/' || req.url === '/index.html') {
+ // 读取start.html的内容并发送
+ const startHtml = fs.readFileSync(
+ fileURLToPath(new URL('./start.html', import.meta.url)),
+ 'utf-8'
+ );
+ res.statusCode = 200;
+ res.setHeader('Content-Type', 'text/html');
+ res.end(startHtml);
+ return;
+ }
+ next();
+ });
+ }
+ }
+ ],
server: {
host: '0.0.0.0',
port: 3992
},
+ build: {
+ rollupOptions: {
+ input: {
+ main: fileURLToPath(new URL('./index.html', import.meta.url)),
+ start: fileURLToPath(new URL('./start.html', import.meta.url))
+ }
+ }
+ },
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))