From a64ff8a2a843228a9c85fcd096b3f2915193856f Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期四, 30 十一月 2023 08:57:58 +0800
Subject: [PATCH] 新增

---
 src/views/components/loginForm.vue |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/views/components/loginForm.vue b/src/views/components/loginForm.vue
index 2f5995e..5409772 100644
--- a/src/views/components/loginForm.vue
+++ b/src/views/components/loginForm.vue
@@ -24,6 +24,7 @@
           auto-complete="off"
           placeholder="密码"
           @keyup.enter="handleLogin"
+          show-password
         >
           <template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
         </el-input>
@@ -49,7 +50,7 @@
             :loading="loading"
             size="large"
             type="primary"
-            style="width:50%;"
+            style="width:63%;"
             @click.prevent="handleLogin"
         >
           <span v-if="!loading">登 录</span>
@@ -71,6 +72,7 @@
 import { encrypt, decrypt } from "@/utils/jsencrypt";
 import useUserStore from '@/store/modules/user'
 import { Register } from "@/layout/components";
+import { Base64 } from 'js-base64'
 
 const userStore = useUserStore()
 const route = useRoute();
@@ -78,8 +80,8 @@
 const { proxy } = getCurrentInstance();
 
 const loginForm = ref({
-  username: "admin",
-  password: "admin@123",
+  username: "",
+  password: "",
   code: "",
   uuid: ""
 });
@@ -127,6 +129,7 @@
       //   Cookies.remove("rememberMe");
       // }
       // 调用action的登录方法
+      loginForm.value.password = Base64.encode(loginForm.value.password)
       userStore.login(loginForm.value).then(() => {
         const query = route.query;
         const otherQueryParams = Object.keys(query).reduce((acc, cur) => {

--
Gitblit v1.9.2