Sfoglia il codice sorgente

fix: 新增分组逻辑调整

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 5 mesi fa
parent
commit
eea9199fbc
1 ha cambiato i file con 12 aggiunte e 6 eliminazioni
  1. 12 6
      apps/mobile/src/views/entgroup/index.vue

+ 12 - 6
apps/mobile/src/views/entgroup/index.vue

@@ -91,13 +91,15 @@ export default {
       if (code === 0) {
         loading.clear()
         this.groupList = data?.groupUserArr || []
-      } else {
+      }
+      else {
         loading.clear()
         this.$toast('获取分组列表失败')
       }
     },
     setGroupEvent(data) {
-      if (data.name === '默认分组') return
+      if (data.name === '默认分组')
+        return
       this.$router.push({
         path: '/entgroup/detail',
         query: {
@@ -114,9 +116,10 @@ export default {
       if (this.groupingName === '') {
         this.errorMessageText = '分组名称不能为空'
         this.isConfirmButtonDisabled = true
-      } else {
+      }
+      else {
         const exists = this.groupList.some(
-          (item) => item.name === this.groupingName
+          item => item.name === this.groupingName
         )
         if (exists) {
           this.errorMessageText = '分组名称已存在'
@@ -133,8 +136,11 @@ export default {
         this.$toast('新增分组成功')
         this.groupingName = ''
         this.showAddGroupingDialog = false
-        this.getMyFollowList()
-      } else {
+        setTimeout(() => {
+          this.getMyFollowList()
+        }, 1500)
+      }
+      else {
         this.$toast('新增分组失败')
       }
     },