截流自动化的商城平台
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

edit.html 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {layout name="layout2" /}
  2. <style>
  3. .reqRed::before {
  4. content: '*';
  5. color: red;
  6. margin-right: 5px;
  7. }
  8. .layui-form-label {
  9. width: 120px;
  10. }
  11. </style>
  12. <div class="layui-form" lay-filter="layuiadmin-form" id="layuiadmin-form" style="padding: 20px 30px 0 0;">
  13. <input type="hidden" name="id" value="{$detail.id}" >
  14. <div class="layui-form-item">
  15. <label class="layui-form-label reqRed">专区名称:</label>
  16. <div class="layui-input-inline">
  17. <input type="text" name="name" value="{$detail.name}" lay-vertype="tips" autocomplete="off" class="layui-input">
  18. </div>
  19. </div>
  20. <!--活动专区封面图-->
  21. <div class="layui-form-item">
  22. <label class="layui-form-label reqRed">封面图:</label>
  23. <div class="layui-input-inline">
  24. {if $detail.image}
  25. <div class="upload-image-div">
  26. <img src="{$detail.image}" alt="img">
  27. <input type="hidden" name="image" value="{$detail.image}">
  28. <div class="del-upload-btn">x</div>
  29. </div>
  30. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image" id="image"> + 添加图片</a></div>
  31. {else}
  32. <div class="upload-image-elem"><a class="add-upload-image" id="image"> + 添加图片</a></div>
  33. {/if}
  34. </div>
  35. <div class="layui-form-item">
  36. <label class="layui-form-label"></label>
  37. <label class=" layui-form-mid layui-word-aux">活动专区封面图。建议尺寸:宽100px*高100px,jpg,jpeg,png格式</label>
  38. </div>
  39. </div>
  40. <div class="layui-form-item">
  41. <label class="layui-form-label reqRed">专区描述:</label>
  42. <div class="layui-input-inline">
  43. <textarea name="synopsis" lay-verify="required" class="layui-textarea">{$detail.synopsis}</textarea>
  44. </div>
  45. </div>
  46. <div class="layui-form-item">
  47. <label class="layui-form-label">专区状态:</label>
  48. <div class="layui-input-inline">
  49. <input type="checkbox" lay-filter="disable" name="status" lay-skin="switch" lay-text="显示|隐藏" {if ($detail.status == 1)}checked{/if} />
  50. <!-- <div class=" layui-form-mid layui-word-aux">显示或者隐藏商品栏目</div>-->
  51. </div>
  52. </div>
  53. <div class="layui-form-item layui-hide">
  54. <input type="button" lay-submit lay-filter="edit-submit" id="edit-submit" value="确认">
  55. </div>
  56. </div>
  57. <script>
  58. layui.use(['form'], function(){
  59. var $ = layui.$
  60. ,form = layui.form;
  61. like.delUpload();
  62. $(document).on("click", ".add-upload-image", function () {
  63. like.imageUpload({
  64. limit: 1,
  65. field: "image",
  66. that: $(this)
  67. });
  68. });
  69. //删除图片
  70. $(document).on('click', '.pay-img-del-x', function () {
  71. $(this).parent().siblings('input').val('');
  72. $(this).parent().siblings().css('display','block');
  73. $(this).parent().remove();
  74. });
  75. })
  76. </script>