mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-27 21:10:24 +08:00
修正咨询published查询条件
This commit is contained in:
parent
b9d78da1ce
commit
1c880d0c56
48
app/Http/Api/Controllers/FlashSaleController.php
Normal file
48
app/Http/Api/Controllers/FlashSaleController.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
|
||||
* @license https://opensource.org/licenses/GPL-2.0
|
||||
* @link https://www.koogua.com
|
||||
*/
|
||||
|
||||
namespace App\Http\Api\Controllers;
|
||||
|
||||
use App\Services\Logic\FlashSale\OrderCreate as OrderCreateService;
|
||||
use App\Services\Logic\FlashSale\SaleList as SaleListService;
|
||||
use App\Services\Logic\Order\OrderInfo as OrderInfoService;
|
||||
|
||||
/**
|
||||
* @RoutePrefix("/api/flash/sale")
|
||||
*/
|
||||
class FlashSaleController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* @Get("/list", name="api.flash_sale.list")
|
||||
*/
|
||||
public function listAction()
|
||||
{
|
||||
$service = new SaleListService();
|
||||
|
||||
$sales = $service->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]);
|
||||
}
|
||||
|
||||
}
|
@ -5,11 +5,14 @@
|
||||
<i class="layui-icon layui-icon-play"></i>
|
||||
<span class="title">{{ lesson.title }}</span>
|
||||
{% if lesson.free == 1 %}
|
||||
<span class="layui-badge free-badge">试听</span>
|
||||
<span class="iconfont icon-trial"></span>
|
||||
{% endif %}
|
||||
{% if lesson.me.duration > 0 %}
|
||||
<span class="study-time" title="学习时长:{{ lesson.me.duration|duration }}"><i class="layui-icon layui-icon-time"></i></span>
|
||||
{% endif %}
|
||||
{% if priv == 'deny' %}
|
||||
<span class="iconfont icon-lock"></span>
|
||||
{% endif %}
|
||||
<span class="duration">{{ lesson.attrs.duration|duration }}</span>
|
||||
</a>
|
||||
{%- endmacro %}
|
||||
@ -21,11 +24,14 @@
|
||||
<i class="layui-icon layui-icon-video"></i>
|
||||
<span class="title">{{ lesson.title }}</span>
|
||||
{% if lesson.free == 1 %}
|
||||
<span class="layui-badge free-badge">试听</span>
|
||||
<span class="iconfont icon-trial"></span>
|
||||
{% endif %}
|
||||
{% if lesson.me.duration > 0 %}
|
||||
<span class="study-time" title="学习时长:{{ lesson.me.duration|duration }}"><i class="layui-icon layui-icon-time"></i></span>
|
||||
{% endif %}
|
||||
{% if priv == 'deny' %}
|
||||
<span class="iconfont icon-lock"></span>
|
||||
{% endif %}
|
||||
<span class="live" title="{{ date('Y-m-d H:i',lesson.attrs.start_time) }}">{{ live_status_info(lesson) }}</span>
|
||||
</a>
|
||||
{%- endmacro %}
|
||||
@ -37,11 +43,14 @@
|
||||
<i class="layui-icon layui-icon-read"></i>
|
||||
<span class="title">{{ lesson.title }}</span>
|
||||
{% if lesson.free == 1 %}
|
||||
<span class="layui-badge free-badge">试读</span>
|
||||
<span class="iconfont icon-trial"></span>
|
||||
{% endif %}
|
||||
{% if lesson.me.duration > 0 %}
|
||||
<span class="study-time" title="学习时长:{{ lesson.me.duration|duration }}"><i class="layui-icon layui-icon-time"></i></span>
|
||||
{% endif %}
|
||||
{% if priv == 'deny' %}
|
||||
<span class="iconfont icon-lock"></span>
|
||||
{% endif %}
|
||||
</a>
|
||||
{%- endmacro %}
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
{% else %}
|
||||
{{ icon_link('favicon.ico') }}
|
||||
{% endif %}
|
||||
<link rel="preload" href="//at.alicdn.com/t/font_2760791_c83l29k7bz.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="//at.alicdn.com/t/font_2760791_c83l29k7bz.css">
|
||||
<link rel="preload" href="//at.alicdn.com/t/font_2760791_mj6x0o9n15s.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="//at.alicdn.com/t/font_2760791_mj6x0o9n15s.css">
|
||||
{{ css_link('lib/layui/css/layui.css') }}
|
||||
{{ css_link('home/css/common.css') }}
|
||||
{% block link_css %}{% endblock %}
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user