164 lines
9.0 KiB
HTML
164 lines
9.0 KiB
HTML
{php}
|
||
$imgSize = '';
|
||
if(!empty($item['width']) && is_int($item['width']) && $item['width'] > 0 && !empty($item['height']) && is_int($item['height']) && $item['height'] > 0){
|
||
$imgSize = $item['width'] . '像素 X ' . $item['height'] . '像素';
|
||
}
|
||
{/php}
|
||
<div class="layui-card layui-col-md12">
|
||
<div class="layui-card-body">
|
||
{empty name='item'}
|
||
<p class="empty-msg">无效请求,该信息不存在</p>
|
||
{else /}
|
||
<form class="layui-form" data-action="{:url('manager.category/edit')}">
|
||
<input type="hidden" name="__token__" value="{$_token}" />
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" >上级</label>
|
||
<div class="layui-form-mid">
|
||
{$parent.title??'顶级分类'}
|
||
<input type="hidden" name="top" value="{$parent.title??'顶级分类'}" />
|
||
<input type="hidden" name="item[parent_id]" value="{$parent.id??0}" />
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" >名称</label>
|
||
<div class="layui-input-block">
|
||
<input class="layui-input" type="text" name="item[title]" value="{$item.title}" placeholder="填写栏目名称" />
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" >模型</label>
|
||
<div class="layui-input-block">
|
||
<select class="layui-input cate-model" data-selected="{$item.model_id}" lay-filter="cate-model" name="item[model_id]" >
|
||
{volist name="models" id="v" key="k"}
|
||
<option value="{$v.id}" data-template="{$v.template}" {if condition="$item.model_id eq $v.id"}selected="selected"{/if}>{$v.name}</option>
|
||
{/volist}
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" >链接</label>
|
||
<div class="layui-input-block">
|
||
<input class="layui-input" type="text" name="item[url]" value="{$item.url}" placeholder="栏目外链地址,没有则不填写" />
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" >封面图</label>
|
||
<div class="layui-input-block">
|
||
{:widget('manager.upload/image',['src' => $item['src']??'', 'imgSize' => $imgSize])}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" >打开方式</label>
|
||
<div class="layui-input-block">
|
||
<select lay-filter="aihao" name="item[style]" >
|
||
<option {$item.style=="_self"?"selected":""} value="_self">当前页面</option>
|
||
<option {$item.style=="_blank"?"selected":""} value="_blank">新页面</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" >前端显示</label>
|
||
<div class="layui-input-block" style="display:flex;">
|
||
<input type="radio" name="item[state]" value="1" title="是" {if condition="$item.state eq 1"}checked="checked"{/if} />
|
||
<input type="radio" name="item[state]" value="0" title="否" {if condition="$item.state eq 0"}checked="checked"{/if} />
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">后台显示</label>
|
||
<div class="layui-input-block">
|
||
<input type="radio" name="item[admin_state]" value="1" title="是" {if condition="$item.admin_state eq 1"}checked="checked"{/if} />
|
||
<input type="radio" name="item[admin_state]" value="0" title="否" {if condition="$item.admin_state eq 0"}checked="checked"{/if} />
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">是否首页</label>
|
||
<div class="layui-input-block">
|
||
<input type="radio" {if $item['is_index'] == 1}checked="checked"{/if} name="item[is_index]" value="1" title="是" />
|
||
<input type="radio" {if $item['is_index'] == 0}checked="checked"{/if} name="item[is_index]" value="0" title="否" />
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item layui-form-text">
|
||
<label class="layui-form-label" >列表模板</label>
|
||
<div class="layui-input-block">
|
||
<input class="layui-input" type="text" name="item[template_list]" value="{$item.template_list}" placeholder="栏目列表模板,没有可不填" />
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item layui-form-text">
|
||
<label class="layui-form-label" >详情模板</label>
|
||
<div class="layui-input-block">
|
||
<input class="layui-input" type="text" name="item[template_detail]" value="{$item.template_detail}" placeholder="栏目详情模板,没有可不填" />
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-itemBox3 between">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">keywords</label>
|
||
<div class="layui-input-block">
|
||
<textarea class="layui-textarea" name="item[seo_keywords]" placeholder="请在此填写SEO keywords 内容">{$item.seo_keywords}</textarea>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item"><div class="layui-form-mid layui-word-aux">注:内容字符长度为60</div></div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" >描述</label>
|
||
<div class="layui-input-block">
|
||
<textarea class="layui-textarea" name="item[description]">{$item.description}</textarea>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">缩略图尺寸</label>
|
||
<div class="layui-form-mid layui-word-aux">宽:</div>
|
||
<div class="layui-input-inline" >
|
||
<input class="layui-input" type="text" name="item[img_width]" value="{$item.img_width}" style="width:100%"/>
|
||
</div>
|
||
<div class="layui-form-mid layui-word-aux">px</div>
|
||
<div class="layui-form-mid">X</div>
|
||
<div class="layui-form-mid layui-word-aux">高:</div>
|
||
<div class="layui-input-inline" >
|
||
<input class="layui-input" type="text" name="item[img_height]" value="{$item.img_height}" style="width:100%"/>
|
||
</div>
|
||
<div class="layui-form-mid layui-word-aux">px</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">图片最佳尺寸</label>
|
||
<div class="layui-form-mid layui-word-aux">宽:</div>
|
||
<div class="layui-input-inline" >
|
||
<input class="layui-input" type="text" name="item[width]" value="{$item.width}" style="width:100%" />
|
||
</div>
|
||
<div class="layui-form-mid layui-word-aux">px</div>
|
||
<div class="layui-form-mid">X</div>
|
||
<div class="layui-form-mid layui-word-aux">高:</div>
|
||
<div class="layui-input-inline" >
|
||
<input class="layui-input" type="text" name="item[height]" value="{$item.height}" style="width:100%"/>
|
||
</div>
|
||
<div class="layui-form-mid layui-word-aux">px</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">列表页数量</label>
|
||
<div class="layui-input-block">
|
||
<input class="layui-input" type="text" name="item[number]" placeholder="列表页数量,默认20" value="{$item.number??20}" />
|
||
</div>
|
||
</div>
|
||
<div class="layui-clear"></div>
|
||
<hr style="margin: 30px 0;">
|
||
<div class="layui-form-item">
|
||
<div class="text-center">
|
||
<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submitAll">保存</button>
|
||
</div>
|
||
</div>
|
||
<input type="hidden" name="id" value="{$item.id}" />
|
||
</form>
|
||
{/empty}
|
||
</div>
|
||
</div> |