Browse Source

Merge branch 'phoenix' of http://120.24.33.109:11081/hyzjshwo/lanzu_api_hyperf into phoenix

master
Lemon 5 years ago
parent
commit
805b469fbb
  1. 7
      app/Service/v3/Implementations/CategoryService.php

7
app/Service/v3/Implementations/CategoryService.php

@ -58,7 +58,12 @@ class CategoryService implements CategoryServiceInterface
$returnData = [];
foreach ($categories as $key => &$category) {
$value = json_decode($category, true);
$returnData[] = ['id' => $key, 'icon' => config('alioss.img_host').$value['icon'].OssThumbnail::THUMBNAIL_100_Q50, 'name' => $value['name']];
$iconUrl = $value['icon'];
if(strripos($iconUrl,"http") === false){
$iconUrl = config('alioss.img_host').$value['icon'];
}
$iconUrl = $iconUrl . OssThumbnail::THUMBNAIL_100_Q50;
$returnData[] = ['id' => $key, 'icon' => $iconUrl , 'name' => $value['name']];
}
return $returnData;

Loading…
Cancel
Save