diff --git a/app/Http/Home/Views/chapter/catalog.volt b/app/Http/Home/Views/chapter/catalog.volt index 9625d784..2adfac37 100644 --- a/app/Http/Home/Views/chapter/catalog.volt +++ b/app/Http/Home/Views/chapter/catalog.volt @@ -1,23 +1,35 @@ +{%- macro show_lesson_list(chapter) %} + +{%- endmacro %} + \ No newline at end of file diff --git a/app/Http/Home/Views/course/show_catalog.volt b/app/Http/Home/Views/course/show_catalog.volt index 81bce59a..815ee561 100644 --- a/app/Http/Home/Views/course/show_catalog.volt +++ b/app/Http/Home/Views/course/show_catalog.volt @@ -1,3 +1,19 @@ +{%- macro show_lesson_list(chapter) %} + +{%- endmacro %} + {%- macro vod_lesson_info(lesson) %} {% set url = lesson.me.owned ? url({'for':'home.chapter.show','id':lesson.id}) : '' %} {% set priv = lesson.me.owned ? 'allow' : 'deny' %} @@ -87,28 +103,20 @@ {% set show_all = course.lesson_count < 30 %} -{% if chapters %} -
- {% for chapter in chapters %} - {% set show_class = (show_all or loop.first) ? 'layui-show' : '' %} -
-

{{ chapter.title }}

-
-
    - {% for lesson in chapter.children %} - {% if lesson.model == 1 %} -
  • {{ vod_lesson_info(lesson) }}
  • - {% elseif lesson.model == 2 %} -
  • {{ live_lesson_info(lesson) }}
  • - {% elseif lesson.model == 3 %} -
  • {{ read_lesson_info(lesson) }}
  • - {% elseif lesson.model == 4 %} -
  • {{ offline_lesson_info(lesson) }}
  • - {% endif %} - {% endfor %} -
+{% if chapters|length > 0 %} + {% if chapters|length > 1 %} +
+ {% for chapter in chapters %} + {% set show_class = (show_all or loop.first) ? 'layui-show' : '' %} +
+

{{ chapter.title }}

+
+ {{ show_lesson_list(chapter) }} +
-
- {% endfor %} -
+ {% endfor %} +
+ {% else %} + {{ show_lesson_list(chapters[0]) }} + {% endif %} {% endif %} \ No newline at end of file diff --git a/app/Services/Logic/Notice/External/AccountLogin.php b/app/Services/Logic/Notice/External/AccountLogin.php index a98aa06d..3b146df7 100644 --- a/app/Services/Logic/Notice/External/AccountLogin.php +++ b/app/Services/Logic/Notice/External/AccountLogin.php @@ -34,10 +34,8 @@ class AccountLogin extends LogicService $subscribe = $subscribeRepo->findByUserId($userId); if ($subscribe) { - $notice = new WeChatAccountLoginNotice(); - - return $notice->handle($subscribe, $params); + $notice->handle($subscribe, $params); } }