Browse Source

会员管理限定只能启用3条

corn 6 tháng trước cách đây
mục cha
commit
43fb18d393
1 tập tin đã thay đổi với 27 bổ sung19 xóa
  1. 27 19
      src/views/members/memberDetails.vue

+ 27 - 19
src/views/members/memberDetails.vue

@@ -317,25 +317,31 @@
           })
         }).then(({
           data
-        }) => {
-          this.dialogFormVisible = false
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.vipName = ''
-              this.money = ''
-              this.award = ''
-              this.vipNameType = 0
-              this.vipPostTimes=''
-              this.vipDueTimes=''
-              this.vipViewTimes=''
-              this.vipConTimes=''
-              this.gameStatus = 1
-              this.dataSelect()
-            }
-          })
+        }) => {          
+          if (data && data.code === 0) {
+            this.dialogFormVisible = false
+            this.$message({
+              message: '操作成功',
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+                this.vipName = ''
+                this.money = ''
+                this.award = ''
+                this.vipNameType = 0
+                this.vipPostTimes=''
+                this.vipDueTimes=''
+                this.vipViewTimes=''
+                this.vipConTimes=''
+                this.gameStatus = 1
+                this.dataSelect()
+              }
+            })
+          } else {
+            this.$message.error(data.msg)
+            this.dataSelect()
+          }
+
         })
       },
       // 修改配置弹框
@@ -415,6 +421,7 @@
             })
           } else {
             this.$message.error(data.msg)
+            this.dataSelect()
           }
         })
       },
@@ -452,6 +459,7 @@
             })
           } else {
             this.$message.error(data.msg)
+            this.dataSelect()
           }
 
 				})