更新:课程详情的初步代码
This commit is contained in:
109
types/course.d.ts
vendored
109
types/course.d.ts
vendored
@@ -51,3 +51,112 @@ export interface IMarketCourseListResponse extends IApiResponse {
|
||||
export interface IMessageListResponse extends IApiResponse {
|
||||
messages: INews[] // 消息列表
|
||||
}
|
||||
|
||||
/** 课程详情 */
|
||||
export interface ICourseDetail {
|
||||
id: number
|
||||
title: string
|
||||
image: string
|
||||
content: string
|
||||
canzk: string // 是否支持自考 0-否 1-是
|
||||
}
|
||||
|
||||
/** 课程目录 */
|
||||
export interface ICatalogue {
|
||||
id: number
|
||||
title: string
|
||||
type: number // 0-免费 1-付费 2-VIP专享
|
||||
isBuy: number // 是否已购买 0-否 1-是
|
||||
startTime: string | null // 开始学习时间
|
||||
endTime: string | null // 到期时间
|
||||
completion: number // 学习进度百分比
|
||||
}
|
||||
|
||||
/** 章节信息 */
|
||||
export interface IChapter {
|
||||
id: number
|
||||
title: string
|
||||
isAudition: number // 是否试听 0-否 1-是
|
||||
isLearned: number // 是否已学 0-否 1-是
|
||||
conditions: string
|
||||
imgUrl?: string
|
||||
}
|
||||
|
||||
/** 章节详情 */
|
||||
export interface IChapterDetail {
|
||||
id: number
|
||||
title: string
|
||||
imgUrl: string
|
||||
content: string
|
||||
questions: string // 思考题内容
|
||||
}
|
||||
|
||||
/** 视频信息 */
|
||||
export interface IVideo {
|
||||
id: number
|
||||
title: string
|
||||
url: string
|
||||
duration?: number
|
||||
}
|
||||
|
||||
/** VIP信息 */
|
||||
export interface IVipInfo {
|
||||
type: number // VIP类型 4-中医学 5-针灸学 6-肿瘤学 7-国学 8-心理学 9-中西汇通学
|
||||
endTime: string // 到期时间
|
||||
}
|
||||
|
||||
/** 商品信息 */
|
||||
export interface IGoods {
|
||||
productId: number
|
||||
productName: string
|
||||
productImages: string
|
||||
price: number
|
||||
vipPrice: number | null
|
||||
activityPrice: number | null
|
||||
isVipPrice: number // 是否有VIP优惠 0-否 1-是
|
||||
productAmount: number // 购买数量
|
||||
delFlag?: number // 删除标记 -1-已下架
|
||||
}
|
||||
|
||||
/** 订单商品 */
|
||||
export interface IOrderGoods extends IGoods {
|
||||
// 继承商品信息
|
||||
}
|
||||
|
||||
/** 订单初始化数据 */
|
||||
export interface IOrderInitData {
|
||||
user: {
|
||||
id: number
|
||||
name: string
|
||||
jf: number // 积分
|
||||
}
|
||||
is_course: boolean // 是否为课程订单
|
||||
}
|
||||
|
||||
/** 课程详情响应 */
|
||||
export interface ICourseDetailResponse extends IApiResponse {
|
||||
data: {
|
||||
course: ICourseDetail
|
||||
catalogues: ICatalogue[]
|
||||
shopProductList?: IGoods[] // 相关书籍
|
||||
}
|
||||
}
|
||||
|
||||
/** 章节列表响应 */
|
||||
export interface IChapterListResponse extends IApiResponse {
|
||||
chapterList: IChapter[]
|
||||
}
|
||||
|
||||
/** 章节详情响应 */
|
||||
export interface IChapterDetailResponse extends IApiResponse {
|
||||
data: {
|
||||
detail: IChapterDetail
|
||||
videos: IVideo[]
|
||||
current?: number // 当前播放视频ID
|
||||
}
|
||||
}
|
||||
|
||||
/** 商品列表响应 */
|
||||
export interface IProductListResponse extends IApiResponse {
|
||||
productList: IGoods[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user