1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-22 03:32:47 +08:00

v1.4.2 beta2

This commit is contained in:
koogua 2021-08-12 18:33:49 +08:00
parent de7fd43cd4
commit bcc9979ef7
6 changed files with 19 additions and 6 deletions

View File

@ -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);

View File

@ -142,7 +142,7 @@
</div>
{% else %}
<div class="layui-inline" style="width:55%;">
<input id="tc-sd-url" class="layui-input" type="text" name="file_remote[sd][url]" value="{{ remote_play_urls.sd.url }}">
<input id="tc-sd-url" class="layui-input" type="text" name="file_remote[sd][url]" value="">
</div>
<div class="layui-inline">
<span class="layui-btn layui-btn-disabled">预览</span>
@ -154,7 +154,7 @@
<label class="layui-form-label">极速地址</label>
{% if remote_play_urls.fd.url %}
<div class="layui-inline" style="width:55%;">
<input id="tc-fd-url" class="layui-input" type="text" name="file_remote[fd][url]" value="{{ remote_play_urls.fd.url }}" lay-verify="required">
<input id="tc-fd-url" class="layui-input" type="text" name="file_remote[fd][url]" value="{{ remote_play_urls.fd.url }}">
</div>
<div class="layui-inline">
<span class="layui-btn kg-preview" data-chapter-id="{{ chapter.id }}" data-play-url="{{ remote_play_urls.hd.url }}">预览</span>
@ -162,7 +162,7 @@
</div>
{% else %}
<div class="layui-inline" style="width:55%;">
<input id="tc-fd-url" class="layui-input" type="text" name="file_remote[fd][url]" value="" lay-verify="required">
<input id="tc-fd-url" class="layui-input" type="text" name="file_remote[fd][url]" value="">
</div>
<div class="layui-inline">
<span class="layui-btn layui-btn-disabled">预览</span>

View File

@ -36,9 +36,9 @@
<th>编号</th>
<th>名称</th>
<th>课件</th>
<th>学员</th>
<th>点赞</th>
<th>评论</th>
<th>直播时间</th>
<th>时间</th>
<th>推流</th>
<th>排序</th>
<th>免费</th>
@ -60,8 +60,8 @@
<span class="layui-badge layui-bg-green">课</span>
</td>
<td>{{ item.resource_count }}</td>
<td>{{ item.user_count }}</td>
<td>{{ item.like_count }}</td>
<td>{{ item.comment_count }}</td>
<td>{{ live_time_info(item.attrs) }}</td>
<td>{{ live_status_info(item.attrs['stream']['status']) }}</td>
<td><input class="layui-input kg-priority" type="text" name="priority" title="数值越小排序越靠前" value="{{ item.priority }}" data-url="{{ update_url }}"></td>

View File

@ -8,6 +8,7 @@
<col>
<col>
<col>
<col>
<col width="10%">
</colgroup>
<thead>
@ -15,6 +16,7 @@
<th>编号</th>
<th>名称</th>
<th>课件</th>
<th>学员</th>
<th>点赞</th>
<th>评论</th>
<th>排序</th>
@ -40,6 +42,7 @@
</p>
</td>
<td>{{ item.resource_count }}</td>
<td>{{ item.user_count }}</td>
<td>{{ item.like_count }}</td>
<td>{{ item.comment_count }}</td>
<td><input class="layui-input kg-priority" type="text" name="priority" title="数值越小排序越靠前" value="{{ item.priority }}" data-url="{{ update_url }}"></td>

View File

@ -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');
}
}
}

View File

@ -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'] = '无效的文件格式目前只支持mp4m3u8';
$error['chapter_vod.remote_file_required'] = '请填写远程播放地址';
/**
* 直播相关