form.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
  2. <div class="layui-card-body">
  3. <div class="layui-row margin-bottom-15">
  4. <label class="layui-col-xs2 think-form-label">标题</label>
  5. <label class="layui-col-xs10">
  6. <input name="title" required value='{$vo.title|default=""}' placeholder="请输入标题" class="layui-input">
  7. </label>
  8. </div>
  9. <div class="layui-row margin-bottom-15">
  10. <label class="layui-col-xs2 think-form-label">内容</label>
  11. <label class="layui-col-xs10">
  12. <textarea name="content" cols="100" rows="10" required>{$vo.content|default=""}</textarea>
  13. <!-- <input name="content" required value='{$vo.content|default=""}' placeholder="请输入内容" class="layui-input">-->
  14. </label>
  15. </div>
  16. <!-- <div class="layui-row margin-bottom-15">-->
  17. <!-- <label class="layui-col-xs2 think-form-label">视频</label>-->
  18. <!-- <label class="layui-col-xs10">-->
  19. <!-- <input name="url" type="hidden" value="{$vo.url|default=''}">-->
  20. <!-- </label>-->
  21. <!-- </div>-->
  22. <div class="layui-row margin-bottom-15" style="margin-left: 260px;">
  23. <label class="layui-form-label label-required">视频</label>
  24. <div class="layui-input-block">
  25. <input name="url" type="hidden" value="{$vo.url|default=''}" data-type="gif">
  26. </div>
  27. </div>
  28. </div>
  29. {if $is_examine == 0}
  30. <div class="hr-line-dashed"></div>
  31. <div class="layui-form-item text-center">
  32. {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
  33. <button class="layui-btn" type='submit'>保存数据</button>
  34. </div>
  35. {/if}
  36. </form>
  37. <script>
  38. window.form.render();
  39. require(['ckeditor', 'angular'], function () {
  40. window.createEditor('[name="content"]', {height: 200,width: 1000});
  41. })
  42. </script>
  43. <script>
  44. window.form.render();
  45. // $('[name="url"]').uploadOneVideo();
  46. $('[name="url"]').uploadOneImage();
  47. </script>