截流自动化的商城平台
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

edit.html 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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" style="position:relative;">
  47. <span style="position:absolute;left:5px;top:8px;">¥</span>
  48. <input type="number" name="price" id="price" lay-verType="tips" lay-verify="required" autocomplete="off"
  49. class="layui-input" value="{$detail.price}" style="padding-left:20px;">
  50. </div>
  51. </div>
  52. <div class="layui-form-item">
  53. <label for="op_count" class="layui-form-label"><span style="color:red;">*</span>作用:</label>
  54. <div class="layui-input-block">
  55. <input type="number" name="op_count" id="op_count" lay-verType="tips" lay-verify="required"
  56. autocomplete="off" class="layui-input" value="{$detail.op_count}">
  57. <div class="layui-form-mid layui-word-aux">类型选择"包月",这里填赠送月份<br/>类型选择"按量付费",这里填赠送次数</div>
  58. </div>
  59. </div>
  60. <div class="layui-form-item">
  61. <label for="sort" class="layui-form-label">排序:</label>
  62. <div class="layui-input-block">
  63. <input type="number" name="sort" id="sort" value="{$detail.sort}" autocomplete="off"
  64. class="layui-input">
  65. <div class="layui-form-mid layui-word-aux">排序值必须为整数;数值越大,越靠前</div>
  66. </div>
  67. </div>
  68. <div class="layui-form-item">
  69. <label class="layui-form-label">状态</label>
  70. <div class="layui-input-block">
  71. <input type="radio" name="status" value="0" title="禁用" {eq name="detail.status" value="0"}checked{/eq}>
  72. <input type="radio" name="status" value="1" title="启用" {eq name="detail.status" value="1"}checked{/eq}>
  73. </div>
  74. </div>
  75. <div class="layui-form-item layui-hide">
  76. <input type="button" lay-submit lay-filter="addSubmit" id="addSubmit" value="确认">
  77. </div>
  78. </div>
  79. </div>
  80. <script>
  81. layui.use([], function () {
  82. like.delUpload();
  83. $(document).on("click", ".add-upload-image", function () {
  84. like.imageUpload({
  85. limit: 1,
  86. field: "image",
  87. that: $(this)
  88. });
  89. })
  90. })
  91. </script>