123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- {include file="common/header"/}
- <div class="LM-container">
- <div class="LM-main">
- <fieldset class="layui-elem-field layui-field-title">
- </fieldset>
- <form class="layui-form layui-form-pane" lay-filter="form">
- <input type="hidden" name="id" id="id">
- <div class="layui-form-item">
- <label class="layui-form-label">标题</label>
- <div class="layui-input-inline">
- <input type="text" name="name" lay-verify="required" placeholder="{:lang('pleaseEnter')}昵称" class="layui-input">
- </div>
- <div class="layui-form-mid layui-word-aux">
- 在4到25个字符之间。
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">说明 </label>
- </div>
- <div class="layui-form-item">
- <textarea name="text" id="container" class="text-text" style="width: 200px;height: 200px">{$info.text}</textarea>
- </div>
- <div class="layui-form-item">
- <div class="layui-input-inline">
- <button type="button" class="layui-btn" lay-submit="" lay-filter="submit">{:lang('submit')}</button>
- <a href="{:url('sysmsg')}" class="layui-btn layui-btn-primary">{:lang('back')}</a>
- </div>
- </div>
- </form>
- </div>
- </div>
- {include file="common/footer"/}
- <!-- 配置文件 -->
- <script type="text/javascript" src="/static/plugins/ueditor/ueditor.config.js"></script>
- <!-- 编辑器源码文件 -->
- <script type="text/javascript" src="/static/plugins/ueditor/ueditor.all.js"></script>
- <!-- 实例化编辑器 -->
- <script type="text/javascript" >
- var ue = UE.getEditor('container',{autoHeightEnabled: false,scaleEnabled:true,initialFrameHeight:400,initialFrameWidth:600});
- </script>
- <script>
- layui.use(['form', 'layer','upload','laydate'], function () {
- var form = layui.form, laydate=layui.laydate,layer = layui.layer,$= layui.jquery,upload = layui.upload;
- var info = '';
- //日期范围
- laydate.render({
- elem: '#date'
- ,range: true
- });
- info = {:json_encode($info)};
- console.log("info",info)
- form.val("form", info);
- if(info){
- // $("#container").html(info.text)
- // $('#addPic').attr('src',info.image);
- // $("#avatar").val(info.image)
- }
- form.render();
- form.on('submit(submit)', function (data) {
- console.log("data",data.field)
- loading =layer.load(1, {shade: [0.1,'#fff']});
- $.post("", data.field, function (res) {
- layer.close(loading);
- if (res.code== 200) {
- layer.msg(res.msg, {time: 1800, icon: 1}, function () {
- // location.href = res.url;
- // location.href = res.url;
- });
- } else {
- layer.msg(res.msg, {time: 1800, icon: 2});
- }
- },"json");
- });
- });
- </script>
|