|
...
|
...
|
@@ -241,11 +241,14 @@ class BaseController extends Controller |
|
|
|
public function getImageUrl($hash){
|
|
|
|
$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']);
|
|
|
|
$url = '';
|
|
|
|
if($info !== false){
|
|
|
|
if($info['is_cos'] == 1){
|
|
|
|
$cos = new CosService();
|
|
|
|
$url = $cos->getImageUrl($info['path']);
|
|
|
|
}else{
|
|
|
|
$url = url('b/image/'.$info['hash']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $url;
|
|
|
|
}
|
...
|
...
|
|