diff --git a/frontend/src/pages/VCCourseDetail.jsx b/frontend/src/pages/VCCourseDetail.jsx index b30f4e7..289f522 100644 --- a/frontend/src/pages/VCCourseDetail.jsx +++ b/frontend/src/pages/VCCourseDetail.jsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { useParams, useNavigate, useSearchParams } from 'react-router-dom'; import { Typography, Button, Spin, Empty, Descriptions, Tag, Row, Col, Modal, Form, Input, message } from 'antd'; -import { ArrowLeftOutlined, ClockCircleOutlined, UserOutlined, BookOutlined, FormOutlined, CalendarOutlined } from '@ant-design/icons'; +import { ArrowLeftOutlined, ClockCircleOutlined, UserOutlined, BookOutlined, FormOutlined, CalendarOutlined, PlayCircleOutlined, LockOutlined } from '@ant-design/icons'; import { getVCCourseDetail, createOrder, nativePay, queryOrderStatus } from '../api'; import { useAuth } from '../context/AuthContext'; import { QRCodeSVG } from 'qrcode.react'; @@ -214,6 +214,62 @@ const VCCourseDetail = () => { {course.description} + {/* 视频课程播放区域 */} + {course.is_video_course && ( +
+ {course.video_url ? ( + + ) : ( +
+ + 课程视频内容已锁定 +

+ 请购买或报名该课程以解锁完整视频内容 +

+ +
+ )} +
+ )} +
¥{detail.price} + {/* 视频播放区域 */} + {detail.is_video_course && ( + + 课程视频 + {detail.video_url ? ( + + )} + {/* 讲师信息 */} 讲师介绍