{php} use app\model\Block; {/php} {layout name="manager/layout" /}
{notempty name="blocks"} {if $groupId == 1} {/if} {if $groupId == 1} {/if} {foreach $blocks as $block} {if $groupId == 1} {/if} {/foreach}
键值标题 内容 操作
{$block.keyword}{$block.title} {php} if($block['type'] == Block::BLOCK):{/php} {php} elseif($block['type'] == Block::IMG): if($block['width'] && $block['height']){ $imgSize = $block['width'].'像素 X '.$block['height'].'像素'; }else{ $imgSize = ''; } {/php} {:widget('manager.upload/image',['src' => $block.value??'', 'imgSize' => $imgSize, 'append' => "_img_" . $block['id']])} {php}elseif($block['type'] == Block::TEXT):{/php}
{php} elseif($block['type'] == Block::GROUP): if($block['width'] && $block['height']){ $imgSize = $block['width'].'像素 X '.$block['height'].'像素'; }else{ $imgSize = ''; } {/php} {:widget('manager.upload/multi',['imgs' => $block.value??'', 'num' => $block.num??10, 'imgSize' => $imgSize, 'append' => "_group_" . $block['id']])} {php} elseif($block['type'] == Block::VIDEOS): {/php} {:widget('manager.upload/multiVideo',['videos' => $block.value??'', 'num' => $block.num??10, 'append' => "_videos_" . $block['id']])} {php} elseif($block['type'] == Block::VIDEO): if($block['width'] && $block['height']){ $imgSize = $block['width'].'像素 X '.$block['height'].'像素'; }else{ $imgSize = ''; } {/php} {:widget('manager.upload/image',['src' => $block.img??'', 'imgSize' => $imgSize, 'append' => "_video_" . $block['id']])} {:widget('manager.upload/video',['src' => $block.value??'', 'append' => "_video_" . $block['id']])} {php} elseif($block['type'] == Block::CODE): {/php}
{php} elseif($block['type'] == Block::MAP): {/php} {php} $thisValue = json_decode($block['value'],true); {/php}
公司名称:{$thisValue.company_name??''}
地址:{$thisValue.address??''}
经纬度:{$thisValue.lng??''},{$thisValue.lat??''}
{php}endif;{/php}
向上 向下 编辑 {if $groupId == 1} 删除 {/if}
{/notempty}