From 73a69a02987994ab14d0b6678a187302dd380308 Mon Sep 17 00:00:00 2001 From: LiLongLong <13717757313@163.com> Date: Mon, 10 Feb 2025 09:07:36 +0800 Subject: [PATCH 1/7] merge master --- src/assets/photo_icon.svg | 1 + src/views/components/Footer.vue | 100 ++++++++++++++++++++++++- src/views/components/Liquid.vue | 73 +++++++----------- src/views/graphite/components/TakePickture.vue | 49 +++++++++--- src/views/graphite/index.vue | 34 ++++----- 5 files changed, 180 insertions(+), 77 deletions(-) create mode 100644 src/assets/photo_icon.svg diff --git a/src/assets/photo_icon.svg b/src/assets/photo_icon.svg new file mode 100644 index 0000000..3a619cc --- /dev/null +++ b/src/assets/photo_icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/components/Footer.vue b/src/views/components/Footer.vue index 1e73a02..c6d4c80 100644 --- a/src/views/components/Footer.vue +++ b/src/views/components/Footer.vue @@ -1,3 +1,99 @@ + \ No newline at end of file + + + + + diff --git a/src/views/components/Liquid.vue b/src/views/components/Liquid.vue index c356a89..6fdae36 100644 --- a/src/views/components/Liquid.vue +++ b/src/views/components/Liquid.vue @@ -1,24 +1,22 @@ \ No newline at end of file From 5dcb8f6a095ab2e60cb0fb9eeb2e758eed48a76f Mon Sep 17 00:00:00 2001 From: LiLongLong <13717757313@163.com> Date: Wed, 12 Feb 2025 14:30:53 +0800 Subject: [PATCH 7/7] rebase master --- src/assets/pwdw_icon.svg | 1 + src/assets/user_icon.svg | 1 + src/views/Test.vue | 1 - src/views/components/Footer.vue | 10 ++-- src/views/login/index.vue | 129 ++++++++++++++++++++++++++++++++++++++-- src/views/login/login.css | 60 ------------------- 6 files changed, 131 insertions(+), 71 deletions(-) create mode 100644 src/assets/pwdw_icon.svg create mode 100644 src/assets/user_icon.svg delete mode 100644 src/views/login/login.css diff --git a/src/assets/pwdw_icon.svg b/src/assets/pwdw_icon.svg new file mode 100644 index 0000000..64b733d --- /dev/null +++ b/src/assets/pwdw_icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/user_icon.svg b/src/assets/user_icon.svg new file mode 100644 index 0000000..222f061 --- /dev/null +++ b/src/assets/user_icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/Test.vue b/src/views/Test.vue index 9426ed6..7229806 100644 --- a/src/views/Test.vue +++ b/src/views/Test.vue @@ -26,7 +26,6 @@ const onReturn = () => { menuId.value = 0 - eventBus.emit("menuId", 0) router.go(-1) } diff --git a/src/views/components/Footer.vue b/src/views/components/Footer.vue index 2823ef5..0382605 100644 --- a/src/views/components/Footer.vue +++ b/src/views/components/Footer.vue @@ -2,7 +2,7 @@ @@ -24,7 +32,9 @@ import { ref } from "vue"; import { useRouter } from "vue-router"; import { showToast } from "vant"; import { login } from "@/services/user/userManager"; - +import logoSvg from '@/assets/logo.svg' +import userIconSvg from '@/assets/user_icon.svg' +import pwdIconSvg from '@/assets/pwdw_icon.svg' const router = useRouter(); // 定义用户名和密码的响应式变量 const username = ref(""); @@ -32,6 +42,10 @@ const password = ref(""); // 处理登录的函数 const handleLogin = async () => { + if(!username.value || !password.value){ + showToast('请输入用户名或密码!'); + return; + } const res = await login({ username: username.value, password: password.value }); if (res.success) { sessionStorage.setItem("token", res.data); @@ -42,6 +56,111 @@ const handleLogin = async () => { }; - diff --git a/src/views/login/login.css b/src/views/login/login.css deleted file mode 100644 index fd88598..0000000 --- a/src/views/login/login.css +++ /dev/null @@ -1,60 +0,0 @@ -.login-container { - position: relative; - width: 100vw; - height: 100vh; - overflow: hidden; - } - - .background-image { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-image: url('https://via.placeholder.com/1920x1080'); /* 替换为你自己的背景图 URL */ - background-size: cover; - background-position: center; - filter: blur(5px); - z-index: -1; - } - - .login-form { - position: absolute; - top: 50%; - left: 50%; - height: 600px; - transform: translate(-50%, -50%); - background-color: rgba(255, 255, 255, 0.8); - padding: 20px; - border-radius: 10px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); - text-align: center; - } - - .input-field { - width: 100%; - padding: 10px; - margin: 10px 0; - border: 1px solid #ccc; - border-radius: 5px; - } - - .login-button { - width: 100%; - padding: 10px; - background-color: #007bff; - color: white; - border: none; - border-radius: 5px; - cursor: pointer; - margin-top: 35%; - } - - .login-button:hover { - background-color: #0056b3; - } - - .login-user-input{ - width: 400px; - margin-top: 15%; - } \ No newline at end of file