src/Controller.php
protected function appReturn($value, $lg = 'zh')
    {
        header("Content-Type:application/json; charset=utf-8");
        $array = array(
            'code'   => 200,
            'status' => true,
            'data'   => array(),
            'msg'    => '获取数据成功',
        );

        //控制开关
        if (Start::$config['app_debug']) {
            $debug = array(
                'debug' => [
                    'param' => [
                        'post'  => (array) post('all'),
                        'get'   => (array) get('all'),
                        'files' => $_FILES,
                    ],
                    'ip'    => getIP(),
                    'sql'   => Trace::$sqlInfo,
                ],
            );
            $array = array_merge($array, $debug);
        }

        $value = array_merge($array, $value);
        if ($lg != 'zh') {
            $value['msg'] = dao('BaiduTrans')->baiduTrans($value['msg'], $this->lg);
        }

        exit(json_encode($value));
    }
protected function appReturn($value, $lg = 'zh')
    {
        header("Content-Type:application/json; charset=utf-8");
        $array = array(
            'code'   => 200,
            'status' => true,
            'data'   => array(),
            'msg'    => '获取数据成功',
        );

        //控制开关
        if (Start::$config['app_debug']) {
            $debug = array(
                'debug' => [
                    'param' => [
                        'post'  => (array) post('all'),
                        'get'   => (array) get('all'),
                        'files' => $_FILES,
                    ],
                    'ip'    => getIP(),
                    'sql'   => Trace::$sqlInfo,
                ],
            );
            $array = array_merge($array, $debug);
        }

        $value = array_merge($array, $value);
        if ($lg != 'zh') {
            $value['msg'] = dao('BaiduTrans')->baiduTrans($value['msg'], $this->lg);
        }

        exit(json_encode($value));
    }
app返回参数
@date   2018-01-30T16:43:24+0800
@author ChenMingjiang
@param  [type]                   $value [description]
@param  [type]                   $lg    [国家]
@return [type]                          [description]