commit
This commit is contained in:
@@ -233,7 +233,7 @@ layout("/mobile/platform.html"){
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.go(-1)" fixed left-arrow placeholder
|
||||
<van-nav-bar @click-left="pageBack" fixed left-arrow placeholder
|
||||
title="职工疗休养-线路介绍"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
@@ -321,9 +321,7 @@ layout("/mobile/platform.html"){
|
||||
<!--底部报名按钮-->
|
||||
<div class="footer" v-if="fromUrlByMy != 'edit'">
|
||||
<template v-if="lineData.isNormal==0&&lineData.isNormalFalse>0">
|
||||
<van-button @click="join"
|
||||
class="join">我要报名
|
||||
</van-button>
|
||||
<van-button @click="join" class="join">我要报名</van-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-button v-if="moment().unix() <= moment(lineData.changeEndTime).unix()" @click="join"
|
||||
@@ -592,6 +590,10 @@ layout("/mobile/platform.html"){
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
pageBack(){
|
||||
|
||||
pjaxReplace('/platform/mobile/theRapyRecuperation/mobileLineListPage')
|
||||
},
|
||||
openRead() {
|
||||
this.readVisible = true
|
||||
this.$nextTick(() => {
|
||||
@@ -788,6 +790,18 @@ layout("/mobile/platform.html"){
|
||||
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
this.configData = resp.data
|
||||
},
|
||||
handleClick(event, classArray = []) {
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
const index = classArray.indexOf(event.target.className)
|
||||
if(index !== -1) {
|
||||
vant.ImagePreview({
|
||||
images: array,
|
||||
startPosition: index,
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
readPDFPicture(pdf) {
|
||||
if(pdf != null) {
|
||||
pdf.on("complete", function () {
|
||||
@@ -800,19 +814,7 @@ layout("/mobile/platform.html"){
|
||||
array.push(o.getAttribute('src'))
|
||||
}
|
||||
})
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
const index = classArray.indexOf(event.target.className)
|
||||
if(index !== -1) {
|
||||
vant.ImagePreview({
|
||||
images: array,
|
||||
startPosition: index,
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
document.addEventListener('click', (event) => this.handleClick(event, classArray))
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -839,19 +841,11 @@ layout("/mobile/platform.html"){
|
||||
this.$nextTick(() => {
|
||||
pdfh5 = new Pdfh5('#demo', {
|
||||
pdfurl: href,
|
||||
});
|
||||
})
|
||||
})
|
||||
}catch (e) {
|
||||
this.isPdf = true
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
vant.ImagePreview({
|
||||
images: [event.target.src],
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
document.addEventListener('click', (event) => this.handleClick(event))
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.readPDFPicture(pdfh5)
|
||||
@@ -862,6 +856,7 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('scroll', this.scrollToTop)
|
||||
document.removeEventListener('click', (event) => this.handleClick(event))
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user