初始化仓库
This commit is contained in:
64
platform/config/main.php
Normal file
64
platform/config/main.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
$params = array_merge(
|
||||
require __DIR__ . '/../../common/config/params.php',
|
||||
require __DIR__ . '/../../common/config/params-local.php',
|
||||
);
|
||||
|
||||
return [
|
||||
'id' => 'app-platform',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'bootstrap' => ['log'],
|
||||
'controllerNamespace' => 'platform\controllers',
|
||||
'modules' => [
|
||||
'v1' => [
|
||||
'class' => 'platform\modules\v1\Module',
|
||||
],
|
||||
'doc'=>[
|
||||
'class' => 'cfd\doc\Module',
|
||||
'modelsMap'=>[
|
||||
'\common\models\\',
|
||||
'\common\modelsgii\\',
|
||||
]
|
||||
],
|
||||
],
|
||||
'components' => [
|
||||
'request' => [
|
||||
'csrfParam' => '_csrf-api',
|
||||
],
|
||||
'response' => [
|
||||
'class' => 'yii\web\Response',
|
||||
'format' => \yii\web\Response::FORMAT_JSON,
|
||||
'formatters' => [
|
||||
\yii\web\Response::FORMAT_JSON => [
|
||||
'class' => 'common\foundation\JsonResponseFormatter',
|
||||
'prettyPrint' => YII_DEBUG, // use "pretty" output in debug mode
|
||||
'encodeOptions' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE,
|
||||
],
|
||||
],
|
||||
],
|
||||
'user' => [
|
||||
'identityClass' => 'platform\models\Platform',
|
||||
'enableAutoLogin' =>true,
|
||||
'enableSession'=>false,
|
||||
],
|
||||
'log' => [
|
||||
'traceLevel' => YII_DEBUG ? 3 : 0,
|
||||
'targets' => [
|
||||
[
|
||||
'class' => \yii\log\FileTarget::class,
|
||||
'levels' => ['error', 'warning'],
|
||||
],
|
||||
],
|
||||
],
|
||||
// 'errorHandler' => [
|
||||
// 'errorAction' => 'site/error',
|
||||
// ],
|
||||
'urlManager' => [
|
||||
'enablePrettyUrl' => true,
|
||||
'showScriptName' => false,
|
||||
'rules' => [
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => $params,
|
||||
];
|
||||
Reference in New Issue
Block a user