页面跳转逻辑,查看详细和供奉都一样实现页面跳转到供奉详细页面

This commit is contained in:
minimaxagent1 2025-08-12 09:01:21 +08:00
parent 87f4e91074
commit 87d8b28193
3 changed files with 27 additions and 13 deletions

View File

@ -11,7 +11,7 @@
<text class="status-value">{{ remainingTime }}</text>
</view>
</view>
<view class="detail-link" @click="viewDetails">
<view class="detail-link" @click="viewDetails" v-if="showDetailLink">
<text>查看详情></text>
</view>
</view>
@ -28,6 +28,11 @@ export default {
unitId: {
type: String,
default: ''
},
//
showDetailLink: {
type: Boolean,
default: true
}
},
data() {

View File

@ -153,20 +153,12 @@ export default {
}
},
//
handleViewDetails(unitData) {
console.log('查看单元详情:', unitData)
// 殿
navigateToMemorialHall(unitId) {
console.log('跳转到往生大殿页面ID:', unitId)
},
// - 殿
submitPrayer() {
console.log('提交供奉跳转到往生大殿页面ID:', this.selectedUnitId)
// 殿殿ID
uni.navigateTo({
url: `/pages/memorial/memorialHall?id=${this.selectedUnitId}`,
url: `/pages/memorial/memorialHall?id=${unitId}`,
success: () => {
console.log('跳转成功')
},
@ -178,6 +170,18 @@ export default {
})
}
})
},
//
handleViewDetails(unitData) {
console.log('查看单元详情:', unitData)
this.navigateToMemorialHall(unitData.id)
},
// - 殿
submitPrayer() {
console.log('提交供奉跳转到往生大殿页面ID:', this.selectedUnitId)
this.navigateToMemorialHall(this.selectedUnitId)
}
}

View File

@ -97,6 +97,7 @@
v-if="selectedUnitId"
:unit-id="selectedUnitId"
@view-details="handleViewDetails"
:showDetailLink="false"
/>
<view class="placeholder"></view>
<!-- 供奉列表 -->
@ -531,4 +532,8 @@ export default {
background: #FFFBF5;
height: 180rpx;
}
.placeholder{
height: 20rpx;
}
</style>