From a89979a3355c9200c8e0b01c0043b2b863ae663e Mon Sep 17 00:00:00 2001
From: zhangrenyuan <18990852002@163.com>
Date: Wed, 22 Oct 2025 10:44:05 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E7=99=BB=E5=BD=95=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=E5=81=9A=E5=8A=A0=E8=BD=BD=E7=8A=B6=E6=80=81=E9=98=B2=E9=87=8D?=
=?UTF-8?q?=E5=A4=8D=E7=82=B9=E5=87=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/login.vue | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/views/login.vue b/src/views/login.vue
index c95bf96..9fa8503 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -9,6 +9,8 @@ import {useAdminStore} from '@/store'
import {filterFirstMenu, findFirstThirdLevelMenu, getRoutePath,} from "../utils/menuUtils.js"
import {storeToRefs} from "pinia";
+const loading = ref(false) // 登录按钮loading状态
+
const router = useRouter() // 获取路由实例
//获取当前浏览器地址
var url = window.location.href //上传服务器时打开注释并注释掉下一行
@@ -38,6 +40,13 @@ const adminStore = useAdminStore()
//调用方法
const login = async function () {
+ if(loading.value) {
+ console.log('正在登录,请稍后')
+ return
+ }
+
+ loading.value = true
+
try {
const result = await request({
url: '/admin/login',
@@ -177,7 +186,7 @@ onMounted(() => {
登录
+{{loading ? '登录中...' : '登录'}}