From d5611562e6e430e304d102ea6606026deb55ba44 Mon Sep 17 00:00:00 2001
From: MiLla <18826902282@163.com>
Date: Mon, 24 Jun 2024 19:19:51 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9No2.=E5=B0=9D=E8=AF=95?=
=?UTF-8?q?=E5=B0=86routes=E4=B8=AD=E7=9A=84authenticationRoutes=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E4=BA=86=EF=BC=8C=E6=B2=A1=E6=9C=89=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=EF=BC=8C=E5=B0=86authentication.vue=E4=BB=8Ecomponents?=
=?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0=E6=96=B0=E5=BB=BA=E7=9A=84=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E5=A4=B9views=E4=B8=AD=EF=BC=8C=E6=B5=8B=E8=AF=95?=
=?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86authentication.js=E4=B8=AD=E7=9A=84l?=
=?UTF-8?q?ogin=E6=96=B9=E6=B3=95=EF=BC=8C=E4=B8=8D=E7=9F=A5=E4=B8=BA?=
=?UTF-8?q?=E4=BD=95=E5=88=A0=E9=99=A4#{apiUrl}'/checkLogin'=E4=B8=AD?=
=?UTF-8?q?=E7=9A=84${apiUrl}=E5=B0=B1=E8=83=BD=E7=94=A8=EF=BC=8C=E4=B8=8D?=
=?UTF-8?q?=E5=88=A0=E5=B0=B1=E4=B8=8D=E8=A1=8C=EF=BC=8C=E7=95=99=E5=BE=85?=
=?UTF-8?q?=E4=B8=8B=E6=AC=A1=E5=AD=A6=E4=B9=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 2 +-
src/components/authentication.vue | 13 ----------
src/router/authentication.js | 7 ++----
src/router/index.js | 5 ++--
src/services/authenticationService.js | 15 ++++++++---
src/views/authentication.vue | 36 +++++++++++++++++++++++++++
6 files changed, 52 insertions(+), 26 deletions(-)
delete mode 100644 src/components/authentication.vue
create mode 100644 src/views/authentication.vue
diff --git a/src/App.vue b/src/App.vue
index d839ad5..32af3d5 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,6 +1,6 @@
diff --git a/src/components/authentication.vue b/src/components/authentication.vue
deleted file mode 100644
index 9cc18ce..0000000
--- a/src/components/authentication.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- 登录
- pls enter the username
- pls enter the username
-
-
-
\ No newline at end of file
diff --git a/src/router/authentication.js b/src/router/authentication.js
index 7c0f2e7..5fcc93d 100644
--- a/src/router/authentication.js
+++ b/src/router/authentication.js
@@ -1,10 +1,7 @@
-// !!!这是一个示例,请根据实际情况修改!!!
-// import Login from '../views/authentication/Login.vue'
-// import Register from '../views/authentication/Register.vue'
-// import Profile from '../views/authentication/Profile.vue'
+import authentication from '../views/authentication.vue'
export default [
- // { path: '/login', component: Login },
+ { path: '/login', component: authentication },
// { path: '/register', component: Register },
// { path: '/profile', component: Profile }
]
diff --git a/src/router/index.js b/src/router/index.js
index 6bbaefe..e8d32ad 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -6,11 +6,10 @@ import meetingManagementRoutes from './meetingManagement'
import newsManagementRoutes from './newsManagement'
import organizationManagementRoutes from './organizationManagement'
import userManagementRoutes from './userManagement'
-import authentication from "../components/authentication.vue";
+import authentication from "../views/authentication.vue";
const routes = [
- { path: '/about', component: HelloWorld },
- { path: '/login', component: authentication},
+ { path: '/', component: HelloWorld },
...authenticationRoutes,
...courseManagementRoutes,
...meetingManagementRoutes,
diff --git a/src/services/authenticationService.js b/src/services/authenticationService.js
index d7ef9ee..58f78bb 100644
--- a/src/services/authenticationService.js
+++ b/src/services/authenticationService.js
@@ -1,5 +1,12 @@
-import { createApp } from 'vue';
-import App from '../App.vue';
-import router from '../router';
+import axios from "axios";
-createApp(App).use(router).mount('#app');
+export default {
+ login(username, password, apiUrl="http://localhost:8080"){
+ return axios.get(`/checkLogin`, {username:username, password:password})
+ .then(response => {
+ alert("hahaha");
+ // 处理登录成功的逻辑
+ return response.data;
+ });
+ }
+}
\ No newline at end of file
diff --git a/src/views/authentication.vue b/src/views/authentication.vue
new file mode 100644
index 0000000..2c3a3b1
--- /dev/null
+++ b/src/views/authentication.vue
@@ -0,0 +1,36 @@
+
+
+
+ 登录
+
+
+ LOGIN
+
+
+
+
+
\ No newline at end of file