截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

setting.html 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. {layout name="layout1" /}
  2. <div class="layui-fluid">
  3. <div class="layui-card">
  4. <div class="layui-card-body">
  5. <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
  6. <div class="layui-colla-item">
  7. <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
  8. <div class="layui-colla-content layui-show">
  9. <p>*分销推广相关的设置</p>
  10. <p>*分销会员开通方式:申请分销是指,成为分销员需要申请并审核通过;全员分销是指,会员注册账号即成为分销会员;</p>
  11. </div>
  12. </div>
  13. </div>
  14. <!-- 分销设置 -->
  15. <div class="layui-form" lay-filter="" style="margin-top:30px;">
  16. <div class="layui-form-item">
  17. <label class="layui-form-label" style="white-space: nowrap;width:120px ">自定义分销海报:</label>
  18. <div class="layui-input-block">
  19. <div class="like-upload-image">
  20. {if $config.image}
  21. <div class="upload-image-div">
  22. <img src="{$config.image}" alt="img">
  23. <input type="hidden" name="image" value="{$config.image}">
  24. <div class="del-upload-btn">x</div>
  25. </div>
  26. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image" id="image"> + 添加图片</a></div>
  27. {else}
  28. <div class="upload-image-elem"><a class="add-upload-image" id="image"> + 添加图片</a></div>
  29. {/if}
  30. </div>
  31. </div>
  32. </div>
  33. <div class="layui-form-item">
  34. <label class="layui-form-label" style="white-space: nowrap;width:120px "></label>
  35. <div class="layui-input-block layui-word-aux">
  36. 自定义分销推广海报图片,建议尺寸:800*800像素
  37. </div>
  38. </div>
  39. <div class="layui-form-item ">
  40. <label class="layui-form-label" style="white-space: nowrap;width:120px ">分销会员开通方式:</label>
  41. <div class="layui-input-block">
  42. <input type="radio" name="member_apply" value="1" title="申请分销" {if
  43. condition="$config.member_apply eq 1" }checked{/if}>
  44. <input type="radio" name="member_apply" value="2" title="全员分销" {if
  45. condition="$config.member_apply eq 2" }checked{/if}>
  46. </div>
  47. <div class="layui-form-mid layui-word-aux" style="white-space: nowrap">
  48. 不同的分销方式,会员获得分销资格的途径不同
  49. </div>
  50. </div>
  51. <div class="layui-form-item ">
  52. <label class="layui-form-label" style="white-space: nowrap;width:120px; ">分销功能:</label>
  53. <div class="layui-input-inline">
  54. <input type="radio" name="is_open" value="1" title="开启" {if
  55. condition="$config.is_open eq 1" }checked{/if}>
  56. <input type="radio" name="is_open" value="0" title="关闭" {if
  57. condition="$config.is_open eq 0" }checked{/if}>
  58. <div class=" layui-form-mid layui-word-aux" style="white-space: nowrap">
  59. 开启或关闭分销功能,关闭后不发放分销佣金,隐藏分销相关功能及界面。
  60. </div>
  61. </div>
  62. </div>
  63. <div class="layui-form-item">
  64. <div class="layui-input-block">
  65. <button class="layui-btn layui-btn-sm {$view_theme_color}" lay-submit
  66. lay-filter="confirm">确认
  67. </button>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <script>
  75. layui.config({
  76. version: "{$front_version}",
  77. base: '/static/lib/'
  78. }).use(['element', 'form'], function () {
  79. var $ = layui.$
  80. , form = layui.form
  81. , element = layui.element;
  82. // 图片上传
  83. like.delUpload();
  84. // 自定义分销海报
  85. $(document).on("click", "#image", function () {
  86. like.imageUpload({
  87. limit: 1,
  88. field: "image",
  89. that: $(this)
  90. });
  91. })
  92. form.on('submit(confirm)', function (data) {
  93. like.ajax({
  94. url: '{:url("distribution.setting/setting")}'
  95. , data: data.field
  96. , type: 'post'
  97. , success: function (res) {
  98. layer.msg(res.msg, {
  99. offset: '15px'
  100. , icon: 1
  101. , time: 1500
  102. }, function () {
  103. location.href = location.href;
  104. });
  105. },
  106. });
  107. });
  108. });
  109. </script>