|
|
|
@ -8,6 +8,7 @@ use App\Model\v3\Category; |
|
|
|
use App\Model\v3\Goods; |
|
|
|
use App\Model\v3\GoodsType; |
|
|
|
use App\Model\v3\StoreType; |
|
|
|
use App\Service\v3\Interfaces\AttachmentServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\CategoryServiceInterface; |
|
|
|
use App\TaskWorker\SSDBTask; |
|
|
|
use Hyperf\Utils\ApplicationContext; |
|
|
|
@ -15,6 +16,12 @@ use Hyperf\Utils\ApplicationContext; |
|
|
|
class CategoryService implements CategoryServiceInterface |
|
|
|
{ |
|
|
|
|
|
|
|
/** |
|
|
|
* @Inject |
|
|
|
* @var AttachmentServiceInterface |
|
|
|
*/ |
|
|
|
protected $attachmentService; |
|
|
|
|
|
|
|
public function do() |
|
|
|
{ |
|
|
|
// TODO: Implement do() method.
|
|
|
|
@ -85,7 +92,7 @@ class CategoryService implements CategoryServiceInterface |
|
|
|
if(strripos($iconUrl,"http") === false){ |
|
|
|
$iconUrl = config('alioss.img_host').'/'.$value['icon']; |
|
|
|
} |
|
|
|
$iconUrl = $iconUrl . OssThumbnail::THUMBNAIL_100_Q50; |
|
|
|
$iconUrl = $this->attachmentService->switchImgToAliOss($iconUrl, OssThumbnail::THUMBNAIL_100_Q90); |
|
|
|
$returnData[] = ['id' => $key, 'icon' => $iconUrl , 'name' => $value['name']]; |
|
|
|
} |
|
|
|
|
|
|
|
|