commit
This commit is contained in:
@@ -591,10 +591,12 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
pageBack() {
|
||||
if(this.fromUrlByMy !== 'find') {
|
||||
pjaxReplace('/platform/mobile/theRapyRecuperation/mobileLineListPage')
|
||||
} else {
|
||||
window.removeEventListener('scroll', this.scrollToTop)
|
||||
document.removeEventListener('click', this.handleClick)
|
||||
if(['find', 'editDo'].includes(this.fromUrlByMy)) {
|
||||
pjaxReplace('/platform/mobile/theRapyRecuperation/myRecuperation')
|
||||
} else {
|
||||
pjaxReplace('/platform/mobile/theRapyRecuperation/mobileLineListPage')
|
||||
}
|
||||
},
|
||||
openRead() {
|
||||
@@ -794,8 +796,11 @@ layout("/mobile/platform.html"){
|
||||
this.configData = resp.data
|
||||
},
|
||||
handleClick(event, classArray = [], imagesArray = []) {
|
||||
if(event == null) {
|
||||
return
|
||||
}
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
if(imagesArray.length > 0) {
|
||||
if(classArray.length > 0) {
|
||||
const index = classArray.indexOf(event.target.className)
|
||||
if(index !== -1) {
|
||||
vant.ImagePreview({
|
||||
@@ -813,6 +818,7 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
readPDFPicture(pdf) {
|
||||
const that = this
|
||||
if(pdf != null) {
|
||||
pdf.on("complete", function () {
|
||||
const imgDoc = document.querySelectorAll('img')
|
||||
@@ -852,21 +858,18 @@ layout("/mobile/platform.html"){
|
||||
pdfh5 = new Pdfh5('#demo', {
|
||||
pdfurl: href,
|
||||
})
|
||||
this.readPDFPicture(pdfh5)
|
||||
})
|
||||
}catch (e) {
|
||||
this.isPdf = true
|
||||
document.addEventListener('click', (event) => this.handleClick(event))
|
||||
//document.addEventListener('click', (event) => this.handleClick(event, [], []))
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.readPDFPicture(pdfh5)
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.scrollToTop)
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('scroll', this.scrollToTop)
|
||||
document.removeEventListener('click', (event) => this.handleClick(event))
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user