diff --git a/src/utils/api.js b/src/utils/api.js
index fca5ac5..4ae60d5 100644
--- a/src/utils/api.js
+++ b/src/utils/api.js
@@ -54,6 +54,8 @@ export default {
checkCode: `${host3}/users/userAccount/checkCode`,
findPasswordByEmail: `${host3}/users/userAccount/findPasswordByEmail`,
findPasswordByPhone: `${host3}/users/userAccount/findPasswordByPhone`,
+ updateAccountEnable: `${host3}/users/userAccount/updateAccountEnable`,
+ updateAccountAllEnable: `${host3}/users/userAccount/updateAccountAllEnable`,
queryOrder: `${host}/liuwanr/order/queryOrder`, //查询订单
queryOrderDetails: `${host}/liuwanr/order/queryOrderDetails`, //查询订单详情
diff --git a/src/views/user/AddUser.vue b/src/views/user/AddUser.vue
index 15567de..c6cb161 100644
--- a/src/views/user/AddUser.vue
+++ b/src/views/user/AddUser.vue
@@ -348,7 +348,7 @@
{{item1.account}}
-
+
@@ -830,8 +830,13 @@ export default {
console.log(11,list)
}).catch(res => {})
},
- switchOff(val,item){
- console.log(val,item)
+ switchOff(val,row){
+ this.$get(this.api.updateAccountEnable,{
+ id: row.id,
+ isEnable: val
+ }).then(res => {
+ this.$message.success(val ? '启用成功' : '禁用成功')
+ }).catch(res => {})
}
}
};
diff --git a/src/views/user/User.vue b/src/views/user/User.vue
index e6c979c..b5ab9a5 100644
--- a/src/views/user/User.vue
+++ b/src/views/user/User.vue
@@ -110,7 +110,7 @@
删除
重置密码
-
+
@@ -336,14 +336,12 @@ export default {
}).catch(() => {})
},
switchOff(val,row,index) {
- let data = {
- id: row.id,
- isDisable: val
- }
- this.$post(this.api.updateClient,data).then((res) => {
- this.$message.success(val ? '启用成功' : '禁用成功')
- }).catch((res) => {
- })
+ this.$get(this.api.updateAccountAllEnable,{
+ id: row.userId,
+ isEnable: val
+ }).then(res => {
+ this.$message.success(val ? '启用成功' : '禁用成功')
+ }).catch(res => {})
},
handleSelectionChange(val) {
this.multipleSelection = val