From 05837d6c5ff2e88c8b7915c9f52543061ec4c4c4 Mon Sep 17 00:00:00 2001 From: xiaochong0302 Date: Sun, 6 Nov 2022 23:19:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E5=8D=95=E7=AB=A0=E8=8A=82?= =?UTF-8?q?=E5=B1=82=E7=BA=A7=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Home/Views/chapter/catalog.volt | 48 ++++++++++------- app/Http/Home/Views/course/show_catalog.volt | 54 +++++++++++-------- .../Logic/Notice/External/AccountLogin.php | 4 +- 3 files changed, 62 insertions(+), 44 deletions(-) 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); } }