1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-28 05:11:39 +08:00

修正咨询published查询条件

This commit is contained in:
koogua 2021-09-11 13:14:24 +08:00
parent b9d78da1ce
commit 1c880d0c56
6 changed files with 76 additions and 10 deletions

View 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]);
}
}

View File

@ -5,11 +5,14 @@
<i class="layui-icon layui-icon-play"></i> <i class="layui-icon layui-icon-play"></i>
<span class="title">{{ lesson.title }}</span> <span class="title">{{ lesson.title }}</span>
{% if lesson.free == 1 %} {% if lesson.free == 1 %}
<span class="layui-badge free-badge">试听</span> <span class="iconfont icon-trial"></span>
{% endif %} {% endif %}
{% if lesson.me.duration > 0 %} {% if lesson.me.duration > 0 %}
<span class="study-time" title="学习时长:{{ lesson.me.duration|duration }}"><i class="layui-icon layui-icon-time"></i></span> <span class="study-time" title="学习时长:{{ lesson.me.duration|duration }}"><i class="layui-icon layui-icon-time"></i></span>
{% endif %} {% endif %}
{% if priv == 'deny' %}
<span class="iconfont icon-lock"></span>
{% endif %}
<span class="duration">{{ lesson.attrs.duration|duration }}</span> <span class="duration">{{ lesson.attrs.duration|duration }}</span>
</a> </a>
{%- endmacro %} {%- endmacro %}
@ -21,11 +24,14 @@
<i class="layui-icon layui-icon-video"></i> <i class="layui-icon layui-icon-video"></i>
<span class="title">{{ lesson.title }}</span> <span class="title">{{ lesson.title }}</span>
{% if lesson.free == 1 %} {% if lesson.free == 1 %}
<span class="layui-badge free-badge">试听</span> <span class="iconfont icon-trial"></span>
{% endif %} {% endif %}
{% if lesson.me.duration > 0 %} {% if lesson.me.duration > 0 %}
<span class="study-time" title="学习时长:{{ lesson.me.duration|duration }}"><i class="layui-icon layui-icon-time"></i></span> <span class="study-time" title="学习时长:{{ lesson.me.duration|duration }}"><i class="layui-icon layui-icon-time"></i></span>
{% endif %} {% 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> <span class="live" title="{{ date('Y-m-d H:i',lesson.attrs.start_time) }}">{{ live_status_info(lesson) }}</span>
</a> </a>
{%- endmacro %} {%- endmacro %}
@ -37,11 +43,14 @@
<i class="layui-icon layui-icon-read"></i> <i class="layui-icon layui-icon-read"></i>
<span class="title">{{ lesson.title }}</span> <span class="title">{{ lesson.title }}</span>
{% if lesson.free == 1 %} {% if lesson.free == 1 %}
<span class="layui-badge free-badge">试读</span> <span class="iconfont icon-trial"></span>
{% endif %} {% endif %}
{% if lesson.me.duration > 0 %} {% if lesson.me.duration > 0 %}
<span class="study-time" title="学习时长:{{ lesson.me.duration|duration }}"><i class="layui-icon layui-icon-time"></i></span> <span class="study-time" title="学习时长:{{ lesson.me.duration|duration }}"><i class="layui-icon layui-icon-time"></i></span>
{% endif %} {% endif %}
{% if priv == 'deny' %}
<span class="iconfont icon-lock"></span>
{% endif %}
</a> </a>
{%- endmacro %} {%- endmacro %}

View File

@ -13,8 +13,8 @@
{% else %} {% else %}
{{ icon_link('favicon.ico') }} {{ icon_link('favicon.ico') }}
{% endif %} {% endif %}
<link rel="preload" href="//at.alicdn.com/t/font_2760791_c83l29k7bz.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <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_c83l29k7bz.css"> <link rel="stylesheet" href="//at.alicdn.com/t/font_2760791_mj6x0o9n15s.css">
{{ css_link('lib/layui/css/layui.css') }} {{ css_link('lib/layui/css/layui.css') }}
{{ css_link('home/css/common.css') }} {{ css_link('home/css/common.css') }}
{% block link_css %}{% endblock %} {% block link_css %}{% endblock %}

View File

@ -8,6 +8,7 @@
namespace App\Services\Logic\Chapter; namespace App\Services\Logic\Chapter;
use App\Library\Paginator\Query as PagerQuery; use App\Library\Paginator\Query as PagerQuery;
use App\Models\Consult as ConsultModel;
use App\Repos\Consult as ConsultRepo; use App\Repos\Consult as ConsultRepo;
use App\Services\Logic\ChapterTrait; use App\Services\Logic\ChapterTrait;
use App\Services\Logic\Course\ConsultListTrait; use App\Services\Logic\Course\ConsultListTrait;
@ -31,8 +32,9 @@ class ConsultList extends LogicService
$params = [ $params = [
'chapter_id' => $chapter->id, 'chapter_id' => $chapter->id,
'published' => ConsultModel::PUBLISH_APPROVED,
'deleted' => 0,
'private' => 0, 'private' => 0,
'published' => 1,
]; ];
$consultRepo = new ConsultRepo(); $consultRepo = new ConsultRepo();

View File

@ -8,6 +8,7 @@
namespace App\Services\Logic\Course; namespace App\Services\Logic\Course;
use App\Library\Paginator\Query as PagerQuery; use App\Library\Paginator\Query as PagerQuery;
use App\Models\Consult as ConsultModel;
use App\Repos\Consult as ConsultRepo; use App\Repos\Consult as ConsultRepo;
use App\Services\Logic\CourseTrait; use App\Services\Logic\CourseTrait;
use App\Services\Logic\Service as LogicService; use App\Services\Logic\Service as LogicService;
@ -30,9 +31,9 @@ class ConsultList extends LogicService
$params = [ $params = [
'course_id' => $course->id, 'course_id' => $course->id,
'private' => 0, 'published' => ConsultModel::PUBLISH_APPROVED,
'published' => 1,
'deleted' => 0, 'deleted' => 0,
'private' => 0,
]; ];
$consultRepo = new ConsultRepo(); $consultRepo = new ConsultRepo();

View File

@ -1029,7 +1029,9 @@
margin: 0 5px; margin: 0 5px;
} }
.lesson-item .free-badge { .lesson-item .icon-trial {
color: red;
font-size: 24px;
margin-right: 5px; margin-right: 5px;
} }
@ -1347,12 +1349,16 @@
} }
.player-wrap { .player-wrap {
position: relative;
width: 760px; width: 760px;
height: 428px; height: 428px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.dplayer {
width: 760px;
height: 428px;
}
.chat-wrap .layui-card-header { .chat-wrap .layui-card-header {
text-align: center; text-align: center;
} }