From 9929352ae4f39b0bd9153718bad2edd6884d1f16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=BE=9C=E5=A4=A7=E5=B8=85=E5=93=A5?= Date: Mon, 30 Jun 2025 22:28:37 +0800 Subject: [PATCH] revert 636e60157e379095e110851e5b2150f44a6e6fc4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit revert feat:oauth代码提交 --- .gitignore | 1 - src/main.ts | 36 +++++++++---------------------- src/router/index.ts | 12 ----------- src/utils/secret.ts | 3 --- src/views/layout/index.vue | 9 -------- src/views/login/OauthCallBack.vue | 28 ------------------------ src/views/login/index.vue | 18 +++++----------- vite.config.ts | 2 +- 8 files changed, 16 insertions(+), 93 deletions(-) delete mode 100644 src/utils/secret.ts delete mode 100644 src/views/login/OauthCallBack.vue diff --git a/.gitignore b/.gitignore index 2ec9414..0e5de52 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ lerna-debug.log* node_modules dist dist-ssr -secret.js *.local .vscode # Editor directories and files diff --git a/src/main.ts b/src/main.ts index 3737375..c4730a3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,38 +1,22 @@ -// 引入私钥 -import { DO_MAIN, CLIENT_ID } from "@/utils/secret"; // 样式引入 -import "@/assets/styles/reset.scss"; -import "@/assets/styles/variable.scss"; -import "@/assets/styles/common.scss"; +import '@/assets/styles/reset.scss' +import '@/assets/styles/variable.scss'; +import '@/assets/styles/common.scss'; // 引入仓库 -import pinia from "@/store"; +import pinia from '@/store'; //引入路由 import router from "@/router"; // 引入UI组件库相关 -import naive from "naive-ui"; -import "vfonts/Lato.css"; // 通用字体 -import "vfonts/FiraCode.css"; // 等宽字体 +import naive from 'naive-ui'; +import 'vfonts/Lato.css'// 通用字体 +import 'vfonts/FiraCode.css'// 等宽字体 // 登录授权相关 -import { createAuth0 } from "@auth0/auth0-vue"; -import { createApp } from "vue"; -import App from "./App.vue"; +import { createApp } from 'vue' +import App from './App.vue'; const app = createApp(App); - -app.use( - createAuth0({ - domain: DO_MAIN, - clientId: CLIENT_ID, - authorizationParams: { - redirect_uri: `${window.location.origin}/callback`, - audience: "https://dev-f8lrenkd107vqnti.us.auth0.com/api/v2", - scope: 'read:data', // 请求用户基本信息 - } - }) -); - app.use(pinia); app.use(router); app.use(naive); -app.mount("#app"); +app.mount('#app') diff --git a/src/router/index.ts b/src/router/index.ts index 2fedccb..7caed2b 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,7 +1,5 @@ import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router"; import Login from "@/views/login/index.vue"; //登录组件 -import Layout from '@/views/layout/index.vue'; -import CallBack from '@/views/login/OauthCallBack.vue'; const routes: Array = [ { @@ -9,16 +7,6 @@ const routes: Array = [ name: "Login", component: Login, }, - { - path:'/callback', - name:'CallBack', - component:CallBack - }, - { - path: "/layout", - name: "Layout", - component: Layout, - }, ]; const router = createRouter({ diff --git a/src/utils/secret.ts b/src/utils/secret.ts deleted file mode 100644 index b59f928..0000000 --- a/src/utils/secret.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const DO_MAIN = 'dev-f8lrenkd107vqnti.us.auth0.com'; -export const CLIENT_ID = 'VasF4bqvT7iC5Va2ibBT39hu71gdtA9K'; -export const CLINET_KEY = 'hIdwcnNLmc6fPIBxHKqP16LYo3q7hCtB_Cg2R3enylHH28AHM1SEAkOky5zFUTI5'; \ No newline at end of file diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 4ab6171..e69de29 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/login/OauthCallBack.vue b/src/views/login/OauthCallBack.vue deleted file mode 100644 index 5fd841b..0000000 --- a/src/views/login/OauthCallBack.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/login/index.vue b/src/views/login/index.vue index f1b720d..d90d417 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,19 +1,11 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 92ff734..701b3f1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,7 +11,7 @@ export default defineConfig({ imports: ["vue", "vue-router"], defaultExportByFilename: true, dirs: ["./src/api"], - }) + }), ], resolve: { alias: {