'app-frontend', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'controllerNamespace' => 'frontend\controllers', 'components' => [ 'request' => [ 'csrfParam' => 'csrf_token_f', ], 'user' => [ 'identityClass' => 'common\models\User', 'enableAutoLogin' => true, 'identityCookie' => ['name' => '_identity-frontend', 'httpOnly' => true], ], 'hostserver' => [ 'class' => 'common\api\HostServer', ], 'session' => [ // this is the name of the session cookie used for login on the frontend 'name' => 'advanced-frontend', ], 'mailer' => [ //邮箱设置 'class' => 'yii\swiftmailer\Mailer', 'useFileTransport' => false,//这句一定有,false发送邮件,true只是生成邮件在runtime文件夹下,不发邮件 'transport' => $emailConfig, 'messageConfig'=>[ 'charset'=>'UTF-8', 'from'=>[$emailConfig['username']=>'客户报名信息'] ], ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], // [ // 'class' => 'yii\log\FileTarget', // 'levels' => ['error'], // 'logVars'=>[], // //表示以yii\db\或者app\models\开头的分类都会写入这个文件 // 'categories'=>['yii\db\*','common\models\*'], // //表示写入到文件sql.log中年月日记录日志 // 'logFile'=>'@runtime/../logs/sql/sql.log'.date('Ymd'), // ], // [ // 'class' => 'yii\log\EmailTarget', // 'mailer' => 'mailer', // 'levels' => ['error', 'warning'], //// 'categories' => ['yii\db\*','common\models\*','backend\controllers\*'], // 'message' => [ // 'from'=>[$emailConfig['username']=>'易购'], // 'to' => ['313298389@qq.com'], // 'subject' => '易购-错误信息', // ], // ], ], ], 'errorHandler' => [ 'errorAction' => 'public/error', ], 'assetManager' => [ // 'class' => 'yii\web\AssetManager', // 'appendTimestamp' => true, // 'forceCopy' => true, 'bundles' => [ // 'linkAssets' => true, 'yii\web\YiiAsset' => [ 'js' => [], // 去除 yii.js 'sourcePath' => null, // 防止在 frontend/web/asset 下生产文件 ], 'yii\widgets\ActiveFormAsset' => [ 'js' => [], // 去除 yii.activeForm.js 'sourcePath' => null, // 防止在 frontend/web/asset 下生产文件 ], 'yii\validators\ValidationAsset' => [ 'js' => [], // 去除 yii.validation.js 'sourcePath' => null, // 防止在 frontend/web/asset 下生产文件 ], // 'yii\bootstrap\BootstrapAsset' => [ // 'css' => [], // 去除 bootstrap.css // 'sourcePath' => null, // 防止在 frontend/web/asset 下生产文件 // ], 'yii\bootstrap\BootstrapPluginAsset' => [ 'js' => [], // 去除 bootstrap.js 'sourcePath' => null, // 防止在 frontend/web/asset 下生产文件 ], 'yii\web\JqueryAsset' => [ 'js' => [], // 去除 jquery.js 'sourcePath' => null, // 防止在 frontend/web/asset 下生产文件 ], ], ], 'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, // 'enableStrictParsing' => true, 'rules' => [ '/house/search' =>'/house/search', '/house/vr' =>'/house/vr', '/house/search' =>'/house/search', '/house/abroad' =>'/house/abroad', '/'=>'index/index', '/json/cityprice'=>'/json/cityprice', '/json/houseprice'=>'/json/houseprice', '/house/remark/' =>'/house/remark',//楼盘点评 '/house/news/' =>'/house/news', '/house/typedetails/' => '/house/typedetails', //楼盘户型详情页 '/house/type/' =>'/house/type', '/house/details/' =>'/house/details', '/house/periphery/' =>'/house/periphery', '/house/album/' =>'/house/album', '/house/remarkfrom' => "house/remarkfrom", '/house/houseremark/' => "/house/houseremark", '/house/remarklikesfrom' => '/house/remarklikesfrom', '/house/dynamic' =>'/house/dynamic', '/house/housetype' =>'/house/housetype', '/house/housetypeall' =>'/house/housetypeall', '/house/albumlist' =>'/house/albumlist', '/house/getalbumlist' =>'/house/getalbumlist', '/house/checkcode' =>'/house/checkcode', '/house/sendcode' =>'/house/sendcode', '/house/tall' =>'/house/tall', '/house/zhongqu/' =>'/house/zhongqu', //VR 详情 //'/house/' => '/house/home', //'/house/' => '/house/home', '/house/' => '/house/home', '/knowledgebase/tools' =>'/knowledgebase/tools', '/knowledgebase/details/'=>'/knowledgebase/details', '/knowledgebase/list/'=>'/knowledgebase/list', '/news/details/'=>'/news/details', '/news/newshouse'=>'/news/newshouse', '/news/'=>'/news/home', '/news/'=>'/news/home', '/fresh'=>'/fresh/home', '/city/'=>'/city/index', '/map/home'=>'/map/home', '/pj/details/'=>'/pj/details', '/pj'=>'/pj/home', '/weirdo/details'=>'/weirdo/details', '/weirdo'=>'/weirdo/home', '/.html'=>'/', '/.php'=>'/', // '/house/search.\w+//' => '/house/search', // '/house/search.\w+/////' => '/house/search', // '//'=>'/', ], ], 'i18n' => [ //语言配置 'translations' => [ 'app*' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@common/messages', // 'sourceLanguage' => 'en', 'fileMap' => [ 'app' => 'app.php', // 'app/error' => 'error.php', ], ], // 'model*' => [ // 'class' => 'yii\i18n\PhpMessageSource', // 'basePath' => '@common/messages', // 'fileMap' => [ // 'model' => 'model.php' // ] // ] ], ], ], 'params' => $params, 'language' =>'zh-CN', ];