You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.6 KiB

  1. <?php
  2. $params = array_merge(
  3. require __DIR__ . '/../../common/config/params.php', require __DIR__ . '/../../common/config/params-local.php', require __DIR__ . '/params.php', require __DIR__ . '/params-local.php'
  4. );
  5. return [
  6. 'id' => 'backend',
  7. 'basePath' => dirname(__DIR__),
  8. 'controllerNamespace' => 'backend\controllers',
  9. 'bootstrap' => ['log'],
  10. 'modules' => [
  11. 'wx-public-account' => [
  12. 'class' => '\backend\modules\wx_public_account\Module',
  13. ],
  14. ],
  15. 'components' => [
  16. 'request' => [
  17. 'parsers' => [
  18. 'application/json' => 'yii\web\JsonParser',
  19. ],
  20. 'csrfParam' => '_csrf-api',
  21. ],
  22. 'user' => [
  23. 'identityClass' => 'common\models\User',
  24. 'enableAutoLogin' => true,
  25. 'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
  26. ],
  27. 'session' => [
  28. // this is the name of the session cookie used for login on the app
  29. 'name' => 'backend',
  30. ],
  31. 'log' => [
  32. 'traceLevel' => YII_DEBUG ? 3 : 0,
  33. 'targets' => [
  34. [
  35. 'class' => 'yii\log\FileTarget',
  36. 'levels' => ['error', 'warning'],
  37. ],
  38. [
  39. 'class' => 'yii\log\FileTarget',
  40. 'levels' => ['info', 'error'],
  41. 'categories' => ['imagetest'],
  42. 'logFile' => '@app/runtime/logs/imagetest.log',
  43. 'logVars' => [],
  44. 'exportInterval' => 1,
  45. 'prefix' => function ($message) {
  46. }
  47. ],
  48. [
  49. 'class' => 'yii\log\FileTarget',
  50. 'levels' => ['error', 'warning'],
  51. 'categories' => ['refund_log'],
  52. 'logFile' => '@app/runtime/logs/refund_log.log',
  53. 'logVars' => [],
  54. 'exportInterval' => 1,
  55. 'prefix' => function ($message) {
  56. }
  57. ],
  58. ],
  59. ],
  60. 'errorHandler' => [
  61. 'errorAction' => 'site/error',
  62. ],
  63. 'urlManager' => [
  64. 'enablePrettyUrl' => true,
  65. 'showScriptName' => false,
  66. 'rules' => [
  67. ],
  68. ],
  69. 'file' => ['class' => 'backend\logic\file\FileManager'],
  70. 'goods' => ['class' => 'goods\goods\logic\goods\GoodsManager'],
  71. ],
  72. // 'as access' => [
  73. // 'class' => 'iron\components\AccessControl',
  74. // ],
  75. 'params' => $params,
  76. ];