WechatNotice.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 app\controller;
  12. use crmeb\basic\BaseController;
  13. use crmeb\services\WechatService;
  14. use EasyWeChat\Core\Exceptions\InvalidArgumentException;
  15. use EasyWeChat\Server\BadRequestException;
  16. use think\Response;
  17. /**
  18. * Class WechatNotice
  19. * @package app\controller
  20. * @author xaboy
  21. * @day 2020-04-26
  22. */
  23. class WechatNotice extends BaseController
  24. {
  25. /**
  26. * @return Response
  27. * @throws InvalidArgumentException
  28. * @throws BadRequestException
  29. * @author xaboy
  30. * @day 2020-04-26
  31. */
  32. public function serve()
  33. {
  34. ob_clean();
  35. return WechatService::create()->serve($this->request);
  36. }
  37. }