From 591dc206bc65392bc187952a9c801ddd23176e55 Mon Sep 17 00:00:00 2001 From: liuye Date: Fri, 24 Dec 2021 21:54:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E5=86=8C=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppCountryAlbum/detail.vue | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/apps/AppCountryAlbum/detail.vue b/src/apps/AppCountryAlbum/detail.vue index 77244098..092c377e 100644 --- a/src/apps/AppCountryAlbum/detail.vue +++ b/src/apps/AppCountryAlbum/detail.vue @@ -33,15 +33,15 @@

{{e.createUserName}} 上传

- - + +
- + @@ -72,18 +72,20 @@ export default { }, methods: { - del() { - if(!this.ids) { + delConfirm() { + if(!this.delIds.length) { return this.$u.toast('请先选中需要删除的照片') } - var id = this.ids.jion(',') + var id = this.delIds.join(',') this.$confirm('确定删除这些相片?').then(() => { - this.$http.post(`/app/appvillagepicturealbum/deleteForWx?id=${id}`).then((res) => { + this.$http.post(`/app/appvillagepicturealbum/delete?ids=${id}`).then((res) => { if (res.code == 0) { this.$u.toast('删除成功!') this.list = [] this.getList() + this.getStatistic() this.editClick('取消') + uni.$emit('updateList') } }) }) @@ -91,7 +93,7 @@ export default { editClick(text) { this.editText = text == '编辑' ? '取消' : '编辑' this.delIds = [] - if(text == '取消') { + if(text == '取消' && this.delIds.length) { this.list = [] this.getList() } @@ -99,6 +101,7 @@ export default { checkImg(row, index, indexs) { this.list[index].list[indexs].isCheked = true this.delIds.push(row.id) + this.$forceUpdate() }, delSelect(row, index, indexs) { this.list[index].list[indexs].isCheked = false @@ -107,6 +110,7 @@ export default { this.delIds.splice(i, 1) } }) + this.$forceUpdate() }, previewImage(images, img) { uni.previewImage({