WechatServeService.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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\CoreWechatServeService;
  13. use core\base\BaseApiService;
  14. use EasyWeChat\Kernel\Exceptions\BadRequestException;
  15. use EasyWeChat\Kernel\Exceptions\InvalidArgumentException;
  16. use ReflectionException;
  17. use Symfony\Component\HttpFoundation\Response;
  18. use Throwable;
  19. /**
  20. * 微信配置模型
  21. * Class WechatConfigService
  22. * @package app\service\core\wechat
  23. */
  24. class WechatServeService extends BaseApiService
  25. {
  26. public $core_wechat_serve_service;
  27. public function __construct()
  28. {
  29. parent::__construct();
  30. $this->core_wechat_serve_service = new CoreWechatServeService();
  31. }
  32. /**
  33. * 消息与时间推送
  34. * @return Response
  35. * @throws BadRequestException
  36. * @throws InvalidArgumentException
  37. * @throws ReflectionException
  38. * @throws Throwable
  39. */
  40. public function serve(){
  41. return $this->core_wechat_serve_service->serve($this->request->defaultSiteId());
  42. }
  43. }