From 44dd9c4eb8a2489c63a5eb53fd4254bbb3510e95 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Thu, 18 Jun 2026 09:14:57 +0800
Subject: [PATCH] Merge branch 'feature/v9.0/9.0.4'

---
 src/subPackages/userDetail/infos/index.vue |   28 +++++++++++++++++++++++++---
 1 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/src/subPackages/userDetail/infos/index.vue b/src/subPackages/userDetail/infos/index.vue
index 2bec63c..c1a6734 100644
--- a/src/subPackages/userDetail/infos/index.vue
+++ b/src/subPackages/userDetail/infos/index.vue
@@ -29,7 +29,17 @@
     </view>
     <view class="btngroup">
       <u-button color="#AEAEAE" class="custom-style" shape="circle" @click="reset">重置</u-button>
-      <u-button color="#1D6FE9" class="custom-style" shape="circle" @click="submit">提交</u-button>
+      <u-button
+        :color="submitLoading ? '#AEAEAE' : '#1D6FE9'"
+        class="custom-style"
+        shape="circle"
+        text="提交"
+        :loading="submitLoading"
+        loading-text="提交中"
+        loading-mode="circle"
+        :loading-size="13"
+        @click="submit"
+      />
     </view>
   </view>
 </template>
@@ -50,6 +60,7 @@
   email: '',
   deptName: '',
 });
+const submitLoading = ref(false);
 
 // 校验手机号
 const validatePhone = () => {
@@ -199,16 +210,23 @@
   // #endif
 }
 const submit = () => {
+  if (submitLoading.value) return
   if (!validatePhone() || !validateEmail()) return
+  submitLoading.value = true
   userInfo.value.name = userInfo.value.realName;
   updateInfo(userInfo.value).then(res => {
     if (res.data.code === 200) {
       uni.showToast({
         title: '修改信息成功',
         icon: 'none',
-        duration: 2000
+        duration: 1500
       });
-      getUserInfoData()
+      setTimeout(() => {
+        uni.switchTab({
+          url: '/pages/user/index'
+        });
+      }, 1500);
+      return
 
     } else {
       uni.showToast({
@@ -218,6 +236,10 @@
       });
       getUserInfoData()
     }
+    submitLoading.value = false
+  }).catch(() => {
+    getUserInfoData()
+    submitLoading.value = false
   });
 };
 onShow(async () => {

--
Gitblit v1.9.3