AppErrorController.class.php
952 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: liyifei2012it
* Date: 17/9/6
* Time: 11:30
*/
namespace Frontend\Controller\Index;
class AppErrorController extends AbstractController
{
/**
* 任务中心异常跳转接口
*/
public function Index()
{
$customtask_id = I('get.customtask_id', 0, 'intval');
$app_data_id = I('get.app_data_id', 0, 'intval');
$errcode = I('get.errcode', 0, 'intval');
// 将接口错误码转为前端错误码
$status = '';
switch ($errcode) {
case 2149905:
$status = 'taskDelete';
break;
case 2149907:
$status = 'taskDeny';
break;
}
$params = [
'customtask_id' => $customtask_id,
'app_data_id' => $app_data_id,
'status' => $status,
];
redirectFront('/app/page/error/error', $params);
}
}