From 1d85389aca70aa7536e01639fab863d4259753b2 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 30 四月 2026 15:21:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
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