截流自动化的商城平台
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.

index.html 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-panel {
  4. margin: 5px;
  5. }
  6. .layui-form-label {
  7. width: 120px;
  8. text-align: left;
  9. padding-left:30px;
  10. }
  11. </style>
  12. <div class="wrapper">
  13. <!-- 面板 -->
  14. <div class="layui-panel">
  15. <!-- 表单 -->
  16. <form class="layui-form">
  17. <!-- 字段集区块 -->
  18. <fieldset class="layui-elem-field layui-field-title">
  19. <legend>分销设置</legend>
  20. <div class="layui-field-box">
  21. <div class="layui-form-item">
  22. <label class="layui-form-label">分销功能</label>
  23. <div class="layui-input-block">
  24. <input type="radio" name="is_open" value="0" title="关闭" {if $config.is_open == 0}checked{/if}>
  25. <input type="radio" name="is_open" value="1" title="开启" {if $config.is_open == 1}checked{/if}>
  26. </div>
  27. </div>
  28. <div class="layui-form-item">
  29. <label class="layui-form-label"></label>
  30. <div class="layui-input-block layui-word-aux">
  31. 关闭分销功能后不会再产生新的分销佣金,商城端分销入口会关闭。
  32. </div>
  33. </div>
  34. <div class="layui-form-item">
  35. <label class="layui-form-label">分销层级</label>
  36. <div class="layui-input-block">
  37. <input type="radio" name="level" value="1" title="一级分销" {if $config.level == 1}checked{/if}>
  38. <input type="radio" name="level" value="2" title="二级分销" {if $config.level == 2}checked{/if}>
  39. </div>
  40. </div>
  41. <div class="layui-form-item">
  42. <label class="layui-form-label"></label>
  43. <div class="layui-input-block layui-word-aux">
  44. 允许发放佣金的分销层级
  45. </div>
  46. </div>
  47. <div class="layui-form-item">
  48. <label class="layui-form-label">商品详情显示佣金</label>
  49. <div class="layui-input-block">
  50. <input type="radio" name="is_show_earnings" value="0" title="隐藏" {if $config.is_show_earnings == 0}checked{/if}>
  51. <input type="radio" name="is_show_earnings" value="1" title="显示" {if $config.is_show_earnings == 1}checked{/if}>
  52. </div>
  53. <div class="layui-input-block layui-word-aux">是否在商品详情显示佣金奖励提示</div>
  54. </div>
  55. <div class="layui-form-item">
  56. <label class="layui-form-label">详情页佣金可见用户</label>
  57. <div class="layui-input-block">
  58. <input type="radio" name="show_earnings_scope" value="0" title="全部用户" {if $config.show_earnings_scope == 0}checked{/if}>
  59. <input type="radio" name="show_earnings_scope" value="1" title="分销商" {if $config.show_earnings_scope == 1}checked{/if}>
  60. </div>
  61. <div class="layui-input-block layui-word-aux">选择全部用户,则所有人在商品详情都可以看到佣金奖励提示</div>
  62. </div>
  63. </div>
  64. </fieldset>
  65. <!-- 字段集区块 -->
  66. <fieldset class="layui-elem-field layui-field-title">
  67. <legend>分销资格</legend>
  68. <div class="layui-field-box">
  69. <div class="layui-form-item">
  70. <label class="layui-form-label">开通分销会员条件</label>
  71. <div class="layui-input-block">
  72. <input type="radio" name="apply_condition" value="1" title="无条件" {if $config.apply_condition == 1}checked{/if}>
  73. <input type="radio" name="apply_condition" value="2" title="申请分销" {if $config.apply_condition == 2}checked{/if}>
  74. <input type="radio" name="apply_condition" value="3" title="指定分销" {if $config.apply_condition == 3}checked{/if}>
  75. </div>
  76. </div>
  77. <div class="layui-form-item">
  78. <label class="layui-form-label"></label>
  79. <div class="layui-input-block layui-word-aux">
  80. 开通分销会员条件切换至无条件时,所有用户都将开通分销会员资格。
  81. </div>
  82. </div>
  83. <div class="layui-form-item">
  84. <label class="layui-form-label"></label>
  85. <div class="layui-input-block">
  86. <button class="layui-btn layui-bg-blue layui-btn layui-btn-sm" lay-submit lay-filter="*">保存设置</button>
  87. </div>
  88. </div>
  89. </div>
  90. </fieldset>
  91. </form>
  92. </div>
  93. </div>
  94. <script>
  95. layui.config({
  96. version: "{$front_version}",
  97. base: '/static/lib/'
  98. }).use(['element', 'form'], function () {
  99. var $ = layui.$
  100. , form = layui.form
  101. , layer = layui.layer;
  102. form.on('submit(*)', function (data) {
  103. like.ajax({
  104. url: '{:url("distribution.distribution_setting/set")}'
  105. , data: data.field
  106. , type: 'post'
  107. , success: function (res) {
  108. layer.msg(res.msg);
  109. },
  110. });
  111. return false; //阻止表单跳转
  112. });
  113. });
  114. </script>