's'
This commit is contained in:
31
lib/content/config.ts
Normal file
31
lib/content/config.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* 共享内容模块配置 - 可标准应用到 digital / nomadvip / nomadlms
|
||||
*/
|
||||
|
||||
export type EbookConfig = {
|
||||
title: string;
|
||||
backHref: string;
|
||||
/** 是否需权限,免费则 false */
|
||||
requireAuth?: boolean;
|
||||
/** 预计阅读分钟数,用于倒计时/展示 */
|
||||
estimatedMinutes?: number;
|
||||
/** 存储 key 前缀,区分项目 */
|
||||
storagePrefix?: string;
|
||||
};
|
||||
|
||||
export type CourseConfig = {
|
||||
courseId: string;
|
||||
courseHomeHref: string;
|
||||
payHref: string;
|
||||
/** 试看:[[moduleIndex, lessonIndex], ...] 或 (m,l)=>boolean */
|
||||
freeTrial?: [number, number][] | ((m: number, l: number) => boolean);
|
||||
/** 视频进度存储前缀 */
|
||||
videoStoragePrefix?: string;
|
||||
/** 学习进度存储前缀 */
|
||||
learningStoragePrefix?: string;
|
||||
};
|
||||
|
||||
export type ContentConfig = {
|
||||
ebook: EbookConfig;
|
||||
course: CourseConfig;
|
||||
};
|
||||
Reference in New Issue
Block a user