ErrorController.php 728 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace backend\controllers;
  3. use Yii;
  4. use yii\web\Controller;
  5. class ErrorController extends BackendController
  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. }