截流自动化的商城平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

edit.html 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. {layout name="layout2" /}
  2. <div class="layui-card layui-form" style="box-shadow:none;">
  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">
  7. <input type="text" name="name" id="name" value="{$detail.name}" lay-verType="tips" lay-verify="required"
  8. autocomplete="off" class="layui-input">
  9. </div>
  10. </div>
  11. <div class="layui-form-item">
  12. <label class="layui-form-label"><span style="color:red;">*</span>套餐图片:</label>
  13. <div class="layui-input-block">
  14. <div class="like-upload-image">
  15. {if $detail.image}
  16. <div class="upload-image-div">
  17. <img src="{$detail.image}" alt="img">
  18. <input type="hidden" name="image" value="{$detail.image}">
  19. <div class="del-upload-btn">x</div>
  20. </div>
  21. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image"> + 添加图片</a></div>
  22. {else}
  23. <div class="upload-image-elem"><a class="add-upload-image"> + 添加图片</a></div>
  24. {/if}
  25. </div>
  26. </div>
  27. </div>
  28. <div class="layui-form-item">
  29. <label for="name" class="layui-form-label">描述:</label>
  30. <div class="layui-input-block">
  31. <input type="text" name="desc" id="desc" autocomplete="off" class="layui-input" value="{$detail.desc}">
  32. </div>
  33. </div>
  34. <div class="layui-form-item">
  35. <label class="layui-form-label">类型</label>
  36. <div class="layui-input-block">
  37. <select name="type_id" lay-verify="required">
  38. <option value=""></option>
  39. <option value="0" {eq name="detail.type_id" value="0"}selected{/eq}>包月</option>
  40. <option value="1" {eq name="detail.type_id" value="1"}selected{/eq}>按量付费</option>
  41. </select>
  42. </div>
  43. </div>
  44. <div class="layui-form-item">
  45. <label for="price" class="layui-form-label"><span style="color:red;">*</span>价格:</label>
  46. <div class="layui-input-block">
  47. <input type="number" name="price" id="price" lay-verType="tips" lay-verify="required" autocomplete="off"
  48. class="layui-input" value="{$detail.price}">
  49. </div>
  50. </div>
  51. <div class="layui-form-item">
  52. <label for="op_count" class="layui-form-label"><span style="color:red;">*</span>月份数/操作数:</label>
  53. <div class="layui-input-block">
  54. <input type="number" name="op_count" id="op_count" lay-verType="tips" lay-verify="required"
  55. autocomplete="off" class="layui-input" value="{$detail.op_count}">
  56. </div>
  57. </div>
  58. <div class="layui-form-item">
  59. <label for="sort" class="layui-form-label">排序:</label>
  60. <div class="layui-input-block">
  61. <input type="number" name="sort" id="sort" value="{$detail.sort}" autocomplete="off"
  62. class="layui-input">
  63. <div class="layui-form-mid layui-word-aux">排序值必须为整数;数值越大,越靠前</div>
  64. </div>
  65. </div>
  66. <div class="layui-form-item">
  67. <label class="layui-form-label">状态</label>
  68. <div class="layui-input-block">
  69. <input type="radio" name="status" value="0" title="禁用" {eq name="detail.status" value="0"}checked{/eq}>
  70. <input type="radio" name="status" value="1" title="启用" {eq name="detail.status" value="1"}checked{/eq}>
  71. </div>
  72. </div>
  73. <div class="layui-form-item layui-hide">
  74. <input type="button" lay-submit lay-filter="addSubmit" id="addSubmit" value="确认">
  75. </div>
  76. </div>
  77. </div>
  78. <script>
  79. layui.use([], function () {
  80. like.delUpload();
  81. $(document).on("click", ".add-upload-image", function () {
  82. like.imageUpload({
  83. limit: 1,
  84. field: "image",
  85. that: $(this)
  86. });
  87. })
  88. })
  89. </script>