1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-20 19:07:03 +08:00
koogua 0336a54911 1.源文件增加版权信息
2.群组状态和课程协同
2021-06-13 15:49:47 +08:00

68 lines
1.5 KiB
PHP

<?php
/**
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
* @license https://opensource.org/licenses/GPL-2.0
* @link https://www.koogua.com
*/
namespace App\Http\Home\Controllers;
use App\Services\Logic\Vip\CourseList as VipCourseListService;
use App\Services\Logic\Vip\OptionList as VipOptionListService;
use App\Services\Logic\Vip\UserList as VipUserListService;
use Phalcon\Mvc\View;
/**
* @RoutePrefix("/vip")
*/
class VipController extends Controller
{
/**
* @Get("/", name="home.vip.index")
*/
public function indexAction()
{
$service = new VipOptionListService();
$vipOptions = $service->handle();
$this->seo->prependTitle('会员');
$this->view->setVar('vip_options', $vipOptions);
}
/**
* @Get("/courses", name="home.vip.courses")
*/
public function coursesAction()
{
$type = $this->request->getQuery('type', 'string', 'discount');
$service = new VipCourseListService();
$pager = $service->handle($type);
$pager->target = "tab-{$type}-courses";
$this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
$this->view->setVar('pager', $pager);
}
/**
* @Get("/users", name="home.vip.users")
*/
public function usersAction()
{
$service = new VipUserListService();
$pager = $service->handle();
$pager->target = 'tab-users';
$this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
$this->view->setVar('pager', $pager);
}
}