123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- // +----------------------------------------------------------------------
- // | Niucloud-admin 企业快速开发的saas管理平台
- // +----------------------------------------------------------------------
- // | 官方网址:https://www.niucloud.com
- // +----------------------------------------------------------------------
- // | niucloud团队 版权所有 开源版本可自由商用
- // +----------------------------------------------------------------------
- // | Author: Niucloud Team
- // +----------------------------------------------------------------------
- namespace app\service\api\upload;
- use app\service\core\upload\CoreBase64Service;
- use core\base\BaseApiService;
- use Exception;
- /**
- * 用户服务层
- * Class BaseService
- * @package app\service
- */
- class Base64Service extends BaseApiService
- {
- private $root_path = 'base';
- /**
- * 远程拉取图片
- * @param string $content
- * @return array
- * @throws Exception
- */
- public function image(string $content){
- $dir = $this->root_path.'/'.'image'.'/'.date('Ym').'/'.date('d');
- $core_base64_service = new CoreBase64Service();
- return $core_base64_service->image($content,0, $dir);
- }
- }
|