|
...
|
...
|
@@ -211,29 +211,4 @@ class Base extends Model |
|
|
|
});
|
|
|
|
return $query;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @remark :获取图片链接
|
|
|
|
* @name :getImageUrl
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/20 16:46
|
|
|
|
*/
|
|
|
|
public function getImageUrl($hash){
|
|
|
|
if(is_array($hash)){
|
|
|
|
$url = [];
|
|
|
|
foreach ($hash as $k => $v){
|
|
|
|
$url['images_link'][$k] = $this->getImageUrl($v);
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
$imageModel = new Image();
|
|
|
|
$info = $imageModel->read(['hash'=>$hash]);
|
|
|
|
if($info['is_cos'] == 1){
|
|
|
|
$cos = new CosService();
|
|
|
|
$url = $cos->getImageUrl($info['path']);
|
|
|
|
}else{
|
|
|
|
$url = url('b/image/'.$info['hash']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $url;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|