diff --git a/app/Http/Api/Controllers/FlashSaleController.php b/app/Http/Api/Controllers/FlashSaleController.php
new file mode 100644
index 00000000..b6b7f46d
--- /dev/null
+++ b/app/Http/Api/Controllers/FlashSaleController.php
@@ -0,0 +1,48 @@
+handle();
+
+ return $this->jsonSuccess(['sales' => $sales]);
+ }
+
+ /**
+ * @Post("/order", name="api.flash_sale.order")
+ */
+ public function orderAction()
+ {
+ $service = new OrderCreateService();
+
+ $order = $service->handle();
+
+ $service = new OrderInfoService();
+
+ $order = $service->handle($order->sn);
+
+ return $this->jsonSuccess(['order' => $order]);
+ }
+
+}
diff --git a/app/Http/Home/Views/course/show_catalog.volt b/app/Http/Home/Views/course/show_catalog.volt
index b1b2cabc..d6502be6 100644
--- a/app/Http/Home/Views/course/show_catalog.volt
+++ b/app/Http/Home/Views/course/show_catalog.volt
@@ -5,11 +5,14 @@
{{ lesson.title }}
{% if lesson.free == 1 %}
- 试听
+
{% endif %}
{% if lesson.me.duration > 0 %}
{% endif %}
+ {% if priv == 'deny' %}
+
+ {% endif %}
{{ lesson.attrs.duration|duration }}
{%- endmacro %}
@@ -21,11 +24,14 @@
{{ lesson.title }}
{% if lesson.free == 1 %}
- 试听
+
{% endif %}
{% if lesson.me.duration > 0 %}
{% endif %}
+ {% if priv == 'deny' %}
+
+ {% endif %}
{{ live_status_info(lesson) }}
{%- endmacro %}
@@ -37,11 +43,14 @@
{{ lesson.title }}
{% if lesson.free == 1 %}
- 试读
+
{% endif %}
{% if lesson.me.duration > 0 %}
{% endif %}
+ {% if priv == 'deny' %}
+
+ {% endif %}
{%- endmacro %}
diff --git a/app/Http/Home/Views/templates/main.volt b/app/Http/Home/Views/templates/main.volt
index 0e1fdec0..0eb3c2e7 100644
--- a/app/Http/Home/Views/templates/main.volt
+++ b/app/Http/Home/Views/templates/main.volt
@@ -13,8 +13,8 @@
{% else %}
{{ icon_link('favicon.ico') }}
{% endif %}
-
-
+
+
{{ css_link('lib/layui/css/layui.css') }}
{{ css_link('home/css/common.css') }}
{% block link_css %}{% endblock %}
diff --git a/app/Services/Logic/Chapter/ConsultList.php b/app/Services/Logic/Chapter/ConsultList.php
index 69a60893..f9c22113 100644
--- a/app/Services/Logic/Chapter/ConsultList.php
+++ b/app/Services/Logic/Chapter/ConsultList.php
@@ -8,6 +8,7 @@
namespace App\Services\Logic\Chapter;
use App\Library\Paginator\Query as PagerQuery;
+use App\Models\Consult as ConsultModel;
use App\Repos\Consult as ConsultRepo;
use App\Services\Logic\ChapterTrait;
use App\Services\Logic\Course\ConsultListTrait;
@@ -31,8 +32,9 @@ class ConsultList extends LogicService
$params = [
'chapter_id' => $chapter->id,
+ 'published' => ConsultModel::PUBLISH_APPROVED,
+ 'deleted' => 0,
'private' => 0,
- 'published' => 1,
];
$consultRepo = new ConsultRepo();
diff --git a/app/Services/Logic/Course/ConsultList.php b/app/Services/Logic/Course/ConsultList.php
index 28de70fd..77e2796c 100644
--- a/app/Services/Logic/Course/ConsultList.php
+++ b/app/Services/Logic/Course/ConsultList.php
@@ -8,6 +8,7 @@
namespace App\Services\Logic\Course;
use App\Library\Paginator\Query as PagerQuery;
+use App\Models\Consult as ConsultModel;
use App\Repos\Consult as ConsultRepo;
use App\Services\Logic\CourseTrait;
use App\Services\Logic\Service as LogicService;
@@ -30,9 +31,9 @@ class ConsultList extends LogicService
$params = [
'course_id' => $course->id,
- 'private' => 0,
- 'published' => 1,
+ 'published' => ConsultModel::PUBLISH_APPROVED,
'deleted' => 0,
+ 'private' => 0,
];
$consultRepo = new ConsultRepo();
diff --git a/public/static/home/css/common.css b/public/static/home/css/common.css
index 1e01acbf..d43d5451 100644
--- a/public/static/home/css/common.css
+++ b/public/static/home/css/common.css
@@ -1029,7 +1029,9 @@
margin: 0 5px;
}
-.lesson-item .free-badge {
+.lesson-item .icon-trial {
+ color: red;
+ font-size: 24px;
margin-right: 5px;
}
@@ -1347,12 +1349,16 @@
}
.player-wrap {
- position: relative;
width: 760px;
height: 428px;
margin-bottom: 20px;
}
+.dplayer {
+ width: 760px;
+ height: 428px;
+}
+
.chat-wrap .layui-card-header {
text-align: center;
}