luck-draw/view/manager/block/add.html

317 lines
17 KiB
HTML

{layout name="manager/layout" /}
<style>
.upload-file-div{position: relative}
.upload-file-div-close{position: absolute;right: 0;top: 0;}
</style>
<div id="image_exts" data-exts="{:str_replace(',','|',$uploadConfig['img_type'])}"></div>
<div class="layui-form layuimini-form location-operate-page">
<div class="page-form">
<!-- 栏目 -->
<div class="layui-form-item">
<label class="layui-form-label required">栏目</label>
<div class="layui-input-block">
<div id="parent-menu" data-show="{$showList ?? ''}" data-menu="{$jsonList ?? ''}"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">名称</label>
<div class="layui-input-block">
<input type="text" class="layui-input field-title" name="title" lay-verify="required" placeholder="标题名称" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">别名</label>
<div class="layui-input-block">
<input type="text" class="layui-input field-name" name="name" lay-verify="required" placeholder="支持字母、数字、下划线" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">链接</label>
<div class="layui-input-block">
<input type="text" class="layui-input field-name" name="url" placeholder="" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">类型</label>
<div class="layui-input-inline">
<select name="type" class="field-type" lay-filter="type" type="select">
{foreach $types as $key=> $titem}
<option value="{$key}">{$titem}</option>
{/foreach}
</select>
</div>
</div>
<!-- 富文本-->
<div class="layui-form-item content" >
<label class="layui-form-label">内容</label>
<div class="layui-input-block" style="width:80%;z-index:0;">
<div class="editor"></div>
<textarea name="content1" class="layui-textarea layui-hide"></textarea>
</div>
</div>
<!-- 文本-->
<div class="layui-form-item content" style="display:none">
<label class="layui-form-label">内容</label>
<div class="layui-input-block">
<textarea class="layui-textarea" name="content2" rows="30" placeholder="碎片内容"></textarea>
</div>
</div>
<!-- 图片-->
<div class="layui-form-item content" style="display:none">
<label class="layui-form-label">内容</label>
<div class="layui-inline layui-col-xs12 layui-col-md8">
<div class="layui-row upload-file-div">
<div class=" layui-col-xs12 layui-col-md8">
<input class="layui-input upload-file-value" name="content3" type="text" value="">
<div class="layui-form-mid layui-word-aux">图片尺寸:请上传合适尺寸</div>
</div>
<div class="layui-col-xs12 layui-col-md3">
<span>
<button type="button" class="layui-btn layui-btn-danger upload-btn"
data-type="image"
data-multiple="false"
data-field="image_image"
data-accept="images"
data-mimetype="images/*"
data-exts="{:str_replace(',','|',$uploadConfig['img_type'])}"
>
<i class="fa fa-upload"></i> 上传
</button>
</span>
<span><button type="button" class="layui-btn layui-btn-primary upload-choose-btn"
data-url="/manager/attachment/image"
data-type="image"
data-multiple="true"
data-field="image_image"
data-accept="images"
data-mimetype="images/*"
data-exts="{:str_replace(',','|',$uploadConfig['img_type'])}"
>
<i class="fa fa-list"></i> 选择
</button></span>
</div>
<ul class="layui-row layui-col-xs12 layui-col-md9 preview-list layui-col-space5"></ul>
</div>
</div>
</div>
<!-- 组图-->
<div class="layui-form-item content" style="display:none">
<label class="layui-form-label required">组图:</label>
<div class="layui-inline layui-col-xs12 layui-col-md8">
<div class="layui-row upload-file-div">
<div class=" layui-col-xs12 layui-col-md8">
<input class="layui-input upload-file-value" name="content4" type="text" value="">
<div class="layui-form-mid layui-word-aux">图片尺寸:请上传合适尺寸</div>
</div>
<div class="layui-col-xs12 layui-col-md3">
<span>
<button type="button" class="layui-btn layui-btn-danger upload-btn"
data-type="image"
data-multiple="true"
data-field="image_image"
data-accept="images"
data-mimetype="images/*"
data-exts="{:str_replace(',','|',$uploadConfig['img_type'])}"
>
<i class="fa fa-upload"></i> 上传
</button>
</span>
<span><button type="button" class="layui-btn layui-btn-primary upload-choose-btn"
data-url="/manager/attachment/image"
data-type="image"
data-multiple="true"
data-field="image_image"
data-accept="images"
data-mimetype="images/*"
data-exts="{:str_replace(',','|',$uploadConfig['img_type'])}"
>
<i class="fa fa-list"></i> 选择
</button></span>
</div>
<ul class="layui-row layui-col-xs12 layui-col-md9 preview-list layui-col-space5"></ul>
</div>
</div>
</div>
<!-- 文件-->
<div class="layui-form-item content" style="display:none">
<label class="layui-form-label">内容</label>
<div class="layui-inline layui-col-xs12 layui-col-md8">
<div class="layui-row upload-file-div">
<div class=" layui-col-xs12 layui-col-md8">
<input class="layui-input upload-file-value" name="content5"
type="text" value="">
</div>
<div class="layui-col-xs12 layui-col-md3">
<span>
<button type="button"
data-url='/manager/upload/file'
data-field='file_file'
data-accept='file'
data-multiple='false'
data-mimetype=''
data-acceptMime='file/*'
data-exts="{:str_replace(',','|',$uploadConfig['file_type'])}"
class="layui-btn layui-btn-danger upload-btn">
<i class="fa fa-upload"></i> 上传
</button>
</span>
<span><button type="button" class="layui-btn layui-btn-primary upload-choose-btn"
data-url="/manager/attachment/file"
data-type="file"
data-multiple="false">
<i class="fa fa-list"></i> 选择
</button></span>
</div>
<ul class="layui-row layui-col-xs12 layui-col-md9 preview-list layui-col-space5"></ul>
</div>
</div>
</div>
<!-- 视频-->
<div class="layui-form-item content" style="display:none">
<label class="layui-form-label">视频</label>
<div class="layui-inline layui-col-xs12 layui-col-md8">
<div class="layui-row upload-file-div">
<div class=" layui-col-xs12 layui-col-md8">
<input class="layui-input upload-file-value" name="content6"
type="text" value="">
</div>
<div class="layui-col-xs12 layui-col-md3">
<span>
<button type="button"
data-url='/manager/upload/video'
data-field='video_video'
data-accept='file'
data-multiple='false'
data-mimetype=''
data-acceptMime='video/*'
data-exts="{:str_replace(',','|',$uploadConfig['video_type'])}"
class="layui-btn layui-btn-danger upload-btn">
<i class="fa fa-upload"></i> 上传
</button>
</span>
<span><button type="button" class="layui-btn layui-btn-primary upload-choose-btn"
data-url="/manager/attachment/video"
data-multiple="false"
data-type="file"
>
<i class="fa fa-list"></i> 选择
</button></span>
</div>
<ul class="layui-row layui-col-xs12 layui-col-md9 preview-list layui-col-space5"></ul>
</div>
</div>
</div>
<!-- 图文列表-->
<div class="layui-form-item content" style="display:none" >
<label class="layui-form-label">图文列表</label>
<div class="layui-inline layui-col-md8 " >
<div id="img_list">
<!--
<div class="layui-row upload-file-div">
<div class=" layui-col-xs12 layui-col-md4">
<input class="layui-input upload-file-value" name="content7[1][src]" type="text" value="">
<div class="layui-form-mid layui-word-aux">图片尺寸:请上传合适尺寸</div>
</div>
<div class="layui-col-xs12 layui-col-md3">
<span>
<button type="button" class="layui-btn layui-btn-danger upload-btn">
<i class="fa fa-upload"></i> 上传
</button>
</span>
<span><button type="button" class="layui-btn layui-btn-primary upload-choose-btn"
data-url="/manager/attachment/image"
data-type="image"
data-multiple="false">
<i class="fa fa-list"></i> 选择
</button></span>
</div>
<ul class="layui-row layui-col-xs12 layui-col-md9 preview-list layui-col-space5"></ul>
<div class="layui-row">
<div class="layui-inline">
<label class="layui-form-label">标题</label>
<div class="layui-input-inline">
<input type="text" name="content7[1][title]" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">副标题</label>
<div class="layui-input-inline">
<input type="text" name="content7[1][subtitle]" lay-verify="email" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">描述</label>
<div class="layui-input-inline">
<input type="text" name="content7[1][description]" lay-verify="email" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">链接</label>
<div class="layui-input-inline">
<input type="text" name="content7[1][link]" lay-verify="email" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">时间</label>
<div class="layui-input-inline">
<input type="text" name="content7[1][time]" lay-verify="email" autocomplete="off" class="layui-input">
</div>
</div>
</div>
</div>
-->
</div>
<div class="layui-input-block">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend> <button class="layui-btn " id="addrImgListNode">增加一个节点</button></legend>
</fieldset>
</div>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn layui-btn-normal" data-url="/manager/block/add" lay-submit lay-filter="saveBtn">确认保存</button>
</div>
</div>
</div>
</div>
<div class="addImgListNode"></div>
<script>
addImgListNode=true;
var ImgListNodeKey = {$maxKey??0};//初始值
</script>
<script src="__MANAGER__/js/block.js?v={:mt_rand()}"></script>