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

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