- Edit
- components/HelloWorld.vue to test HMR
-
- Check out - create-vue, the official Vue + Vite starter -
-- Learn more about IDE Support for Vue in the - Vue Docs Scaling up Guide. -
-Click on the Vite and Vue logos to learn more
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/router/authentication.js b/src/router/authentication.js index 7c0f2e7..a86507e 100644 --- a/src/router/authentication.js +++ b/src/router/authentication.js @@ -1,10 +1,9 @@ -// !!!这是一个示例,请根据实际情况修改!!! -// import Login from '../views/authentication/Login.vue' -// import Register from '../views/authentication/Register.vue' -// import Profile from '../views/authentication/Profile.vue' - +import authentication_main from '../views/authentication/authentication_main.vue' +import register from '../views/authentication/authentication_register.vue' +import authentication_login from "../views/authentication/authentication_login.vue"; export default [ - // { path: '/login', component: Login }, - // { path: '/register', component: Register }, + { path: '/main', component: authentication_main }, + { path: '/login', component: authentication_login }, + { path: '/register', component: register }, // { path: '/profile', component: Profile } ] diff --git a/src/router/organizationManagement.js b/src/router/organizationManagement.js index 78fb824..56bfbb5 100644 --- a/src/router/organizationManagement.js +++ b/src/router/organizationManagement.js @@ -1,9 +1,7 @@ -// import OrganizationList from '../views/organization-management/OrganizationList.vue' -// import OrganizationDetail from '../views/organization-management/OrganizationDetail.vue' -// import OrganizationEdit from '../views/organization-management/OrganizationEdit.vue' +import Organization_main from '../views/organization-management/Organization_main.vue' export default [ - // { path: '/organizations', component: OrganizationList }, + { path: '/organizations', component: Organization_main}, // { path: '/organizations/:id', component: OrganizationDetail }, // { path: '/organizations/:id/edit', component: OrganizationEdit } ] diff --git a/src/services/authenticationService.js b/src/services/authenticationService.js index e69de29..0f312a5 100644 --- a/src/services/authenticationService.js +++ b/src/services/authenticationService.js @@ -0,0 +1,23 @@ +import axios from "axios"; + +export default { + login(account, password){ + const url = `http://localhost:8080/users/checkLogin` + const data = { + account: account, + password: password + }; + return axios.post(url, data) + .then(response => { + return response.data; + }); + }, + register(user){ + const url = `http://localhost:8080/users/checkRegister` + return axios.post(url, user) + .then(response => { + return response.data; + }); + //跳转逻辑 + } +} \ No newline at end of file diff --git a/src/services/organizationService.js b/src/services/organizationService.js index e69de29..9258df3 100644 --- a/src/services/organizationService.js +++ b/src/services/organizationService.js @@ -0,0 +1,33 @@ +import axios from "axios"; + +export default { + getAllOrganizations() { + return axios.get('http://localhost:8080/api/organizations/listAll').then(response => { + return response.data; + }); + }, + addOrganization(organization) { + return axios.post('http://localhost:8080/api/organizations/addOrganization', organization).then(response => { + return response.data; + }); + }, + deleteOrganization(organizationId) { + return axios.post('http://localhost:8080/api/organizations/deleteOrganization' , {organizationId:organizationId},{headers: { + 'Content-Type': 'application/json' // 设置 Content-Type 为 application/json + }}).then(response => { + return response.data; + }); + }, + updateOrganization(organization) { + return axios.post('http://localhost:8080/api/organizations/updateOrganization', organization).then(response => { + return response.data; + }); + }, + getOrganizationById(organizationId) { + return axios.post('http://localhost:8080/organizations/getOrganizationById', {organizationId:organizationId},{headers: { + 'Content-Type': 'application/json' // 设置 Content-Type 为 application/json + }}).then(response => { + return response.data; + }); + }, +} \ No newline at end of file diff --git a/src/views/authentication/authentication_login.vue b/src/views/authentication/authentication_login.vue new file mode 100644 index 0000000..0ee1cba --- /dev/null +++ b/src/views/authentication/authentication_login.vue @@ -0,0 +1,90 @@ + +