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

set.html 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-table-cell { height: auto; }
  4. input::-webkit-outer-spin-button,
  5. input::-webkit-inner-spin-button
  6. {
  7. -webkit-appearance: none;
  8. }
  9. input[type="number"]
  10. {
  11. -moz - appearance
  12. :
  13. textfield;
  14. }
  15. </style>
  16. <div class="wrapper">
  17. <div class="layui-card">
  18. <!-- 操作提示 -->
  19. <div class="layui-card-body">
  20. <div class="layui-collapse like-layui-collapse" style="border:1px dashed #c4c4c4">
  21. <div class="layui-colla-item">
  22. <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
  23. <div class="layui-colla-content layui-show">
  24. <p>*砍价活动的通用设置。</p>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. <!-- 设置 -->
  30. <div class="layui-card-body layui-form">
  31. <div class="layui-form-item" style="margin-bottom: 0;">
  32. <label class="layui-form-label" style="width:200px;">砍价成功下单有效时长:</label>
  33. <div class="layui-input-inline">
  34. <input type="number" name="payment_limit_time" value="{$payment_limit_time}" onkeyup="value=value.replace(/[^\d]/g,'')" autocomplete="off" class="layui-input">
  35. </div>
  36. <div class="layui-form-mid layui-word-aux">分钟</div>
  37. </div>
  38. <div class="layui-form-item">
  39. <label class="layui-form-label"></label>
  40. <div class="layui-input-block">
  41. <div class="layui-form-mid layui-word-aux">砍价成功后,在设置的有效时长内可以提交订单,为空或不填表示无时间限制</div>
  42. </div>
  43. </div>
  44. <div class="layui-form-item">
  45. <label class="layui-form-label"></label>
  46. <div class="layui-input-block">
  47. <button class="layui-btn layui-btn-sm layuiadmin-btn {$view_theme_color}" lay-submit lay-filter="addSubmit">确定</button>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. <script>
  54. layui.config({
  55. base: '/static/plug/layui-admin/dist/layuiadmin/'
  56. }).extend({
  57. index: 'lib/index' //主入口模块
  58. }).use(['index', 'like'], function(){
  59. var $ = layui.$
  60. ,form = layui.form
  61. ,like = layui.like;
  62. form.on('submit(addSubmit)', function(data){
  63. like.ajax({
  64. url:'{:url("bargain.Bargain/set")}',
  65. data: data.field,
  66. type:"post",
  67. success:function(res) {
  68. if(res.code === 1) {
  69. layui.layer.msg(res.msg, { offset:'15px', icon:1, time:1000 });
  70. } else {
  71. layui.layer.msg(res.msg, { offset:'15px', icon:2, time:1000 });
  72. }
  73. }
  74. });
  75. return false;
  76. });
  77. //事件
  78. var active = {
  79. // 切换状态
  80. set: function (obj) {
  81. like.ajax({
  82. url:'{:url("TeamSet/set")}',
  83. data:{},
  84. type:"post",
  85. success:function(res) {
  86. if(res.code === 1) {
  87. layui.layer.msg(res.msg, { offset:'15px', icon:1, time:1000 });
  88. } else {
  89. layui.layer.msg(res.msg, { offset:'15px', icon:2, time:1000 });
  90. }
  91. }
  92. });
  93. }
  94. };
  95. // 绑定点击按钮事件
  96. $('.layui-btn.layuiadmin-btn').on('click', function(){
  97. var type = $(this).data('type');
  98. active[type] ? active[type].call(this) : '';
  99. });
  100. });
  101. </script>