This commit is contained in:
2026-07-14 16:40:42 +08:00
parent 33687bbd66
commit 2168888ca7
149 changed files with 2784 additions and 692 deletions
@@ -425,7 +425,7 @@ layout("/layouts/platform_h5.html"){
<van-cell title="线路类型" :value="detail.lineType || ''"></van-cell>
<van-cell title="出行时间" :value="detail.travelPeriod || ''"></van-cell>
<van-cell title="报名酒店" :value="detail.hotelName || ''"></van-cell>
<van-cell title="旅行社" :value="detail.travelAgencyName || ''"></van-cell>
<van-cell title="服务单位" :value="detail.travelAgencyName || ''"></van-cell>
<van-cell v-if="detailFillBedInfo" title="床型" :value="detail.bedType || ''"></van-cell>
<van-cell v-if="detailFillBedInfo" title="床位信息" :value="detail.bedInfo || ''"></van-cell>
<van-cell v-if="detailFillBedInfo" title="意向拼床人" :value="detail.intendedRoommate || ''"></van-cell>
@@ -216,7 +216,7 @@ layout("/layouts/platform_h5.html"){
<van-cell title="出行时段" :value="detail.travelPeriod || ''"></van-cell>
<van-cell title="报名时间" :value="detail.signupTime || ''"></van-cell>
<van-cell title="报名酒店" :value="detail.hotelName || ''"></van-cell>
<van-cell title="旅行社" :value="detail.travelAgencyName || ''"></van-cell>
<van-cell title="服务单位" :value="detail.travelAgencyName || ''"></van-cell>
<van-cell v-if="fillBedInfo" title="床型" :value="detail.bedType || ''"></van-cell>
<van-cell v-if="fillBedInfo" title="床位信息" :value="detail.bedInfo || ''"></van-cell>
<van-cell v-if="fillBedInfo" title="意向拼床人" :value="detail.intendedRoommate || ''"></van-cell>
@@ -3,10 +3,11 @@ layout("/layouts/platform_tour_signup_h5.html"){
#-->
<style scoped>
.tour-signup-h5 {
#app.tour-signup-h5 {
/* 覆盖公共 #app 固定高度,确保长须知内容和底部占位共同参与页面滚动。 */
height: auto;
min-height: 100vh;
background: #f5f7fb;
padding-bottom: 80px;
box-sizing: border-box;
}
@@ -143,15 +144,24 @@ layout("/layouts/platform_tour_signup_h5.html"){
padding: 34px 0 26px;
}
.tour-signup-footer-spacer {
/* 占位元素位于正文流末尾,保证最后一行可完整滚动到固定按钮栏上方。 */
height: 110px;
height: calc(110px + env(safe-area-inset-bottom));
}
.tour-signup-footer {
position: fixed;
right: 0;
bottom: 0;
left: 0;
/* 不支持安全区变量时使用固定内边距,避免整条 padding 声明失效。 */
padding: 10px 12px;
padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
background: rgba(255, 255, 255, 0.96);
box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
box-sizing: border-box;
z-index: 20;
}
</style>
@@ -196,8 +206,18 @@ layout("/layouts/platform_tour_signup_h5.html"){
</van-skeleton>
</div>
<div class="tour-signup-footer-spacer" aria-hidden="true"></div>
<div class="tour-signup-footer">
<van-button block type="info" color="#0f74bc" round @click="confirmRead">我已阅读</van-button>
<van-button
block
type="info"
color="#0f74bc"
round
:disabled="readCountdown > 0"
@click="confirmRead">
{{ readButtonText }}
</van-button>
</div>
</div>
@@ -217,6 +237,8 @@ layout("/layouts/platform_tour_signup_h5.html"){
pdfPageCount: 0,
pdfRenderedPages: 0,
pdfRenderToken: 0,
readCountdown: 10,
readCountdownTimer: null,
bannerList: [
"/assets/platform/images/tour/tour-h5-banner-1.jpg",
"/assets/platform/images/tour/tour-h5-banner-2.jpg"
@@ -228,7 +250,33 @@ layout("/layouts/platform_tour_signup_h5.html"){
}
}
},
computed: {
// 倒计时期间在按钮中展示剩余秒数,结束后恢复原确认文案。
readButtonText() {
return this.readCountdown > 0 ? "我已阅读(" + this.readCountdown + "秒)" : "我已阅读"
}
},
methods: {
// 启动十秒阅读倒计时,重复调用前先清理旧计时器,避免并发计时。
startReadCountdown() {
this.clearReadCountdown()
this.readCountdown = 10
this.readCountdownTimer = window.setInterval(() => {
if (this.readCountdown <= 1) {
this.readCountdown = 0
this.clearReadCountdown()
return
}
this.readCountdown -= 1
}, 1000)
},
// 页面离开或倒计时结束时释放计时器,避免页面销毁后继续更新状态。
clearReadCountdown() {
if (this.readCountdownTimer !== null) {
window.clearInterval(this.readCountdownTimer)
this.readCountdownTimer = null
}
},
parseContentHref(content) {
if (!content) {
return ""
@@ -386,13 +434,19 @@ layout("/layouts/platform_tour_signup_h5.html"){
})
},
confirmRead() {
// 方法内再次校验倒计时,防止通过脚本触发禁用按钮的点击事件。
if (this.readCountdown > 0) {
return
}
window.location.href = "/platform/tour/signup/h5/signup"
}
},
created() {
this.startReadCountdown()
this.loadServiceNotice()
},
beforeDestroy() {
this.clearReadCountdown()
this.clearPdfPreview()
}
})
@@ -470,8 +470,8 @@ layout("/layouts/platform_tour_signup_h5.html"){
<div class="tour-line-info">
<div><span>出行开始时间:</span>{{ row.travelStartTime || '暂无' }}</div>
<div><span>出行结束时间:</span>{{ row.travelEndTime || '暂无' }}</div>
<!-- 临时屏蔽旅行社信息,保留字段和接口便于后续恢复。
<div><span>旅行社:</span>{{ row.travelAgencyName || '暂无' }}</div>
<!-- 临时屏蔽服务单位信息,保留字段和接口便于后续恢复。
<div><span>服务单位:</span>{{ row.travelAgencyName || '暂无' }}</div>
-->
</div>
<div class="tour-line-actions">
@@ -214,7 +214,7 @@ layout("/layouts/platform_h5.html"){
<van-cell title="出行时段" :value="detail.travelPeriod || ''"></van-cell>
<van-cell title="报名时间" :value="detail.signupTime || ''"></van-cell>
<van-cell title="报名酒店" :value="detail.hotelName || ''"></van-cell>
<van-cell title="旅行社" :value="detail.travelAgencyName || ''"></van-cell>
<van-cell title="服务单位" :value="detail.travelAgencyName || ''"></van-cell>
<van-cell v-if="fillBedInfo" title="床型" :value="detail.bedType || ''"></van-cell>
<van-cell v-if="fillBedInfo" title="床位信息" :value="detail.bedInfo || ''"></van-cell>
<van-cell v-if="fillBedInfo" title="意向拼床人" :value="detail.intendedRoommate || ''"></van-cell>