OpenAppConfig.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace crmeb\services\wechat\config;
  12. /**
  13. * 开放平台APP配置
  14. * Class OpenAppConfig
  15. * @package crmeb\services\wechat\config
  16. */
  17. class OpenAppConfig extends OpenWebConfig
  18. {
  19. /**
  20. * OpenAppConfig constructor.
  21. */
  22. public function init()
  23. {
  24. if ($this->init) {
  25. return;
  26. }
  27. $this->init = true;
  28. $this->appId = $this->appId ?: $this->config->getConfig('app.appid', '');
  29. $this->secret = $this->secret ?: $this->config->getConfig('app.secret', '');
  30. $this->token = $this->token ?: $this->config->getConfig('app.token', '');
  31. $this->aesKey = $this->aesKey ?: $this->config->getConfig('app.key', '');
  32. }
  33. }