main.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. return [
  3. 'language' => 'zh-CN',
  4. 'aliases' => [
  5. '@bower' => '@vendor/bower-asset',
  6. '@npm' => '@vendor/npm-asset',
  7. ],
  8. 'bootstrap' => [
  9. 'common\components\Init', // 加载默认的配置
  10. ],
  11. 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
  12. 'components' => [
  13. 'cache' => [
  14. 'class' => 'yii\caching\FileCache',
  15. ],
  16. 'services' => [
  17. 'class' => 'services\Application',
  18. ],
  19. 'uploadDrive' => [
  20. 'class' => 'common\components\UploadDrive',
  21. ],
  22. /** ------ 公用支付 ------ **/
  23. 'payment' => [
  24. 'class' => 'common\components\Payment',
  25. ],
  26. /** ------ 微信SDK ------ **/
  27. 'wechat' => [
  28. 'class' => 'common\components\Wechat',
  29. 'userOptions' => [], // 用户身份类参数
  30. 'sessionParam' => 'wechatUser', // 微信用户信息将存储在会话在这个密钥
  31. 'returnUrlParam' => '_wechatReturnUrl', // returnUrl 存储在会话中
  32. 'rebinds' => [
  33. 'cache' => 'common\components\WechatCache',
  34. ]
  35. ],
  36. /** ------ 自定义功能 ------ **/
  37. 'custom' => [
  38. 'class' => 'common\components\Custom',
  39. ],
  40. ],
  41. ];