From 9f12e9ba7845758e6eb019fec33dbe3c3c2c2b60 Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 31 Dec 2021 17:23:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppCountryAlbum/AppCountryAlbum.vue | 25 ++++++++++++-------- src/apps/AppCountryAlbum/list.vue | 6 +---- src/components/AiAreaPicker.vue | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/apps/AppCountryAlbum/AppCountryAlbum.vue b/src/apps/AppCountryAlbum/AppCountryAlbum.vue index 3f74013e..d5fb1694 100644 --- a/src/apps/AppCountryAlbum/AppCountryAlbum.vue +++ b/src/apps/AppCountryAlbum/AppCountryAlbum.vue @@ -1,10 +1,6 @@ @@ -19,28 +15,37 @@ export default { data() { return { component: 'List', - params: {} + params: {}, + refresh: true } }, - components: { Detail, List }, + components: {Detail, List}, onShow() { document.title = "乡村相册" + this.handleRefresh() }, methods: { onChange(e) { this.params = e.params this.component = e.type + }, + handleRefresh() { + this.refresh = false + this.$nextTick(() => { + this.refresh = true + }) } }, } \ No newline at end of file + diff --git a/src/apps/AppCountryAlbum/list.vue b/src/apps/AppCountryAlbum/list.vue index cf8fc5ed..67088bb8 100644 --- a/src/apps/AppCountryAlbum/list.vue +++ b/src/apps/AppCountryAlbum/list.vue @@ -35,7 +35,7 @@ export default { } }, computed: { ...mapState(['user']) }, - mounted() { + created() { this.areaId = this.user.areaId this.areaName = this.user.areaName this.getList() @@ -44,10 +44,6 @@ export default { }) this.cdn = this.$cdn.replace("/dvcp/h5",""); }, - onShow() { - document.title = "乡村相册" - }, - methods: { areaSelect(e) { this.areaId = e diff --git a/src/components/AiAreaPicker.vue b/src/components/AiAreaPicker.vue index 0472986f..2887ad1a 100644 --- a/src/components/AiAreaPicker.vue +++ b/src/components/AiAreaPicker.vue @@ -127,7 +127,7 @@ export default { } return this.fullArea } - }) + }) || Promise.reject() }, getChildAreas(id) { id && this.$http.post('/admin/area/queryAreaByParentId', null, {