From 7a7914bfa493afb0d716478097af26eff07fa8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=95=8A=E5=95=8A=E5=95=8A=E9=94=8B=E5=AD=90=E9=98=BF?= Date: Sat, 18 Feb 2023 18:03:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E5=92=8C=E5=85=8D=E8=B4=A3=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 8 +-- src/App.vue | 4 +- src/main.ts | 3 +- src/router/index.ts | 27 ++++++++ src/views/Layout.vue | 23 +------ src/views/Page2/Page2.vue | 17 ----- src/views/agreement/disclaimer.vue | 99 ++++++++++++++++++++++++++++++ src/views/agreement/privacy.vue | 99 ++++++++++++++++++++++++++++++ tsconfig.json | 2 +- 9 files changed, 235 insertions(+), 47 deletions(-) create mode 100644 src/router/index.ts delete mode 100644 src/views/Page2/Page2.vue create mode 100644 src/views/agreement/disclaimer.vue create mode 100644 src/views/agreement/privacy.vue diff --git a/package.json b/package.json index f7313d5..6f78403 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ }, "dependencies": { "swiper": "^8.4.6", - "vue": "^3.2.45" + "vue": "^3.2.45", + "vue-router": "^4.1.6" }, "devDependencies": { "@rushstack/eslint-patch": "^1.1.4", @@ -29,7 +30,6 @@ "prettier": "^2.7.1", "typescript": "~4.7.4", "vite": "^4.0.0", - "vue-tsc": "^1.0.12", - "fullpage.js": "^4.0.15" + "vue-tsc": "^1.0.12" } -} \ No newline at end of file +} diff --git a/src/App.vue b/src/App.vue index 974f3dc..336ead3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,8 +1,8 @@ diff --git a/src/main.ts b/src/main.ts index f2a3cd3..009a5eb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,7 @@ import { createApp } from 'vue' import App from './App.vue' +import router from './router/index' import './style/index.less' -createApp(App).mount('#app') +createApp(App).use(router).mount('#app') diff --git a/src/router/index.ts b/src/router/index.ts new file mode 100644 index 0000000..114d560 --- /dev/null +++ b/src/router/index.ts @@ -0,0 +1,27 @@ +import { createRouter, createWebHistory } from 'vue-router' + +import Layout from '../views/Layout.vue' +console.log('reouter') + +const router = createRouter({ + history: createWebHistory(import.meta.env.BASE_URL), + routes: [ + { + path: '/', + name: 'Layout', + component: Layout + }, + { + path: '/privacy', + name: 'privacy', + component: () => import('../views/agreement/privacy.vue') + }, + { + path: '/disclaimer', + name: 'disclaimer', + component: () => import('../views/agreement/disclaimer.vue') + } + ] +}) + +export default router diff --git a/src/views/Layout.vue b/src/views/Layout.vue index a8c12e0..897bcbf 100644 --- a/src/views/Layout.vue +++ b/src/views/Layout.vue @@ -1,27 +1,9 @@ diff --git a/src/views/agreement/disclaimer.vue b/src/views/agreement/disclaimer.vue new file mode 100644 index 0000000..77fd168 --- /dev/null +++ b/src/views/agreement/disclaimer.vue @@ -0,0 +1,99 @@ + + + diff --git a/src/views/agreement/privacy.vue b/src/views/agreement/privacy.vue new file mode 100644 index 0000000..d0d928d --- /dev/null +++ b/src/views/agreement/privacy.vue @@ -0,0 +1,99 @@ + + + diff --git a/tsconfig.json b/tsconfig.json index 8d23599..2352482 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ "@/*": ["./src/*"] } }, - + "type": ["vite/client"], "references": [ { "path": "./tsconfig.config.json"