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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. *设置店铺的配送方式
  10. </div>
  11. </div>
  12. </div>
  13. </div>
  14. <div class="layui-form-item div-flex" style="margin-top: 20px">
  15. <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
  16. <legend>配送方式</legend>
  17. </fieldset>
  18. </div>
  19. <div class="layui-card-body" pad15>
  20. <div class="layui-form" lay-filter="">
  21. <div class="layui-form-item">
  22. <label class="layui-form-label">快递发货</label>
  23. <div class="layui-input-block">
  24. <input type="checkbox" name="type" lay-skin="switch" lay-text="开启|关闭" {if condition="$type eq 1"}checked{/if}>
  25. </div>
  26. <div class="layui-form-mid">开启快递发货后,买家下单可以选择快递送货上门。</div>
  27. </div>
  28. <div class="layui-form-item">
  29. <div class="layui-input-block">
  30. <button class="layui-btn {$view_theme_color}" lay-submit lay-filter="set">确认</button>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <script>
  38. layui.config({
  39. version:"{$front_version}",
  40. base: '/static/lib/'
  41. }).extend({
  42. likeedit: 'likeedit/likeedit'
  43. }).use(['table', 'form', 'element', 'likeedit'], function() {
  44. var form = layui.form
  45. ,$ = layui.$
  46. ,table = layui.table
  47. , element = layui.element
  48. , likeedit = layui.likeedit;
  49. form.on('submit(set)', function (data) {
  50. like.ajax({
  51. url: '{:url("freight/set")}'
  52. , data: data.field
  53. , type: 'post'
  54. , success: function (res) {
  55. if (res.code == 1) {
  56. layui.layer.msg(res.msg, {
  57. offset: '15px'
  58. , icon: 1
  59. , time: 1000
  60. },function () {
  61. location.reload();
  62. });
  63. }
  64. }
  65. });
  66. });
  67. });
  68. </script>