From 12f76989f5ad132ca36c8f52fd08e668d226f2b5 Mon Sep 17 00:00:00 2001 From: koogua Date: Sun, 13 Jun 2021 16:43:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 13 +++++++++++++ app/Library/AppInfo.php | 2 +- app/Validators/Course.php | 9 +++++---- config/errors.php | 3 ++- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7fa878f..773d6d48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +### [v1.3.7](https://gitee.com/koogua/course-tencent-cloud/releases/v1.3.7)(2021-06-14) + +### 更新 + +- 升级layui到v2.6.8 +- 升级腾讯云播放器到v2.4.0 +- 点播增加外链支持 +- 源文件增加版权信息 +- 优化模块继承基类 +- 优化评论审核机制 +- 优化课程和群组状态协同逻辑 +- 优化用户索引重建逻辑 + ### [v1.3.6](https://gitee.com/koogua/course-tencent-cloud/releases/v1.3.6)(2021-06-04) ### 更新 diff --git a/app/Library/AppInfo.php b/app/Library/AppInfo.php index 0f900c15..351bec49 100644 --- a/app/Library/AppInfo.php +++ b/app/Library/AppInfo.php @@ -16,7 +16,7 @@ class AppInfo protected $link = 'https://koogua.com'; - protected $version = '1.3.6'; + protected $version = '1.3.7'; public function __get($name) { diff --git a/app/Validators/Course.php b/app/Validators/Course.php index 523df3cd..eadca9c2 100644 --- a/app/Validators/Course.php +++ b/app/Validators/Course.php @@ -251,21 +251,22 @@ class Course extends Validator $chapters = $courseRepo->findChapters($course->id); - $totalCount = $chapters->count(); - - $publishedCount = 0; + $totalCount = $publishedCount = 0; foreach ($chapters as $chapter) { if ($chapter->parent_id > 0 && $chapter->published == 1) { $publishedCount++; } + if ($chapter->parent_id > 0) { + $totalCount++; + } } if ($publishedCount == 0) { throw new BadRequestException('course.pub_chapter_not_found'); } - if ($publishedCount / $totalCount < 0.3) { + if ($publishedCount / $totalCount < 0.2) { throw new BadRequestException('course.pub_chapter_not_enough'); } } diff --git a/config/errors.php b/config/errors.php index f4c48b47..942f8436 100644 --- a/config/errors.php +++ b/config/errors.php @@ -179,7 +179,7 @@ $error['course.invalid_feature_status'] = '无效的推荐状态'; $error['course.invalid_publish_status'] = '无效的发布状态'; $error['course.teacher_not_assigned'] = '尚未指定授课教师'; $error['course.pub_chapter_not_found'] = '尚未发现已发布的课时'; -$error['course.pub_chapter_not_enough'] = '已发布的课时太少(小于30%)'; +$error['course.pub_chapter_not_enough'] = '已发布的课时太少(小于20%)'; /** * 面授课程相关 @@ -259,6 +259,7 @@ $error['chapter.child_existed'] = '不允许相关操作(存在子章节)'; * 点播相关 */ $error['chapter_vod.not_found'] = '点播资源不存在'; +$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)'; From bbc88be3a34eb03d098f47f5476719324f22d2aa Mon Sep 17 00:00:00 2001 From: koogua Date: Tue, 15 Jun 2021 16:21:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E6=88=90=E5=91=98=E8=B7=B3=E8=BD=AC=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Home/Views/im/group/users.volt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Home/Views/im/group/users.volt b/app/Http/Home/Views/im/group/users.volt index 7bbb42c1..d8447866 100644 --- a/app/Http/Home/Views/im/group/users.volt +++ b/app/Http/Home/Views/im/group/users.volt @@ -1,7 +1,7 @@
{% for item in pager.items %} - {% set user_url = url({'for':'home.user.show','id':item.id}) %} + {% set user_url = url({'for':'home.user.show','id':item.user.id}) %} {% set avatar_class = item.user.vip == 1 ? 'avatar vip' : 'avatar' %}