diff --git a/src/saas/AppCountryAlbum/AddAlbum.vue b/src/saas/AppCountryAlbum/AddAlbum.vue index 11c2fc62..489bb372 100644 --- a/src/saas/AppCountryAlbum/AddAlbum.vue +++ b/src/saas/AppCountryAlbum/AddAlbum.vue @@ -77,7 +77,7 @@ this.getInfo(query.id) } - uni.$on('change', e => { + uni.$on('watermarkChange', e => { if (e.type === 'watermark') { this.watermarkId = e.value } diff --git a/src/saas/AppCountryAlbum/AlbumDetail.vue b/src/saas/AppCountryAlbum/AlbumDetail.vue index 9c0369d9..9ee10826 100644 --- a/src/saas/AppCountryAlbum/AlbumDetail.vue +++ b/src/saas/AppCountryAlbum/AlbumDetail.vue @@ -102,8 +102,13 @@ }) uni.$on('update', () => { + this.isMore = false + this.current = 1 this.getTotalInfo(query.id) - this.getList() + + this.$nextTick(() => { + this.getList() + }) }) }, diff --git a/src/saas/AppCountryAlbum/EditAlbum.vue b/src/saas/AppCountryAlbum/EditAlbum.vue index 07605655..623fc916 100644 --- a/src/saas/AppCountryAlbum/EditAlbum.vue +++ b/src/saas/AppCountryAlbum/EditAlbum.vue @@ -80,9 +80,9 @@ methods: { getList () { - this.$http.post(`/api/appalbumphoto/DetailByAlbumID?albumId=${this.id}`).then(res => { + this.$http.post(`/api/appalbumphoto/DetailByAlbumID?albumId=${this.id}&pageSize=100000`).then(res => { if (res.code === 0) { - this.list = res.data.map(v => { + this.list = res.data.records.map(v => { return { ...v, checked: false diff --git a/src/saas/AppCountryAlbum/PersonnelSetting.vue b/src/saas/AppCountryAlbum/PersonnelSetting.vue index e5438ad8..880d661a 100644 --- a/src/saas/AppCountryAlbum/PersonnelSetting.vue +++ b/src/saas/AppCountryAlbum/PersonnelSetting.vue @@ -68,7 +68,7 @@ return this.$u.toast('请选择人员') } - uni.$emit('change', { + uni.$emit('watermarkChange', { type: 'personnel', value: this.userList.length ? this.userList : [] }) diff --git a/src/saas/AppCountryAlbum/SourceSetting.vue b/src/saas/AppCountryAlbum/SourceSetting.vue index fc98e110..01198cfc 100644 --- a/src/saas/AppCountryAlbum/SourceSetting.vue +++ b/src/saas/AppCountryAlbum/SourceSetting.vue @@ -42,7 +42,7 @@ methods: { save () { - uni.$emit('change', { + uni.$emit('watermarkChange', { type: 'photoSource', value: this.currIndex }) diff --git a/src/saas/AppCountryAlbum/Watermark.vue b/src/saas/AppCountryAlbum/Watermark.vue index 6aebcd30..6e0548f6 100644 --- a/src/saas/AppCountryAlbum/Watermark.vue +++ b/src/saas/AppCountryAlbum/Watermark.vue @@ -166,7 +166,7 @@ this.isHide = true this.$loading() this.$nextTick(() => { - html2canvas(this.$refs.waterMarker, { + html2canvas(this.$refs.photo, { allowTaint: true, useCORS: true }).then((canvas) => { @@ -330,6 +330,7 @@ .waterMarker-img { width: 100%; + // max-height: 100vh; } .watermark { diff --git a/src/saas/AppCountryAlbum/WatermarkSetting.vue b/src/saas/AppCountryAlbum/WatermarkSetting.vue index e736b9ec..9087daa6 100644 --- a/src/saas/AppCountryAlbum/WatermarkSetting.vue +++ b/src/saas/AppCountryAlbum/WatermarkSetting.vue @@ -44,15 +44,13 @@ config, list: [], chooseIndex: -1, + id: '', pageShow: false } }, onLoad (query) { - if (query.value) { - this.currIndex = 1 - this.chooseIndex = query.value ? Number(query.value) : -1 - } + this.id = query.value this.getList() }, @@ -65,6 +63,11 @@ this.list = res.data.records } + if (this.id) { + this.chooseIndex = this.list.map(v => v.id).indexOf(this.id) + this.currIndex = 1 + } + this.pageShow = true this.$hideLoading() @@ -72,9 +75,9 @@ }, save () { - uni.$emit('change', { + uni.$emit('watermarkChange', { type: 'watermark', - value: this.chooseIndex > -1 ? String(this.chooseIndex) : '' + value: this.chooseIndex > -1 ? this.list[this.chooseIndex].id : '' }) uni.navigateBack({ delta: 1