diff --git a/app/Http/Admin/Services/ChapterContent.php b/app/Http/Admin/Services/ChapterContent.php
index 2ee8403c..3cc3fda3 100644
--- a/app/Http/Admin/Services/ChapterContent.php
+++ b/app/Http/Admin/Services/ChapterContent.php
@@ -197,6 +197,8 @@ class ChapterContent extends Service
$fileRemote['fd']['url'] = $validator->checkFileUrl($fdUrl);
}
+ $validator->checkRemoteFile($hdUrl, $sdUrl, $fdUrl);
+
$chapterRepo = new ChapterRepo();
$vod = $chapterRepo->findChapterVod($chapter->id);
diff --git a/app/Http/Admin/Views/chapter/edit_lesson_vod.volt b/app/Http/Admin/Views/chapter/edit_lesson_vod.volt
index 3718bf46..eff5554f 100644
--- a/app/Http/Admin/Views/chapter/edit_lesson_vod.volt
+++ b/app/Http/Admin/Views/chapter/edit_lesson_vod.volt
@@ -142,7 +142,7 @@
{% else %}
预览
@@ -154,7 +154,7 @@
{% if remote_play_urls.fd.url %}
-
+
预览
@@ -162,7 +162,7 @@
{% else %}
-
+
预览
diff --git a/app/Http/Admin/Views/chapter/lessons_live.volt b/app/Http/Admin/Views/chapter/lessons_live.volt
index d93e6fe9..74acfb80 100644
--- a/app/Http/Admin/Views/chapter/lessons_live.volt
+++ b/app/Http/Admin/Views/chapter/lessons_live.volt
@@ -36,9 +36,9 @@
编号 |
名称 |
课件 |
+ 学员 |
点赞 |
- 评论 |
- 直播时间 |
+ 时间 |
推流 |
排序 |
免费 |
@@ -60,8 +60,8 @@
课
{{ item.resource_count }} |
+ {{ item.user_count }} |
{{ item.like_count }} |
- {{ item.comment_count }} |
{{ live_time_info(item.attrs) }} |
{{ live_status_info(item.attrs['stream']['status']) }} |
|
diff --git a/app/Http/Admin/Views/chapter/lessons_read.volt b/app/Http/Admin/Views/chapter/lessons_read.volt
index e0a4d244..13891319 100644
--- a/app/Http/Admin/Views/chapter/lessons_read.volt
+++ b/app/Http/Admin/Views/chapter/lessons_read.volt
@@ -8,6 +8,7 @@
+
@@ -15,6 +16,7 @@
编号 |
名称 |
课件 |
+ 学员 |
点赞 |
评论 |
排序 |
@@ -40,6 +42,7 @@
{{ item.resource_count }} |
+ {{ item.user_count }} |
{{ item.like_count }} |
{{ item.comment_count }} |
|
diff --git a/app/Validators/ChapterVod.php b/app/Validators/ChapterVod.php
index 3864c4fe..81651391 100644
--- a/app/Validators/ChapterVod.php
+++ b/app/Validators/ChapterVod.php
@@ -57,4 +57,11 @@ class ChapterVod extends Validator
return $value;
}
+ public function checkRemoteFile($hd, $sd, $fd)
+ {
+ if (empty($hd) && empty($sd) && empty($fd)) {
+ throw new BadRequestException('chapter_vod.remote_file_required');
+ }
+ }
+
}
diff --git a/config/errors.php b/config/errors.php
index 935e6367..acf05cd7 100644
--- a/config/errors.php
+++ b/config/errors.php
@@ -269,6 +269,7 @@ $error['chapter_vod.invalid_duration'] = '无效的视频时长';
$error['chapter_vod.invalid_file_id'] = '无效的文件编号';
$error['chapter_vod.invalid_file_url'] = '无效的文件地址';
$error['chapter_vod.invalid_file_ext'] = '无效的文件格式(目前只支持mp4,m3u8)';
+$error['chapter_vod.remote_file_required'] = '请填写远程播放地址';
/**
* 直播相关