WechatConfigService.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\service\api\wechat;
  12. use app\service\core\wechat\CoreWechatConfigService;
  13. use core\base\BaseApiService;
  14. /**
  15. * 微信配置模型
  16. * Class WechatConfigService
  17. * @package app\service\core\wechat
  18. */
  19. class WechatConfigService extends BaseApiService
  20. {
  21. /**
  22. * 检查微信公众号是否配置
  23. * @return bool
  24. */
  25. public function checkWechatConfig()
  26. {
  27. $config = (new CoreWechatConfigService())->getWechatConfig();
  28. if ( empty($config['app_id']) ) {
  29. return false;
  30. } else {
  31. return true;
  32. }
  33. }
  34. }