diff --git a/src/App.vue b/src/App.vue
index 32af3d5..bc687ea 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,6 +1,6 @@
diff --git a/src/router/authentication.js b/src/router/authentication.js
index 5fcc93d..5bf05ef 100644
--- a/src/router/authentication.js
+++ b/src/router/authentication.js
@@ -1,4 +1,4 @@
-import authentication from '../views/authentication.vue'
+import authentication from '../views/authentication_login.vue'
export default [
{ path: '/login', component: authentication },
diff --git a/src/router/index.js b/src/router/index.js
index e8d32ad..d6483bb 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -6,7 +6,7 @@ import meetingManagementRoutes from './meetingManagement'
import newsManagementRoutes from './newsManagement'
import organizationManagementRoutes from './organizationManagement'
import userManagementRoutes from './userManagement'
-import authentication from "../views/authentication.vue";
+import authentication from "../views/authentication_login.vue";
const routes = [
{ path: '/', component: HelloWorld },
diff --git a/src/services/authenticationService.js b/src/services/authenticationService.js
index 36a7db4..c1025e9 100644
--- a/src/services/authenticationService.js
+++ b/src/services/authenticationService.js
@@ -10,11 +10,22 @@ export default {
return axios.post(url, data)
.then(response => {
alert(">login方法中<");
- alert(response.data);
+ alert(response.data.username);
return response.data;
});
},
- register(){
+ register(user){
+ const url = `${apiUrl}/users/checkLogin`
+ const data = {
+ username: username,
+ password: password
+ };
+ return axios.post(url, data)
+ .then(response => {
+ alert(">login方法中<");
+ alert(response.data.username);
+ return response.data;
+ });
//跳转逻辑
}
}
\ No newline at end of file
diff --git a/src/views/authentication.vue b/src/views/authentication_login.vue
similarity index 92%
rename from src/views/authentication.vue
rename to src/views/authentication_login.vue
index 726e27f..3c51846 100644
--- a/src/views/authentication.vue
+++ b/src/views/authentication_login.vue
@@ -23,8 +23,9 @@
},methods:{
handleLogin(){
authenticationService.login(this.username,this.password).then(res=>{
- alert("login方法调用完毕");
- alert(res.data);
+ alert(res.username);
+ alert("login方法调用完毕");
+
});
},handleRegister(){
authenticationService.register(this.username,this.password).then(res=>{
diff --git a/src/views/authentication_register.vue b/src/views/authentication_register.vue
new file mode 100644
index 0000000..5617421
--- /dev/null
+++ b/src/views/authentication_register.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+ BACK
+ REGISTER
+
+
+
+
\ No newline at end of file