修复错误
This commit is contained in:
parent
b6e95690c0
commit
939842ec1a
@ -663,9 +663,7 @@ class ProductRepository extends BaseRepository
|
||||
public function getAdminOneProduct(int $id, ?int $activeId, $conType = 0)
|
||||
{
|
||||
$with = ['attr', 'attrValue', 'oldAttrValue', 'merCateId.category', 'storeCategory', 'brand', 'temp', 'seckillActive',
|
||||
'content' => function($query) use($conType){
|
||||
$query->where('type',$conType);
|
||||
},
|
||||
'content',
|
||||
'merchant'=> function($query){
|
||||
$query->field('mer_id,mer_avatar,mer_name,is_trader');
|
||||
},
|
||||
@ -753,7 +751,16 @@ class ProductRepository extends BaseRepository
|
||||
$data['attrValue'] = $arr;
|
||||
|
||||
$content = $data['content']['content'] ?? '';
|
||||
if ($conType) $content = json_decode($content);
|
||||
if (isset($data['content']) &&$data['content']['type']==1){
|
||||
$arr = json_decode($content);
|
||||
if($arr){
|
||||
$content='';
|
||||
foreach($arr->image as $k=>$v){
|
||||
$content.='<img src='.$v.'></br>';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
unset($data['content']);
|
||||
$data['content'] = $content;
|
||||
return $data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user