CourseInfoScanController.class.php
894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* Created by PhpStorm.
* User: wanghuan
* Date: 2017/12/22
* Time: 17:25
*/
namespace Frontend\Controller\Index;
use Common\Common\Constant;
class CourseInfoScanController extends AbstractController
{
// 免登录
protected $_require_login = false;
public function Index()
{
$article_id = I('get.article_id', '', 'trim');
$article_type = I('get.article_type', '', 'trim');
if (empty($article_id)) {
E('_ERR_COURSE_ID_EMPTY');
}
// 单课程
$pageUrl = '/app/page/course/detail/detail';
// 系列课程
if (Constant::ARTICLE_TYPE_MULTI == $article_type) {
$pageUrl = '/app/page/course/detail/course-detail';
}
// 跳转地址
redirectFront($pageUrl, ['article_id' => $article_id, 'is_preview' => Constant::COURSE_INFO_PREVIEW_TRUE]);
}
}