作者 lyh

gx

... ... @@ -241,12 +241,15 @@ class BaseController extends Controller
public function getImageUrl($hash){
$imageModel = new Image();
$info = $imageModel->read(['hash'=>$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;
}
... ...
... ... @@ -34,7 +34,7 @@ class BlogController extends BaseController
$v = $blogLabelLogic->get_label_name($v);
$v['route'] = RouteMap::getRoute(RouteMap::SOURCE_BLOG, $v['id'], $this->user['project_id']);
$v['url'] = $this->getProjectDomain() . $v['route'];
// $v['image_link'] = $this->getImageUrl($v['image']);
$v['image_link'] = $this->getImageUrl($v['image']);
$lists['list'][$k] = $v;
}
}
... ...