修复跳转功能

This commit is contained in:
2026-06-15 18:10:39 +08:00
parent d7961694f9
commit 1c547a717e
@@ -1,6 +1,6 @@
<template>
<!-- 推荐团课卡片 -->
<view class="recommend-card" :style="cardStyle">
<view class="recommend-card" :style="cardStyle" @click="handleCardClick">
<!-- 卡片头部推荐信息 -->
<view class="card-header">
<text class="recommend-title">{{ recommend.recommendTitle || '推荐课程' }}</text>
@@ -56,8 +56,8 @@
</view>
<!-- 卡片底部操作按钮 -->
<view class="card-footer">
<view class="action-btn" @click="handleJoinCourse">
<view class="card-footer" @click.stop="handleJoinCourse">
<view class="action-btn">
<text>立即预约</text>
</view>
</view>
@@ -163,6 +163,15 @@ const formattedTime = computed(() => {
return `${date} ${time}`
})
// 处理卡片点击(跳转到详情页)
const handleCardClick = () => {
if (!props.recommend.groupCourse) {
uni.showToast({ title: '课程信息不完整', icon: 'none' })
return
}
uni.navigateTo({ url: `/pages/groupCourse/detail?id=${courseId.value}` })
}
// 处理预约课程点击
const handleJoinCourse = () => {
if (props.recommend.groupCourse?.status === 2) {