Initial commit,修正
This commit is contained in:
Executable
+2
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
Yii::setAlias('@backend', dirname(__DIR__));
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$config = [
|
||||
'components' => [
|
||||
'db' => [
|
||||
'class' => 'yii\db\Connection',
|
||||
'dsn' => 'mysql:host=120.79.11.71;dbname=dacms_dev',
|
||||
'username' => 'dacms_dev',
|
||||
'password' => 'HS8wRyTT2sKeLdAJ',
|
||||
'charset' => 'utf8',
|
||||
'tablePrefix' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return $config;
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @Author: fm453
|
||||
* @Date: 2021-09-09 10:32:33
|
||||
* @Last Modified by: fm453
|
||||
* @Last Modified time: 2021-09-09 10:41:57
|
||||
* @Email: fm453@lukegzs.com
|
||||
*/
|
||||
$config = [
|
||||
'components' => [
|
||||
'db' => [
|
||||
'class' => 'yii\db\Connection',
|
||||
'dsn' => 'mysql:host=127.0.0.1;dbname=dacms',
|
||||
'username' => 'dacms',
|
||||
'password' => 'eydnsidc',
|
||||
'charset' => 'utf8',
|
||||
'tablePrefix' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return $config;
|
||||
Executable
+112
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
# @Author: fm453
|
||||
# @Date: 1970-01-01T08:00:00+08:00
|
||||
# @Email: fm43@hiluker.com
|
||||
# @Last modified by: Fm453
|
||||
# @Last modified time: 2021-09-14T23:39:32+08:00
|
||||
|
||||
$params = array_merge(
|
||||
require(__DIR__ . '/../../common/config/params-local.php'),
|
||||
require(__DIR__ . '/../../common/config/params-api.php'),
|
||||
require(__DIR__ . '/params-local.php')
|
||||
);
|
||||
|
||||
$config = [
|
||||
'id' => 'app-backend',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'controllerNamespace' => 'backend\controllers',
|
||||
'defaultRoute' => 'site', //默认路由
|
||||
'bootstrap' => ['log'],
|
||||
'modules' => [
|
||||
"admin" => [
|
||||
"class" => 'mdm\admin\Module',
|
||||
],
|
||||
"data" => [
|
||||
'class' => 'vendor\fmsoft\modules\data\Module', //自动加载我的数据处理模型
|
||||
],
|
||||
],
|
||||
'aliases' => [
|
||||
"@mdm/admin" => "@vendor/mdmsoft/yii2-admin",
|
||||
],
|
||||
'as access' => [
|
||||
//加了才会自动验证是否有权限
|
||||
'class' => 'mdm\admin\components\AccessControl',
|
||||
'allowActions' => [
|
||||
//允许访问的action
|
||||
//controller/action
|
||||
// '*', //开发环境配置完成后务必抹掉此项
|
||||
'site/*',
|
||||
'index/*'
|
||||
]
|
||||
],
|
||||
'layout' => 'main',//布局文件 优先级: 控制器>配置文件>系统默认
|
||||
'language' => 'zh-CN', //目标语言
|
||||
//组件
|
||||
'components' => [
|
||||
'request' => [
|
||||
'csrfParam' => '_csrf-backend',
|
||||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
||||
'cookieValidationKey' => 'CU5iSYmIp6kbjKKuh541KsA_oaYvTuNh',
|
||||
],
|
||||
//身份认证类
|
||||
'user' => [
|
||||
'identityClass' => 'backend\models\Adminer',
|
||||
'enableAutoLogin' => true,
|
||||
'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
|
||||
'loginUrl' => ['site/login'], //配置登录url(可选项)
|
||||
],
|
||||
'session' => [
|
||||
// this is the name of the session cookie used for login on the backend
|
||||
'name' => 'advanced-backend',
|
||||
],
|
||||
//Rbac权限控制
|
||||
'authManager' => [
|
||||
// 'class' => 'yii\rbac\PhpManager',
|
||||
'class' => 'yii\rbac\DbManager',
|
||||
'itemTable' => 'auth_item',
|
||||
'assignmentTable' => 'auth_assignment',
|
||||
'itemChildTable' => 'auth_item_child',
|
||||
],
|
||||
'log' => [
|
||||
'traceLevel' => YII_DEBUG ? 3 : 0,
|
||||
'targets' => [
|
||||
[
|
||||
'class' => 'yii\log\FileTarget',
|
||||
'levels' => ['error', 'warning'],
|
||||
],
|
||||
],
|
||||
],
|
||||
'errorHandler' => [
|
||||
'errorAction' => 'site/error',
|
||||
],
|
||||
|
||||
'urlManager' => [
|
||||
'enablePrettyUrl' => true,
|
||||
'showScriptName' => true,
|
||||
'suffix' => '.hi', //后缀
|
||||
'rules' => [
|
||||
],
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
'params' => $params
|
||||
];
|
||||
|
||||
if (!YII_ENV_TEST) {
|
||||
// configuration adjustments for 'dev' environment
|
||||
$config['bootstrap'][] = 'debug';
|
||||
$config['modules']['debug'] = [
|
||||
'class' => 'yii\debug\Module',
|
||||
// 'allowedIPs' => ['127.0.0.1', '::1', '你的IP地址']
|
||||
];
|
||||
}
|
||||
if (YII_ENV_DEV) {
|
||||
$config['bootstrap'][] = 'gii';
|
||||
$config['modules']['gii'] = [
|
||||
'class' => 'yii\gii\Module',
|
||||
'allowedIPs' => ['*'] //允许所有IP访问或指定允许的IP地址
|
||||
];
|
||||
}
|
||||
|
||||
return $config;
|
||||
Executable
+102
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
# @Author: fm453
|
||||
# @Date: 1970-01-01T08:00:00+08:00
|
||||
# @Email: fm43@hiluker.com
|
||||
# @Last modified by: fm453
|
||||
# @Last modified time: 2021-09-15T09:58:48+08:00
|
||||
|
||||
$params = array_merge(
|
||||
require(__DIR__ . '/../../common/config/params.php'),
|
||||
require(__DIR__ . '/../../common/config/params-api.php'),
|
||||
require(__DIR__ . '/params.php')
|
||||
);
|
||||
|
||||
$config = [
|
||||
'id' => 'app-backend',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'controllerNamespace' => 'backend\controllers',
|
||||
'defaultRoute' => 'site', //默认路由
|
||||
'bootstrap' => ['log'],
|
||||
'modules' => [
|
||||
"admin" => [
|
||||
"class" => 'mdm\admin\Module',
|
||||
],
|
||||
"data" => [
|
||||
'class' => 'vendor\fmsoft\modules\data\Module', //自动加载我的数据处理模型
|
||||
],
|
||||
],
|
||||
'aliases' => [
|
||||
"@mdm/admin" => "@vendor/mdmsoft/yii2-admin",
|
||||
],
|
||||
'as access' => [
|
||||
//加了才会自动验证是否有权限
|
||||
'class' => 'mdm\admin\components\AccessControl',
|
||||
'allowActions' => [
|
||||
//允许访问的action
|
||||
//controller/action
|
||||
//'*', //开发环境配置完成后务必抹掉此项
|
||||
'site/*',
|
||||
'index/*'
|
||||
]
|
||||
],
|
||||
'layout' => 'main',//布局文件 优先级: 控制器>配置文件>系统默认
|
||||
'language' => 'zh-CN', //目标语言
|
||||
//组件
|
||||
'components' => [
|
||||
'request' => [
|
||||
'csrfParam' => '_csrf-backend',
|
||||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
||||
'cookieValidationKey' => 'CU5iSYmIp6kbjKKuh541KsA_oaYvTuNh',
|
||||
],
|
||||
//身份认证类
|
||||
'user' => [
|
||||
'identityClass' => 'backend\models\Adminer',
|
||||
'enableAutoLogin' => true,
|
||||
'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
|
||||
'loginUrl' => ['site/login'], //配置登录url(可选项)
|
||||
],
|
||||
'session' => [
|
||||
// this is the name of the session cookie used for login on the backend
|
||||
'name' => 'advanced-backend',
|
||||
],
|
||||
//Rbac权限控制
|
||||
'authManager' => [
|
||||
'class' => 'yii\rbac\DbManager',
|
||||
'itemTable' => 'auth_item',
|
||||
'assignmentTable' => 'auth_assignment',
|
||||
'itemChildTable' => 'auth_item_child',
|
||||
],
|
||||
'log' => [
|
||||
'traceLevel' => YII_DEBUG ? 3 : 0,
|
||||
'targets' => [
|
||||
[
|
||||
'class' => 'yii\log\FileTarget',
|
||||
'levels' => ['error', 'warning'],
|
||||
],
|
||||
],
|
||||
],
|
||||
'errorHandler' => [
|
||||
'errorAction' => 'site/error',
|
||||
],
|
||||
|
||||
'urlManager' => [
|
||||
'enablePrettyUrl' => true,
|
||||
'showScriptName' => true,
|
||||
'suffix' => '.hi', //后缀
|
||||
'rules' => [
|
||||
],
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
'params' => $params
|
||||
];
|
||||
|
||||
if (YII_ENV_DEV) {
|
||||
$config['bootstrap'][] = 'gii';
|
||||
$config['modules']['gii'] = [
|
||||
'class' => 'yii\gii\Module',
|
||||
];
|
||||
}
|
||||
|
||||
return $config;
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
# @Author: fm453
|
||||
# @Date: 1970-01-01T08:00:00+08:00
|
||||
# @Email: fm43@hiluker.com
|
||||
# @Last modified by: fm453
|
||||
# @Last modified time: 2021-09-14T23:20:49+08:00
|
||||
|
||||
return [
|
||||
'configGroup' => [
|
||||
1 => '基本配置',
|
||||
2 => '邮箱配置',
|
||||
3 => '附件配置',
|
||||
],
|
||||
'adminEmail' => 'fm453@lukegzs.com',
|
||||
'noticeEmail' => '393213759@qq.com',
|
||||
//默认值组
|
||||
'defaultAdminPassword' => 'Hi12345678', //默认的管理员密码
|
||||
'defaultAdminAvatar' => '@web/img/profile_small.png', //默认管理员头像
|
||||
'defaultSuperRoleId' => 1, //默认的超级管理员角色id
|
||||
'defaultSuperAdminId' => 1, //默认的超级管理员id
|
||||
'siteOpenTime' => '8:00', //上班时间
|
||||
'siteCloseTime' => '20:00', //歇业时间
|
||||
'defaultAttributeValue' => '(未设置)', //空值默认
|
||||
'defaultActionColumnButtonOption' => ['class' => 'btn btn-white btn-xs'], //列表页操作按钮选项
|
||||
];
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
# @Author: fm453
|
||||
# @Date: 1970-01-01T08:00:00+08:00
|
||||
# @Email: fm43@hiluker.com
|
||||
# @Last modified by: fm453
|
||||
# @Last modified time: 2021-09-14T23:18:13+08:00
|
||||
|
||||
return [
|
||||
'configGroup' => [
|
||||
1 => '基本配置',
|
||||
2 => '邮箱配置',
|
||||
3 => '附件配置',
|
||||
],
|
||||
'adminEmail' => 'fm453@lukegzs.com',
|
||||
'noticeEmail' => '393213759@qq.com',
|
||||
//默认值组
|
||||
'defaultAdminPassword' => 'Hi12345678', //默认的管理员密码
|
||||
'defaultAdminAvatar' => '@web/img/profile_small.png', //默认管理员头像
|
||||
'defaultSuperRoleId' => 1, //默认的超级管理员角色id
|
||||
'defaultSuperAdminId' => 1, //默认的超级管理员id
|
||||
'siteOpenTime' => '8:00', //上班时间
|
||||
'siteCloseTime' => '20:00', //歇业时间
|
||||
'defaultAttributeValue' => '(未设置)', //空值默认
|
||||
'defaultActionColumnButtonOption' => ['class' => 'btn btn-white btn-xs'], //列表页操作按钮选项
|
||||
];
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
# @Author: fm453
|
||||
# @Date: 1970-01-01T08:00:00+08:00
|
||||
# @Email: fm43@hiluker.com
|
||||
# @Last modified by: fm453
|
||||
# @Last modified time: 2021-09-14T23:20:10+08:00
|
||||
|
||||
$test = [
|
||||
'id' => 'app-backend-tests',
|
||||
'components' => [
|
||||
'assetManager' => [
|
||||
'basePath' => __DIR__ . '/../web/assets',
|
||||
],
|
||||
],
|
||||
];
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require(__DIR__ . '/../../common/config/test-local.php'),
|
||||
require(__DIR__ . '/main-local.php'),
|
||||
$test
|
||||
);
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
# @Author: fm453
|
||||
# @Date: 1970-01-01T08:00:00+08:00
|
||||
# @Email: fm43@hiluker.com
|
||||
# @Last modified by: Fm453
|
||||
# @Last modified time: 2021-09-14T23:52:44+08:00
|
||||
|
||||
$test = [
|
||||
'id' => 'app-backend-tests',
|
||||
'components' => [
|
||||
'assetManager' => [
|
||||
'basePath' => __DIR__ . '/../web/assets',
|
||||
],
|
||||
],
|
||||
];
|
||||
return yii\helpers\ArrayHelper::merge(
|
||||
require(__DIR__ . '/../../common/config/test.php'),
|
||||
require(__DIR__ . '/main.php'),
|
||||
$test
|
||||
);
|
||||
Reference in New Issue
Block a user