'cyy', 'language' => 'zh-CN', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log', 'queue'], // 跨域全局配置 'as cors' => [ 'class' => \yii\filters\Cors::class, 'cors' => [ 'Origin' => ['*'], 'Access-Control-Request-Method' => ['GET', 'POST', 'OPTIONS'], 'Access-Control-Allow-Headers' => [ 'X-Requested-With', 'Content-Type', 'Origin', 'Authorization', 'Accept', 'Access-Token', 'Accept-Encoding', ], 'Access-Control-Allow-Credentials' => false, ], ], 'components' => [ 'request' => [ 'enableCsrfCookie' => false, 'enableCookieValidation' => false, 'enableCsrfValidation' => false, ], 'session' => null, 'cache' => [ 'class' => 'yii\caching\FileCache', 'fileMode' => 0777, ], 'cacheLock' => [ 'class' => 'yii\caching\FileCache', 'fileMode' => 0777, 'cachePath' => '@runtime/cacheLock', ], 'jwt' => [ 'class' => app\librarys\JwtComponent::class, 'key' => 'abc123456', // 密钥 'headerKey' => 'Authorization', ], 'storage' => [ 'class' => app\librarys\storage\components\StorageComponent::class, 'basePath' => 'web/uploads' ], 'storageTemp' => [ 'class' => app\librarys\storage\components\StorageComponent::class, 'basePath' => 'runtime/temp' ], 'errorHandler' => [ 'errorAction' => 'common/default/error', ], 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', // send all mails to a file by default. You have to set // 'useFileTransport' to false and configure a transport // for the mailer to send real emails. 'useFileTransport' => false, ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], 'fileMode' => 0777, // 'maxLogFiles' => 300, // ], // [ // 'class' => 'yii\log\FileTarget', // 'levels' => ['error', 'warning','info','trace','profile'], // 'logVars'=>[], // //表示以yii\db\或者app\models\开头的分类都会写入这个文件 // 'categories'=>['yii\db\*'], // //表示写入到文件 // 'logFile'=>'@runtime/../runtime/logs/YIISQL_'.date('y_m_d').'.log', // 'microtime' => true, ], ], ], 'db' => $db, 'redis' => $redis, 'queue' => $queue, 'urlManager' => [ 'class' => 'app\librarys\common\UrlManager', 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ 'maiyatian/test/callback/' => 'common/maiyatian/test', 'maiyatian/callback/' => 'common/maiyatian/index', 'keloop/callback/index' => 'common/keloop/index', 'live/callback' => 'common/live/index', 'live/record' => 'common/live/record', 'mochat/callback/' => 'common/mochat/index', 'mochat/api/' => 'common/mochat/api', 'jushuitan/callback' => 'common/jushuitan/index', 'alipay/notify/' => 'common/alipay-notify/index', 'wechat/notify/' => 'common/wechat-notify/index', 'adapay/notify/' => 'common/adapay-notify/index', 'allinpay/notify/' => 'common/allinpay-notify/index', 'yunst/notify/' => 'common/yunst-notify/index', 'adapay/h5/' => 'common/adapay-notify/h5', 'alipay/callback' => 'common/alipay-callback/index', 'ad/callback/' => 'common/ad-callback/index', 'alipay/spi' => 'common/alipay-callback/spi', 'bytedance/notify' => 'common/byte-dance-notify/index', 'wechat_mp/push' => 'common/wechat-mp/index', 'wechat/msg' => 'common/wechat-msg/index', 'wechat/api' => 'common/wechat-msg/api', 'wechat/ticket' => 'common/wechat-get-ticket/index', 'wechat/fuwu-buyer-login' => 'common/wechat-get-ticket/fuwu-buyer-login', 'wechat/callback/'=>'common/wechat-get-ticket/callback', 'alipay/notify'=> 'common/alipay-callback/ali-notice', // 消息通知 'alipay/token'=> 'common/alipay-callback/get-token', // 支付宝token //'alipay/notify'=> 'common/alipay-notify/index', // 网关验证 'douyin/ticket' => 'common/douyin/ticket', 'douyin/store-mini-code/' => 'common/douyin/store-mini-code', 'douyin/callback/' => 'common/douyin/callback', 'wechat/video-shop-order/callback/' => 'common/wechat-callback/video-shop-order-callback', 'wechat/delivery-callback'=>'common/wechat-callback/delivery-call-back', 'wechat/transfer-batches-notify/' => 'common/wechat-callback/wechat-transfer-batches-notify', 'lg/cash-notify/' => 'common/lg-cash-notify/index', 'lg/apply-notify/' => 'common/lg-apply-notify/index', ], ] ], 'params' => $params, 'timeZone' => 'PRC', 'modules' => [ 'common' => [ 'class' => 'app\modules\common\Module', ], 'client' => [ 'class' => 'app\modules\client\Module', ], 'admin' => [ 'class' => 'app\modules\admin\Module', ], 'alliance' => [ 'class' => 'app\modules\alliance\Module', ] ], 'defaultRoute' => 'common/default/index', 'aliases' => [ '@ByteDance' => '@app/utils/ByteDance' ], ]; return $config;