This commit is contained in:
ChuXun
2025-10-19 20:28:31 +08:00
parent c81f8a8b03
commit eaab9a762a
100 changed files with 23416 additions and 0 deletions

View File

@@ -0,0 +1,121 @@
<!--pages/course-detail/course-detail.wxml-->
<view class="container" wx:if="{{course}}">
<!-- 课程头部 -->
<view class="course-header">
<view class="course-name">{{course.name}}</view>
<view class="course-meta">
<text class="meta-tag">{{course.category}}</text>
<text class="meta-tag">{{course.credit}}学分</text>
</view>
</view>
<!-- 基本信息卡片 -->
<view class="info-card">
<view class="info-row">
<text class="info-icon">👨‍🏫</text>
<view class="info-content">
<text class="info-label">授课教师</text>
<text class="info-value">{{course.teacher}}</text>
</view>
</view>
<view class="info-row">
<text class="info-icon">🏫</text>
<view class="info-content">
<text class="info-label">开课院系</text>
<text class="info-value">{{course.department}}</text>
</view>
</view>
<view class="info-row">
<text class="info-icon">📍</text>
<view class="info-content">
<text class="info-label">上课地点</text>
<text class="info-value">{{course.location}}</text>
</view>
</view>
<view class="info-row">
<text class="info-icon">⏰</text>
<view class="info-content">
<text class="info-label">上课时间</text>
<text class="info-value">{{course.time}}</text>
</view>
</view>
<view class="info-row">
<text class="info-icon">👥</text>
<view class="info-content">
<text class="info-label">选课人数</text>
<text class="info-value">{{course.enrolled}}/{{course.capacity}}</text>
</view>
</view>
</view>
<!-- 标签栏 -->
<view class="tab-bar">
<view
class="tab-item {{activeTab === index ? 'active' : ''}}"
wx:for="{{tabs}}"
wx:key="index"
data-index="{{index}}"
bindtap="onTabChange"
>
{{item}}
</view>
</view>
<!-- 内容区域 -->
<view class="content-area">
<!-- 课程信息 -->
<view class="tab-content" wx:if="{{activeTab === 0}}">
<view class="section">
<view class="section-title">课程简介</view>
<view class="section-content">{{course.description}}</view>
</view>
</view>
<!-- 教学大纲 -->
<view class="tab-content" wx:if="{{activeTab === 1}}">
<view class="section">
<view class="section-title">教学内容</view>
<view class="syllabus-list">
<view
class="syllabus-item"
wx:for="{{course.syllabus}}"
wx:key="index"
>
<text class="syllabus-number">{{index + 1}}</text>
<text class="syllabus-text">{{item}}</text>
</view>
</view>
</view>
</view>
<!-- 课程评价 -->
<view class="tab-content" wx:if="{{activeTab === 2}}">
<view class="empty-tip">
<text class="empty-icon">💬</text>
<text class="empty-text">暂无评价,快来发表第一条评价吧</text>
</view>
</view>
</view>
<!-- 底部操作栏 -->
<view class="action-bar">
<button
class="action-btn favorite-btn"
bindtap="onToggleFavorite"
>
<text class="btn-icon">{{isFavorite ? '❤️' : '🤍'}}</text>
<text>{{isFavorite ? '已收藏' : '收藏'}}</text>
</button>
<button
class="action-btn share-btn"
open-type="share"
>
<text class="btn-icon">📤</text>
<text>分享</text>
</button>
</view>
</view>