123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- {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">
- <div class="layui-form-item">
- <input type="hidden" name="id" id="id">
- <textarea name="text" id="container" class="text-text" style="width: 200px;height: 200px">{$info}</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('index')}" 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','layedit'], function () {
- var form = layui.form, laydate=layui.laydate,layer = layui.layer,$= layui.jquery,upload = layui.upload;
- var layedit = layui.layedit;
- var info = '';
- //日期范围
- // laydate.render({
- // elem: '#date'
- // ,range: true
- // });
- // layedit.set({
- // uploadImage: {
- // url: '{:url("uploads/Uploads_image")}' //接口url
- // ,type: 'post' //默认post
- // }
- // });
- // layedit.build('container');
- // info = {:json_encode($info)};
- console.log("info",info)
- form.val("form", info);
- if(info){
- // $('#addPic').attr('src',info.img);
- // console.log("text",info.text)
- // $(".text-text").val(info.text)
- }
- form.render();
- form.on('submit(submit)', function (data) {
- console.log("data",data.field)
- loading =layer.load(1, {shade: [0.1,'#fff']});
- $.post("about", data.field, function (res) {
- layer.close(loading);
- if (res.code== 1) {
- 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>
|