From f288d0ddbd7be0ef1d5b984d75b8c573be80a09f Mon Sep 17 00:00:00 2001 From: shuguang Date: Sun, 23 Mar 2025 21:07:31 +0800 Subject: [PATCH] fix: Login Input --- src/components/Login.vue | 72 ++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 22 deletions(-) diff --git a/src/components/Login.vue b/src/components/Login.vue index 2b7baa4..41c4566 100644 --- a/src/components/Login.vue +++ b/src/components/Login.vue @@ -1,36 +1,67 @@ @@ -73,7 +103,7 @@ export default { }, ], }, - loginLoading: false + loginLoading: false, }; }, methods: { @@ -93,13 +123,10 @@ export default { const username = this.loginForm.username; const password = this.loginForm.password; //向数据库发送axios请求,如果登录成功,就跳转 - const { data: res } = await this.$http.post( - "user/login", - { - username, - password - } - ); + const { data: res } = await this.$http.post("user/login", { + username, + password, + }); if (res.status !== 200) { this.loginLoading = false; return this.$message.error(res.msg); @@ -136,7 +163,8 @@ export default { .login_container { // background-color: #2b4b6b; - background: url(https://xxx.xiaobaitiao.icu/img/icu/202312211236280.jpg) no-repeat 0px 0px; + background: url(https://xxx.xiaobaitiao.icu/img/icu/202312211236280.jpg) + no-repeat 0px 0px; background-size: cover; height: 100%; }