diff --git a/README.md b/README.md index 1b83845f..918714fd 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,6 @@ H5手机端演示: 演示账号:13507083515 / 123456 -微信公众号演示: - - - -演示账号:13507083515 / 123456 - 支付流程演示: - [MySQL提升课程全面讲解MySQL架构设计(0.01元)](https://ctc.koogua.com/order/confirm?item_id=1390&item_type=1) diff --git a/app/Console/Migrations/Migration.php b/app/Console/Migrations/Migration.php index 98d848d0..433999b8 100644 --- a/app/Console/Migrations/Migration.php +++ b/app/Console/Migrations/Migration.php @@ -7,7 +7,11 @@ namespace App\Console\Migrations; +use App\Traits\Service as ServiceTrait; + abstract class Migration { + use ServiceTrait; + abstract public function run(); } \ No newline at end of file diff --git a/app/Http/Admin/Views/chapter/lessons.volt b/app/Http/Admin/Views/chapter/lessons.volt index ceb10fb3..e0ea4ca6 100644 --- a/app/Http/Admin/Views/chapter/lessons.volt +++ b/app/Http/Admin/Views/chapter/lessons.volt @@ -2,6 +2,40 @@ {% block content %} + {{ partial('macros/course') }} + + {%- macro attrs_info(model,attrs) %} + {% if model == 1 %} + 类型:{{ model_type(model) }} + {% if attrs['duration'] > 0 %} + 时长:{{ attrs['duration']|duration }} + {% else %} + 时长:N/A + {% endif %} + {% elseif model == 2 %} + 类型:{{ model_type(model) }} + {% if attrs['start_time'] > 0 %} + 时间:{{ date('Y-m-d H:i',attrs['start_time']) }} + {% else %} + 时间:N/A + {% endif %} + {% elseif model == 3 %} + 类型:{{ model_type(model) }} + {% if attrs['word_count'] > 0 %} + 字数:{{ attrs['word_count'] }} + {% else %} + 字数:N/A + {% endif %} + {% elseif model == 4 %} + 类型:{{ model_type(model) }} + {% if attrs['start_time'] > 0 %} + 时间:{{ date('Y-m-d H:i',attrs['start_time']) }} + {% else %} + 时间:N/A + {% endif %} + {% endif %} + {%- endmacro %} + {% set back_url = url({'for':'admin.course.chapters','id':course.id}) %} {% set add_chapter_url = url({'for':'admin.chapter.add'},{'type':'chapter','course_id':course.id}) %} {% set add_lesson_url = url({'for':'admin.chapter.add'},{'type':'lesson','course_id':course.id,'parent_id':chapter.id}) %} @@ -21,14 +55,75 @@ - {% if course.model == 1 %} - {{ partial('chapter/lessons_vod') }} - {% elseif course.model == 2 %} - {{ partial('chapter/lessons_live') }} - {% elseif course.model == 3 %} - {{ partial('chapter/lessons_read') }} - {% elseif course.model == 4 %} - {{ partial('chapter/lessons_offline') }} - {% endif %} +
名称 | +学员 | +点赞 | +评论 | +排序 | +免费 | +发布 | +操作 | +
---|---|---|---|---|---|---|---|
+ + {{ item.title }} + ({{ item.id }}) + 课 + +{{ attrs_info(item.model,item.attrs) }} + |
+ {{ item.user_count }} | +{{ item.like_count }} | +{{ item.comment_count }} | ++ | + | ++ | + + | +
开始:{{ date('Y-m-d H:i',attrs['start_time']) }}
-结束:{{ date('Y-m-d H:i',attrs['end_time']) }}
- {% else %} - N/A - {% endif %} -{%- endmacro %} - -{%- macro live_status_info(status) %} - {% if status == 'active' %} - 活跃 - {% elseif status == 'inactive' %} - 沉默 - {% elseif status == 'forbid' %} - 禁播 - {% endif %} -{%- endmacro %} - -编号 | -名称 | -学员 | -点赞 | -时间 | -推流 | -排序 | -免费 | -发布 | -操作 | -
---|---|---|---|---|---|---|---|---|---|
{{ item.id }} | -- {{ item.title }} - 课 - | -{{ item.user_count }} | -{{ item.like_count }} | -{{ live_time_info(item.attrs) }} | -{{ live_status_info(item.attrs['stream']['status']) }} | -- | - | - | - - | -
开始:{{ date('Y-m-d H:i',attrs['start_time']) }}
-结束:{{ date('Y-m-d H:i',attrs['end_time']) }}
- {% else %} - N/A - {% endif %} -{%- endmacro %} - -编号 | -名称 | -时间 | -排序 | -免费 | -发布 | -操作 | -
---|---|---|---|---|---|---|
{{ item.id }} | -- {{ item.title }} - 课 - | -{{ offline_time_info(item.attrs) }} | -- | - | - | - - | -
编号 | -名称 | -学员 | -点赞 | -评论 | -排序 | -免费 | -发布 | -操作 | -
---|---|---|---|---|---|---|---|---|
{{ item.id }} | -
- - {{ item.title }} - 课 - - |
- {{ item.user_count }} | -{{ item.like_count }} | -{{ item.comment_count }} | -- | - | - | - - | -
编号 | -名称 | -学员 | -点赞 | -评论 | -排序 | -免费 | -发布 | -操作 | -
---|---|---|---|---|---|---|---|---|
{{ item.id }} | -
- - {{ item.title }} - 课 - - - |
- {{ item.user_count }} | -{{ item.like_count }} | -{{ item.comment_count }} | -- | - | - | - - | -