|
...
|
...
|
@@ -40,6 +40,14 @@ class ProductLogic extends BaseLogic |
|
|
|
{
|
|
|
|
$info = $this->model->read(['id'=>$id]);
|
|
|
|
$info = $this->formatData($info);
|
|
|
|
//统一图片链接
|
|
|
|
if(!empty($info['gallery'])){
|
|
|
|
foreach ($info['gallery'] as $k => $v){
|
|
|
|
$v['image_link'] = $this->getImageUrl($v['url']);
|
|
|
|
$info['gallery'][$k] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$info['icon_link'] = $this->getImageUrl($info['icon']);
|
|
|
|
return $this->success($info);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -55,14 +63,6 @@ class ProductLogic extends BaseLogic |
|
|
|
$info['status_text'] = Product::statusMap()[$info['status']] ?? '';
|
|
|
|
$info['created_uid_text'] = (new UserLogic())->getCacheInfo($info['created_uid'])['name'] ?? '';
|
|
|
|
$info['url'] = $this->getProjectDomain() . $info['route'] ;
|
|
|
|
//统一图片链接
|
|
|
|
if(!empty($info['gallery'])){
|
|
|
|
foreach ($info['gallery'] as $k => $v){
|
|
|
|
$v['image_link'] = $this->getImageUrl($v['url']);
|
|
|
|
$info['gallery'][$k] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$info['icon_link'] = $this->getImageUrl($info['icon']);
|
|
|
|
return $info;
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|