[ '@bower' => '@vendor/bower-asset', '@npm' => '@vendor/npm-asset' ], 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', 'sourceLanguage' => 'en', 'language' => 'zh-CN', 'components' => [ 'user' => [ 'class' => 'yii\web\User', 'loginUrl' => ['login/login'], 'enableAutoLogin' => true, 'identityClass' => 'common\models\Admin', 'identityCookie' => [ 'name' => '_identity-backend', 'httpOnly' => true ], ], 'authManager' => [ 'class' => 'common\core\rbac\DbManager', ], 'assetManager' => [ 'bundles' => [ 'yii\web\JqueryAsset' => [ 'sourcePath' => null, 'js' => [], 'depends' => [] ], 'yii\bootstrap\BootstrapAsset' => [ 'css' => [] ], ], 'linkAssets' => false,//true 清除缓存 ], /** * db config */ 'db' => [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=rm-bp144nc2129h43c4i.mysql.rds.aliyuncs.com;dbname=manage', 'username' => 'fzmrisk', 'password' => '37uIrcBFk4nMnUjQ', 'charset' => 'utf8', 'tablePrefix' => 'gli_', ], 'db_pwallet' => [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=127.0.0.1;dbname=api', 'username' => 'root', 'password' => '123456', 'charset' => 'utf8', ], 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', 'viewPath' => '@common/mail', 'useFileTransport' => false, 'transport' => [ 'class' => 'Swift_SmtpTransport', 'host' => 'smtp.163.com', 'username' => 'risk_admin@163.com',//Fuzamei2017 'password' => 'riskadmin163', 'port' => 25, 'encryption' => 'tls', ], 'messageConfig' => [ 'charset' => 'UTF-8', 'from' => ['risk_admin@163.com' => '管理后台系统'] ], ], 'cache' => [ 'class' => 'yii\caching\FileCache', ], 'i18n' => [ 'translations' => [ '*' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@common/messages', 'fileMap' => [ 'common' => 'common.php', 'error' => 'errorCode.php', ], ], ], ], 'uploader' => [ 'class' => 'common\components\uploader\Uploader', 'baseuri' => 'http://127.0.0.1:8082/admin/upload', 'absolute' => dirname(dirname(__DIR__)) . '/backend/web/upload', ], ], /** * 通过配置文件附加行为,全局 */ 'as rbac' => [ 'class' => 'common\behaviors\RbacBehavior', 'allowActions' => [ 'login/login', 'login/logout', 'public/*', 'chat/*', 'debug/*', 'gii/*', // 不需要权限检测 ] ], /** * 只允许一处登陆 */ 'as check' => [ 'class' => 'common\filter\LoginFilter', 'filter' => false, //[true:允许单 false:允许多] ], ];