ErrorController.php 666 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace mobile\controllers;
  3. use Yii;
  4. use yii\web\Controller;
  5. class ErrorController extends MobileendController
  6. {
  7. public function actionErrorPage(){
  8. $statusCode = Yii::$app->request->get('statusCode');
  9. switch ($statusCode){
  10. case 'illegalMerchantId':
  11. $title = '非法访问';
  12. $msg = '您访问的数据出现异常!';
  13. break;
  14. case 'illegalData':
  15. $title = '访问数据不存在';
  16. $msg = '您访问的数据出现异常!';
  17. break;
  18. }
  19. return $this->render('error', ['title'=>$title, 'msg'=>$msg]);
  20. }
  21. }