app
MrShi
2026-04-27 e56792f78e4df0df2f12552d1a61dd8ca1db5c67
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,8 +145,9 @@
                  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 => {
@@ -176,7 +175,9 @@
                  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 => {
@@ -189,6 +190,8 @@
                        }
                     })
                  }
               }).catch(() => {
                  uni.hideLoading()
               })
            }
         }