Commit 0bafb213 by crushh

update: dist

parent d69f4c4d
......@@ -121,6 +121,7 @@ export default {
});
},
deleteActiveTag(list, index, e) {
console.log(e)
this.deleteTagDialog.visible = true;
this.deleteTagDialog.deleteData = {
...list,
......@@ -129,13 +130,19 @@ export default {
};
},
doDelete(list) {
const { currentIndex: index, e, memberCount } = list;
// memberCount为0时不加入垃圾桶,直接删除
if (memberCount == 0) {
this.directDelTag(list);
} else {
this.intoTrash(list, index, e);
}
const { currentIndex: index, e,tagId } = list;
getRequest('/memberTag/getTagById', { tagId }).then(res => {
const { errorCode, result } = res.data;
if (errorCode == 0) {
if(!result.memberCount){ // memberCount为0时不加入垃圾桶,直接删除
this.directDelTag(list);
} else {
this.intoTrash(list, index, e);
}
}
}).catch(err => {
console.log(err);
});
},
directDelTag(list) {
const param = {
......
......@@ -143,13 +143,19 @@ export default {
};
},
doDelete(list) {
const { currentIndex: index, e, memberCount } = list;
// memberCount为0时不加入垃圾桶,直接删除
if (memberCount == 0) {
this.directDelTag(list);
} else {
this.intoTrash(list, index, e);
}
const { currentIndex: index, e,tagId } = list;
getRequest('/memberTag/getTagById', { tagId }).then(res => {
const { errorCode, result } = res.data;
if (errorCode == 0) {
if(!result.memberCount){ // memberCount为0时不加入垃圾桶,直接删除
this.directDelTag(list);
} else {
this.intoTrash(list, index, e);
}
}
}).catch(err => {
console.log(err);
});
},
directDelTag(list) {
const param = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment