about.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {include file="common/header"/}
  2. <div class="LM-container">
  3. <div class="LM-main">
  4. <fieldset class="layui-elem-field layui-field-title">
  5. </fieldset>
  6. <form class="layui-form layui-form-pane" lay-filter="form">
  7. <div class="layui-form-item">
  8. <input type="hidden" name="id" id="id">
  9. <textarea name="text" id="container" class="text-text" style="width: 200px;height: 200px">{$info}</textarea>
  10. </div>
  11. <div class="layui-form-item">
  12. <div class="layui-input-inline">
  13. <button type="button" class="layui-btn" lay-submit="" lay-filter="submit">{:lang('submit')}</button>
  14. <!--<a href="{:url('index')}" class="layui-btn layui-btn-primary">{:lang('back')}</a>-->
  15. </div>
  16. </div>
  17. </form>
  18. </div>
  19. </div>
  20. {include file="common/footer"/}
  21. <!-- 配置文件 -->
  22. <script type="text/javascript" src="/static/plugins/ueditor/ueditor.config.js"></script>
  23. <!-- 编辑器源码文件 -->
  24. <script type="text/javascript" src="/static/plugins/ueditor/ueditor.all.js"></script>
  25. <!-- 实例化编辑器 -->
  26. <script type="text/javascript" >
  27. var ue = UE.getEditor('container',{autoHeightEnabled: false,scaleEnabled:true,initialFrameHeight:400,initialFrameWidth:600});
  28. </script>
  29. <script>
  30. layui.use(['form', 'layer','upload','laydate','layedit'], function () {
  31. var form = layui.form, laydate=layui.laydate,layer = layui.layer,$= layui.jquery,upload = layui.upload;
  32. var layedit = layui.layedit;
  33. var info = '';
  34. //日期范围
  35. // laydate.render({
  36. // elem: '#date'
  37. // ,range: true
  38. // });
  39. // layedit.set({
  40. // uploadImage: {
  41. // url: '{:url("uploads/Uploads_image")}' //接口url
  42. // ,type: 'post' //默认post
  43. // }
  44. // });
  45. // layedit.build('container');
  46. // info = {:json_encode($info)};
  47. console.log("info",info)
  48. form.val("form", info);
  49. if(info){
  50. // $('#addPic').attr('src',info.img);
  51. // console.log("text",info.text)
  52. // $(".text-text").val(info.text)
  53. }
  54. form.render();
  55. form.on('submit(submit)', function (data) {
  56. console.log("data",data.field)
  57. loading =layer.load(1, {shade: [0.1,'#fff']});
  58. $.post("about", data.field, function (res) {
  59. layer.close(loading);
  60. if (res.code== 1) {
  61. layer.msg(res.msg, {time: 1800, icon: 1}, function () {
  62. // location.href = res.url;
  63. // location.href = res.url;
  64. });
  65. } else {
  66. layer.msg(res.msg, {time: 1800, icon: 2});
  67. }
  68. },"json");
  69. });
  70. });
  71. </script>