截流自动化的商城平台
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. {layout name="layout2" /}
  2. <div class="layui-card layui-form" style="padding-bottom: 10%">
  3. <div class="layui-card-body">
  4. <div class="layui-form-item">
  5. <label for="name" class="layui-form-label"><span style="color:red;">*</span>话题名称:</label>
  6. <div class="layui-input-block" style="width: 50%">
  7. <input type="text" name="name" id="name" value="{$detail.name}" lay-verify="required" autocomplete="off" class="layui-input">
  8. </div>
  9. </div>
  10. <div class="layui-form-item">
  11. <label class="layui-form-label"><span style="color:red;">*</span>话题图标:</label>
  12. <div class="layui-input-block">
  13. <div class="like-upload-image">
  14. {if $detail.image}
  15. <div class="upload-image-div">
  16. <img src="{$detail.image}" alt="img">
  17. <input type="hidden" name="image" value="{$detail.image}">
  18. <div class="del-upload-btn">x</div>
  19. </div>
  20. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image"> + 添加图片</a></div>
  21. {else}
  22. <div class="upload-image-elem"><a class="add-upload-image"> + 添加图片</a></div>
  23. {/if}
  24. </div>
  25. <div class="layui-form-mid layui-word-aux">建议尺寸:宽200像素*高200像素的jpg,jpeg,png图片</div>
  26. </div>
  27. </div>
  28. <div class="layui-form-item">
  29. <label for="cid" class="layui-form-label">关联分类:</label>
  30. <div class="layui-input-inline">
  31. <select name="cid" id="cid" lay-verType="tips" lay-verify="required">
  32. <option value="">全部</option>
  33. {volist name="cate" id="vo"}
  34. <option value="{$vo.id}" {if $detail.cid==$vo.id}selected{/if}>{$vo.name}</option>
  35. {/volist}
  36. </select>
  37. </div>
  38. </div>
  39. <div class="layui-form-item">
  40. <label class="layui-form-label">推荐:</label>
  41. <div class="layui-input-block">
  42. <input type="radio" name="is_recommend" value="1" title="显示" {if $detail.is_recommend}checked{/if}>
  43. <input type="radio" name="is_recommend" value="0" title="隐藏" {if !$detail.is_recommend}checked{/if}>
  44. </div>
  45. </div>
  46. <div class="layui-form-item">
  47. <label class="layui-form-label">状态:</label>
  48. <div class="layui-input-block">
  49. <input type="radio" name="is_show" value="1" title="是" {if $detail.is_show}checked{/if}>
  50. <input type="radio" name="is_show" value="0" title="否" {if !$detail.is_show}checked{/if}>
  51. </div>
  52. </div>
  53. <div class="layui-form-item">
  54. <label for="sort" class="layui-form-label">排序:</label>
  55. <div class="layui-input-block" style="width: 50%">
  56. <input type="number" name="sort" id="sort" value="{$detail.sort}" lay-verType="tips" lay-verify="number" min="0"
  57. autocomplete="off" class="layui-input">
  58. <div class=" layui-form-mid layui-word-aux">排序值必须为整数;数值越小,越靠前</div>
  59. </div>
  60. </div>
  61. <div class="layui-form-item layui-hide">
  62. <input type="button" lay-submit lay-filter="addSubmit" id="addSubmit" value="确认">
  63. </div>
  64. </div>
  65. </div>
  66. <script>
  67. layui.config({
  68. version: "{$front_version}",
  69. base: '/static/lib/'
  70. }).use(['form'], function () {
  71. var form = layui.form;
  72. like.delUpload();
  73. $(document).on("click", ".add-upload-image", function () {
  74. like.imageUpload({
  75. limit: 1,
  76. field: "image",
  77. that: $(this)
  78. });
  79. });
  80. });
  81. </script>