From 8a899e63502939dbf034b90ba46741e0faa9023c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 08 五月 2026 18:49:32 +0800
Subject: [PATCH] 管理端bug修改
---
app/pages/login/login.vue | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/app/pages/login/login.vue b/app/pages/login/login.vue
index 753391a..0e9baba 100644
--- a/app/pages/login/login.vue
+++ b/app/pages/login/login.vue
@@ -125,9 +125,7 @@
} else {
uni.showToast({ title: res.msg || '鍙戦�佸け璐�', icon: 'none' });
}
- }).catch(err => {
- uni.showToast({ title: '鍙戦�佸け璐�', icon: 'none' });
- });
+ })
},
login() {
if (!this.isAgreed) {
@@ -147,12 +145,14 @@
uni.showToast({ title: '璇疯緭鍏ュ瘑鐮�', icon: 'none' });
return;
}
-
+ uni.showLoading({ title: '鐧诲綍涓�...' })
this.$u.api.login(this.form).then(res => {
+ uni.hideLoading()
if (res.code === 200) {
this.$store.commit('setToken', res.data.token);
this.$u.api.verifyDetail().then(user => {
if (user.code === 200) {
+ console.log('verifyDetail success:', user)
uni.showToast({ title: '鐧诲綍鎴愬姛', icon: 'success' });
this.$store.commit('setUserInfo', user.data);
setTimeout(() => {
@@ -176,11 +176,14 @@
return;
}
+ uni.showLoading({ title: '鐧诲綍涓�...' })
this.$u.api.register({ telephone: this.form.telephone, code: this.form.code }).then(res => {
+ uni.hideLoading()
if (res.code === 200) {
this.$store.commit('setToken', res.data.token);
this.$u.api.verifyDetail().then(user => {
if (user.code === 200) {
+ console.log('verifyDetail success:', user)
uni.showToast({ title: '鐧诲綍鎴愬姛', icon: 'success' });
this.$store.commit('setUserInfo', user.data);
setTimeout(() => {
@@ -189,6 +192,8 @@
}
})
}
+ }).catch(() => {
+ uni.hideLoading()
})
}
}
--
Gitblit v1.9.3