luck-draw/view/manager/archives/edit.html

186 lines
10 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{layout name="manager/layout" /}
<style>
xm-select > .xm-body{z-index: 100000;}
</style>
<script>
var archiveCoverSize = JSON.parse('{$archiveCoverSize|raw}');
layui.use(['jquery'], function () {
let $ = layui.jquery;
currentCateId = "{$item->category}";
$(function () {
if (archiveCoverSize[currentCateId] != undefined && archiveCoverSize[currentCateId].archive_cover_size) {
$('#archive_cover_size').text(archiveCoverSize[currentCateId].archive_cover_size)
} else {
$('#archive_cover_size').text('请上传合适尺寸的图片')
}
})
})
</script>
<div class="layuimini-container location-operate-page">
<div class="layuimini-main">
<div class="layui-form layuimini-form">
<!-- 栏目 -->
<div class="layui-form-item">
<label class="layui-form-label required">栏目</label>
<div class="layui-input-block">
<div id="parent-menu" data-disabled="true" data-show="{$showList ?? ''}" data-menu="{$jsonList ?? ''}"></div>
</div>
</div>
<!-- 标题 -->
<div class="layui-form-item field-div current-field-title" {if !in_array('title', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label required">标题</label>
<div class="layui-input-block">
<input type="text" name="title" lay-verify="required" lay-reqtext="标题不能为空" placeholder="请输入标题"
class="layui-input" value="{$item.title ?? ''}">
</div>
</div>
<!-- 副标题 -->
<div class="layui-form-item field-div current-field-subtitle" {if !in_array('subtitle', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label">副标题</label>
<div class="layui-input-block">
<input type="text" name="subtitle" placeholder="请输入副标题" class="layui-input" value="{$item.subtitle ?? ''}">
</div>
</div>
<div class="layui-form-item layui-row field-div current-field-cover" {if !in_array('cover', $currentList)} style="display:none;" {/if}>
<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="cover" type="text" value="{$item.cover ?? ''}">
<div class="layui-form-mid layui-word-aux">图片尺寸500px*800px</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> 上传
<div class="cut-list layui-hide">
<div class="cut-info" data-name="pc" data-width="500" data-height="800"></div>
<div class="cut-info" data-name="phone" data-width="300" data-height="500"></div>
<div class="cut-info" data-name="test" data-width="140" data-height="100"></div>
</div>
</button>
</span>
<span><button type="button" class="layui-btn layui-btn-primary upload-choose-btn" 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>
</div>
</div>
<!-- 摘要 -->
<div class="layui-form-item layui-form-text field-div current-field-summary" {if !in_array('summary', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label">摘要</label>
<div class="layui-input-block editor-text">
<!-- <div class="editor"></div>-->
<textarea name="summary" class="layui-textarea">{$item.summary??''}</textarea>
</div>
</div>
<!-- 内容 -->
<div class="layui-form-item layui-form-text field-div current-field-content" {if !in_array('content', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label">内容</label>
<div class="layui-input-block editor-text">
<div class="editor"></div>
<textarea name="content" class="layui-textarea layui-hide">{$item.content??''}</textarea>
</div>
</div>
<!-- 是否推荐 -->
<div class="layui-form-item layui-form-text field-div current-field-recommend" {if !in_array('recommend', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label">是否推荐</label>
<div class="layui-input-block">
<input type="radio" name="recommend" value="1" title="是" {if $item.recommend==1 } checked{/if}>
<input type="radio" name="recommend" value="0" title="否" {if $item.recommend==0 } checked{/if}>
</div>
</div>
<!-- 是否置顶 -->
<div class="layui-form-item layui-form-text field-div current-field-top" {if !in_array('top', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label">是否置顶</label>
<div class="layui-input-block">
<input type="radio" name="top" value="1" title="是" {if $item.top==1 } checked{/if}>
<input type="radio" name="top" value="0" title="否" {if $item.top==0 } checked{/if}>
</div>
</div>
<!-- 是否热门 -->
<div class="layui-form-item layui-form-text field-div current-field-hot" {if !in_array('hot', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label">是否热门</label>
<div class="layui-input-block">
<input type="radio" name="hot" value="1" title="是" {if $item.hot==1 } checked {/if}>
<input type="radio" name="hot" value="0" title="否" {if $item.hot==0 } checked {/if}>
</div>
</div>
<!-- 性别 -->
<div class="layui-form-item layui-form-text field-div current-field-gender" {if !in_array('gender', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label">性别</label>
<div class="layui-input-block">
<input type="radio" name="gender" value="1" title="先生" {if $item.gender==1 } checked {/if}>
<input type="radio" name="gender" value="0" title="女士" {if $item.gender==0 } checked {/if}>
</div>
</div>
<!-- 阅读量 -->
<div class="layui-form-item field-div current-field-views" {if !in_array('views', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label ">阅读量</label>
<div class="layui-input-block">
<input type="number" name="views" placeholder="请输入阅读量" class="layui-input" value="{$item.views ?? ''}">
</div>
</div>
<!-- author -->
<div class="layui-form-item field-div current-field-author" {if !in_array('author', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label ">作者</label>
<div class="layui-input-block">
<input type="text" name="author" placeholder="请输入" class="layui-input" value="{$item.author ?? ''}">
</div>
</div>
<!-- seoTitle -->
<div class="layui-form-item layui-form-text field-div current-field-seo_title" {if !in_array('seo_title', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label">seoTitle</label>
<div class="layui-input-block editor-text">
<!-- <div class="editor"></div>-->
<textarea name="seo_title" class="layui-textarea">{$item.seo_title??''}</textarea>
</div>
</div>
<!-- seoKeywords -->
<div class="layui-form-item layui-form-text field-div current-field-seo_keywords" {if !in_array('seo_keywords', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label">seoKeywords</label>
<div class="layui-input-block editor-text">
<!-- <div class="editor"></div>-->
<textarea name="seo_keywords" class="layui-textarea">{$item.seo_keywords??''}</textarea>
</div>
</div>
<!-- seoDescription -->
<div class="layui-form-item layui-form-text field-div current-field-seo_description" {if !in_array('seo_description', $currentList)} style="display:none;" {/if}>
<label class="layui-form-label">seoDescription</label>
<div class="layui-input-block editor-text">
<!-- <div class="editor"></div>-->
<textarea name="seo_description" class="layui-textarea">{$item.seo_description??''}</textarea>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<input type="hidden" id="item-id" value="{$item.id ?? 0}">
<button class="layui-btn layui-btn-normal" data-url="/manager/archives/edit?id={$item.id}" lay-submit
lay-filter="saveBtn">确认保存
</button>
</div>
</div>
</div>
</div>
</div>
<script src="__MANAGER__/js/archives.js?v={:mt_rand()}"></script>