图片懒加载
This commit is contained in:
@@ -181,7 +181,7 @@
|
||||
this.albumId = query.albumId
|
||||
}
|
||||
|
||||
this.img = query.url
|
||||
this.img = decodeURIComponent(query.url)
|
||||
this.height = uni.getSystemInfoSync().windowHeight
|
||||
|
||||
this.getLocation()
|
||||
@@ -248,11 +248,10 @@
|
||||
this.$nextTick(() => {
|
||||
html2canvas(this.$refs.waterMarker, {
|
||||
allowTaint: true,
|
||||
useCORS: true,
|
||||
dpi: 300
|
||||
useCORS: true
|
||||
}).then((canvas) => {
|
||||
let dataURL = canvas.toDataURL('image/png')
|
||||
const file = this.dataURLtoFile(dataURL, 'photo.png')
|
||||
let dataURL = canvas.toDataURL('image/jpg')
|
||||
const file = this.dataURLtoFile(dataURL, 'photo.jpg')
|
||||
let formData = new FormData()
|
||||
formData.append('file', file)
|
||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user