AppletDownloadService.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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\admin\applet;
  12. use app\service\core\applet\CoreAppletDownloadService;
  13. use core\base\BaseAdminService;
  14. use think\response\File;
  15. /**
  16. * 小程序下载服务层
  17. */
  18. class AppletDownloadService extends BaseAdminService
  19. {
  20. public function __construct()
  21. {
  22. parent::__construct();
  23. }
  24. /**
  25. * 小程序下载
  26. * @param int $id
  27. * @return File
  28. */
  29. public function download(int $id)
  30. {
  31. $core_applet_download_service = new CoreAppletDownloadService($id);
  32. return $core_applet_download_service->download($this->site_id);
  33. }
  34. }