This commit is contained in:
yanran200730
2022-05-25 17:50:44 +08:00
parent f23adc52ef
commit 7211926a77
7 changed files with 22 additions and 13 deletions

View File

@@ -77,7 +77,7 @@
this.getInfo(query.id)
}
uni.$on('change', e => {
uni.$on('watermarkChange', e => {
if (e.type === 'watermark') {
this.watermarkId = e.value
}

View File

@@ -102,8 +102,13 @@
})
uni.$on('update', () => {
this.isMore = false
this.current = 1
this.getTotalInfo(query.id)
this.getList()
this.$nextTick(() => {
this.getList()
})
})
},

View File

@@ -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

View File

@@ -68,7 +68,7 @@
return this.$u.toast('请选择人员')
}
uni.$emit('change', {
uni.$emit('watermarkChange', {
type: 'personnel',
value: this.userList.length ? this.userList : []
})

View File

@@ -42,7 +42,7 @@
methods: {
save () {
uni.$emit('change', {
uni.$emit('watermarkChange', {
type: 'photoSource',
value: this.currIndex
})

View File

@@ -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 {

View File

@@ -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