core/Controller.php
public function success($message = null, array $option = [])
    {
        $option['status'] = true;
        if (!empty($message)) {
            $option['msg'] = $message;
        }
        if ($this->isAjax() || $this->getContentType() == 'application/json' || $this->getContentType() == 'text/json') {
            echo json_encode($option, JSON_UNESCAPED_UNICODE);
            exit;
        }
        if (empty($option['back'])) {
            $back = $this->param('__BACK__');
            if (empty($back)) {
                $back = $this->getReferrer();
            }
            $option['back'] = $back;
        }
        $this->assign('info', $option);
        if (!empty($option['template'])) {
            $this->display($option['template']);
        } else {
            $template = Config::get('beacon.success_template', '@success.tpl');
            $this->display($template);
        }
        exit;
    }
public function success($message = null, array $option = [])
    {
        $option['status'] = true;
        if (!empty($message)) {
            $option['msg'] = $message;
        }
        if ($this->isAjax() || $this->getContentType() == 'application/json' || $this->getContentType() == 'text/json') {
            echo json_encode($option, JSON_UNESCAPED_UNICODE);
            exit;
        }
        if (empty($option['back'])) {
            $back = $this->param('__BACK__');
            if (empty($back)) {
                $back = $this->getReferrer();
            }
            $option['back'] = $back;
        }
        $this->assign('info', $option);
        if (!empty($option['template'])) {
            $this->display($option['template']);
        } else {
            $template = Config::get('beacon.success_template', '@success.tpl');
            $this->display($template);
        }
        exit;
    }
显示正确信息
@param null $message
@param array $option :data code back template 等
如 ['data'=>$mydata,'back'=>'/index','code'=>33,'template'=>'myerror.tpl']