123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <?php
- $params = array_merge(
- require __DIR__ . '/../../common/config/params.php',
- require __DIR__ . '/../../common/config/params-local.php',
- require __DIR__ . '/params.php',
- require __DIR__ . '/params-local.php'
- );
- return [
- 'id' => 'app-wechat',
- 'basePath' => dirname(__DIR__),
- 'bootstrap' => ['log'],
- 'controllerNamespace' => 'wechat\controllers',
- 'components' => [
- 'request' => [
- 'csrfParam' => 'csrf_token_m',
- ],
- 'user' => [
- 'identityClass' => 'common\models\User',
- 'enableAutoLogin' => true,
- 'identityCookie' => ['name' => '_identity-wechat', 'httpOnly' => true],
- ],
- 'session' => [
- // this is the name of the session cookie used for login on the frontend
- 'name' => 'advanced-wechat',
- ],
- 'hostserver' => [
- 'class' => 'common\api\HostServer',
- ],
- 'log' => [
- 'traceLevel' => YII_DEBUG ? 3 : 0,
- 'targets' => [
- [
- 'class' => 'yii\log\FileTarget',
- 'levels' => ['error', 'warning'],
- ],
- // [
- // 'class' => 'yii\log\FileTarget',
- // 'levels' => ['error', 'warning','info'],
- // 'logVars'=>[],
- // //表示以yii\db\或者app\models\开头的分类都会写入这个文件
- // 'categories'=>['yii\db\*','common\models\*'],
- // //表示写入到文件sql.log中年月日记录日志
- // 'logFile'=>'@runtime/../logs/sql/sql.log'.date('Ymd'),
- // ]
- ],
- ],
- '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' => [
- '/'=>'index/index',
- '/wechat<t:(/|)>'=>'index/index',
- '/house/search<t:(/|)>' =>'/house/search',
- '/house/abroad<t:(/|)>' =>'/house/abroad',
- '/house/searchdatas' =>'/house/searchdatas',
- '/house/searchdata' =>'/house/searchdata',
- '/house/soncity' =>'/house/soncity',
- '/house/news/<hid:\w+><t:(/|)>' =>'/house/news',
- '/house/type/<hid:\w+><t:(/|)>' =>'/house/type',
- '/house/details/<hid:\w+><t:(/|)>' =>'/house/details',
- '/house/periphery/<hid:\w+>' =>'/house/periphery',
- '/house/album/<hid:\w+><t:(/|)>' =>'/house/album',
- '/house/remarkfrom' => "house/remarkfrom",
- '/house/houseremark/<hid:\w+><t:(/|)>' => "/house/houseremark",
- '/house/houseloadremark/<hid:\w+><t:(/|)>' => "/house/houseloadremark",
- '/house/remarklikesfrom' => '/house/remarklikesfrom',
- '/house/remark/<hid:\w+><t:(/|)>' =>'/house/remark',
- '/house/remarkdetails/<hid:\w+><t:(/|)>' =>'/house/remarkdetails',
- '/house/dynamic' =>'/house/dynamic',
- '/house/housetype' =>'/house/housetype',
- '/house/housetypeall' =>'/house/housetypeall',
- '/house/albumlist' =>'/house/albumlist',
- '/house/tall' =>'/house/tall',
- '/house/peitao/<hid:\w+>' =>'/house/peitao',
- '/house/searchname' =>'/house/searchname',
- '/house/licence' =>'/house/licence',
- '/news/details/<nid:\w+><t:(/|)>'=>'/news/details',
- '/villa/villalist<t:(/|)>' =>'/villa/villalist',
- // '/house/<hid:\w+><t:(/|)>' => '/house/home',
- '/house/<hid:><t:(/|)>' => '/house/home',
- //'/house/loan' => '/house/loan',
- '/house/pvimage/<hid:\w+><t:(/|)>' =>'/house/pvimage', // 相册放大浏览页面
- '/house/hximage/<hid:\w+><t:(/|)>' =>'/house/hximage', // 户型放大浏览页面
-
- '/house/loan/<hid:><t:(/|)>' => '/house/loan',
- '/house/intro/<hid:><t:(/|)>' => '/house/intro',
- '/knowledgebase/details/<nid:\w+><t:(/|)>'=>'/knowledgebase/details',
- '/knowledgebase/list<t:(/|)>'=>'/knowledgebase/list',
- '/knowledgebase/<t:(/|)>'=>'/knowledgebase/index',
- '/news/homeform'=>'/news/homeform',
- '/news/<cid:(\w+|/|)><t:(/|)>'=>'/news/home',
- //奇葩说
- '/weirdo/details<t:(/|)><qid:\w+><r:(/|)>'=>'/weirdo/details',
- '/weirdo<t:(/|)>'=>'/weirdo/home',
- '/pj/details/<pid:\w+><t:(/|)>'=>'/pj/details',
- '/pj/homeform'=>'pj/homeform',
- '/pj<t:(/|)>'=>'/pj/home',
- '/wap<t:(/|)>'=>'/wap/index',
- '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
- '<controller:\w+>/<action:\w+>.html'=>'<controller>/<action>',
- '<controller:\w+>/<action:\w+>.php'=>'<controller>/<action>',
- ],
- ],
- ],
- 'params' => $params,
- 'language' =>'zh-CN',
- ];
|