main
liudan 2 years ago
parent 7629a5706b
commit 4e4d1368e7
  1. 11
      pages/checkList/checkList.vue
  2. 11
      pages/taskDetail/taskDetail.vue

@ -162,11 +162,7 @@
}, },
downLoad(item) { downLoad(item) {
console.log(item) console.log(item)
if (item.file_suffix == 'png') { if (item.file_suffix == 'pdf') {
uni.previewImage({
urls: [item.path]
})
} else {
uni.downloadFile({ uni.downloadFile({
url: item.path, url: item.path,
success: (data) => { success: (data) => {
@ -200,6 +196,11 @@
}) })
} }
}); });
} else {
uni.previewImage({
urls: [item.path]
})
} }
}, },
goProgress(item){ goProgress(item){

@ -208,11 +208,7 @@
}, },
downLoad(item) { downLoad(item) {
if (this.contentInfo.file_suffix == 'png') { if (this.contentInfo.file_suffix == 'pdf') {
uni.previewImage({
urls: [item]
})
} else {
uni.downloadFile({ uni.downloadFile({
url: item, url: item,
success: (data) => { success: (data) => {
@ -246,6 +242,11 @@
}) })
} }
}); });
} else {
uni.previewImage({
urls: [item]
})
} }
}, },
async afterRead(event) { async afterRead(event) {

Loading…
Cancel
Save