浏览代码

更新个人信息操作异常恢复

zhontai 2 年之前
父节点
当前提交
2e1d4ceb12
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/views/admin/personal/index.vue

+ 3 - 1
src/views/admin/personal/index.vue

@@ -246,7 +246,9 @@ const onUpdateBasic = async () => {
     if (!valid) return
 
     state.updateLoading = true
-    const res = await new UserApi().updateBasic(state.personalForm, { showSuccessMessage: true })
+    const res = await new UserApi().updateBasic(state.personalForm, { showSuccessMessage: true }).catch(() => {
+      state.updateLoading = false
+    })
     state.updateLoading = false
 
     if (res?.success) {