<?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); } }