Initial commit,修正
This commit is contained in:
Executable
+67
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
# @Author: 嗨噜客科技(www.hiluker.cn) <Fm453>
|
||||
# @Date: 1970-01-01T08:00:00+08:00
|
||||
# @Email: fm453@hiluker.com
|
||||
# @Last modified by: Fm453
|
||||
# @Last modified time: 2021-09-15T00:13:16+08:00
|
||||
|
||||
$params = array_merge(
|
||||
require(__DIR__ . '/../../common/config/params-api.php'),
|
||||
require(__DIR__ . '/../../common/config/params.php'),
|
||||
require(__DIR__ . '/params.php')
|
||||
);
|
||||
|
||||
$config = [
|
||||
'id' => 'app-frontend',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'bootstrap' => ['log'],
|
||||
'controllerNamespace' => 'frontend\controllers',
|
||||
'modules' => [
|
||||
'data' => [
|
||||
'class' => 'vendor\fmsoft\modules\data\Module', //自动加载我的数据处理模型
|
||||
],
|
||||
],
|
||||
'language'=>'zh-CN',
|
||||
'components' => [
|
||||
'request' => [
|
||||
'csrfParam' => '_csrf-frontend',
|
||||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
||||
'cookieValidationKey' => 'o_Rv6TiAxMkGII4dkFBKathreA5IEohp',
|
||||
'parsers' => [
|
||||
'application/json' => 'yii\web\JsonParser',
|
||||
]
|
||||
],
|
||||
'user' => [
|
||||
'identityClass' => 'common\models\User',
|
||||
'enableAutoLogin' => true,
|
||||
'identityCookie' => ['name' => '_identity-frontend', 'httpOnly' => true],
|
||||
],
|
||||
'session' => [
|
||||
'name' => 'advanced-frontend-api',
|
||||
],
|
||||
'log' => [
|
||||
'traceLevel' => YII_DEBUG ? 3 : 0,
|
||||
'targets' => [
|
||||
[
|
||||
'class' => 'yii\log\FileTarget',
|
||||
'levels' => ['error', 'warning'],
|
||||
],
|
||||
],
|
||||
],
|
||||
'errorHandler' => [
|
||||
'errorAction' => 'site/error',
|
||||
],
|
||||
'urlManager' => [
|
||||
'enablePrettyUrl' => false,
|
||||
'enableStrictParsing' => true,
|
||||
'showScriptName' => true,
|
||||
'suffix' => '.hi',
|
||||
'rules' => [
|
||||
['class' => 'yii\rest\UrlRule', 'controller' => 'realty'], //为***控制器增加一个 URL 规则。这样, 用户的数据就能通过美化的 URL 和有意义的 http 动词进行访问和操作
|
||||
['class' => 'yii\rest\UrlRule', 'controller' => 'setting']
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => $params,
|
||||
];
|
||||
return $config;
|
||||
Reference in New Issue
Block a user