页面跳转逻辑,查看详细和供奉都一样实现页面跳转到供奉详细页面
This commit is contained in:
parent
87f4e91074
commit
87d8b28193
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
Loading…
Reference in New Issue
Block a user