diff --git a/web/src/components/LoginDialog.vue b/web/src/components/LoginDialog.vue
index e183895a..4b5d4b7e 100644
--- a/web/src/components/LoginDialog.vue
+++ b/web/src/components/LoginDialog.vue
@@ -31,8 +31,13 @@
- 登 录{{ loading ? '登录中...' : '登 录' }}
@@ -193,8 +198,13 @@
- 注 册{{ loading ? '注册中...' : '注 册' }}
@@ -287,8 +297,8 @@ const emits = defineEmits(['hide', 'success'])
const action = ref('login')
const enableVerify = ref(false)
const showResetPass = ref(false)
-const router = useRouter()
const store = useSharedStore()
+const loading = ref(false)
onMounted(() => {
getSystemInfo()
@@ -349,6 +359,7 @@ const doLogin = (verifyData) => {
data.value.key = verifyData.key
data.value.dots = verifyData.dots
data.value.x = verifyData.x
+ loading.value = true
httpPost('/api/user/login', data.value)
.then((res) => {
setUserToken(res.data.token)
@@ -360,6 +371,9 @@ const doLogin = (verifyData) => {
.catch((e) => {
ElMessage.error('登录失败,' + e.message)
})
+ .finally(() => {
+ loading.value = false
+ })
}
// 注册操作
@@ -399,6 +413,7 @@ const doRegister = (verifyData) => {
data.value.dots = verifyData.dots
data.value.x = verifyData.x
data.value.reg_way = activeName.value
+ loading.value = true
httpPost('/api/user/register', data.value)
.then((res) => {
setUserToken(res.data.token)
@@ -414,6 +429,9 @@ const doRegister = (verifyData) => {
.catch((e) => {
ElMessage.error('注册失败,' + e.message)
})
+ .finally(() => {
+ loading.value = false
+ })
}
diff --git a/web/src/views/Suno.vue b/web/src/views/Suno.vue
index 66fe315d..e24035f2 100644
--- a/web/src/views/Suno.vue
+++ b/web/src/views/Suno.vue
@@ -566,5 +566,5 @@ onUnmounted(() => {
diff --git a/web/src/views/admin/Login.vue b/web/src/views/admin/Login.vue
index 7c5f2e70..d4d9692c 100644
--- a/web/src/views/admin/Login.vue
+++ b/web/src/views/admin/Login.vue
@@ -41,8 +41,13 @@
- 登录{{ loading ? '登录中...' : '登录' }}
@@ -73,6 +78,7 @@ const password = ref(import.meta.env.VITE_ADMIN_PASS)
const logo = ref('')
const enableVerify = ref(false)
const captchaRef = ref(null)
+const loading = ref(false)
checkAdminSession()
.then(() => {
@@ -106,6 +112,7 @@ const login = function () {
}
const doLogin = function (verifyData) {
+ loading.value = true
httpPost('/api/admin/login', {
username: username.value.trim(),
password: password.value.trim(),
@@ -120,6 +127,9 @@ const doLogin = function (verifyData) {
.catch((e) => {
ElMessage.error('登录失败,' + e.message)
})
+ .finally(() => {
+ loading.value = false
+ })
}
diff --git a/web/src/views/mobile/Login.vue b/web/src/views/mobile/Login.vue
deleted file mode 100644
index acd63d75..00000000
--- a/web/src/views/mobile/Login.vue
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
-
- 返回首页
-
-
-
-
-
{{ title }}
-
-
-
-
-
-
-
-
-