截流自动化的商城平台
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

index.html 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-form-label {
  4. width: 120px;
  5. }
  6. .layui-input-block {
  7. margin-left: 150px;
  8. }
  9. </style>
  10. <div class="wrapper">
  11. <div class="layui-card">
  12. <div class="layui-card-body">
  13. <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
  14. <div class="layui-colla-item">
  15. <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
  16. <div class="layui-colla-content layui-show">
  17. <p>*平台客服规则设置。商家客服要商家自行设置</p>
  18. </div>
  19. </div>
  20. </div>
  21. <!-- 表单区域-->
  22. <div class="layui-form" style="margin-top: 15px;">
  23. <fieldset class="layui-elem-field">
  24. <legend>基础设置</legend>
  25. <div class="layui-field-box">
  26. <div class="layui-form-item">
  27. <lable class="layui-form-label">客服方式:</lable>
  28. <div class="layui-input-block" style="width:300px;">
  29. <input type="radio" name="type" value="1" title="人工客服" {if $config.type == 1} checked {/if}>
  30. <input type="radio" name="type" value="2" title="在线客服" {if $config.type == 2} checked {/if}>
  31. </div>
  32. </div>
  33. <div class="layui-form-item">
  34. <lable class="layui-form-label">服务时间:</lable>
  35. <div class="layui-input-block" style="width:300px;">
  36. <input type="text" name="business_time" value="{$config.business_time}" class="layui-input" />
  37. </div>
  38. </div>
  39. </div>
  40. </fieldset>
  41. <fieldset class="layui-elem-field">
  42. <legend>人工客服</legend>
  43. <div class="layui-form-item">
  44. <lable class="layui-form-label">客服电话:</lable>
  45. <div class="layui-input-block" style="width:300px;">
  46. <input type="text" name="phone" value="{$config.phone}" class="layui-input" />
  47. </div>
  48. </div>
  49. <div class="layui-form-item">
  50. <lable class="layui-form-label">客服微信号:</lable>
  51. <div class="layui-input-block" style="width:300px;">
  52. <input type="text" name="wechat" value="{$config.wechat}" class="layui-input" />
  53. </div>
  54. </div>
  55. <div class="layui-form-item">
  56. <lable class="layui-form-label">客服图片:</lable>
  57. <div class="layui-input-block">
  58. <div class="like-upload-image">
  59. {if $config.image}
  60. <div class="upload-image-div">
  61. <img src="{$config.image}" alt="img">
  62. <input type="hidden" name="image" value="{$config.image}">
  63. <div class="del-upload-btn">x</div>
  64. </div>
  65. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image" id="image"> + 添加图片</a></div>
  66. {else}
  67. <div class="upload-image-elem"><a class="add-upload-image" id="image"> + 添加图片</a></div>
  68. {/if}
  69. </div>
  70. </div>
  71. </div>
  72. <div class="layui-form-item">
  73. <lable class="layui-form-label"></lable>
  74. <div class="layui-input-block">
  75. <span class="layui-word-aux">支持gif</span>
  76. </div>
  77. </div>
  78. </fieldset>
  79. <div class="layui-form-item">
  80. <lable class="layui-form-label"></lable>
  81. <div class="layui-input-block">
  82. <button class="layui-btn layui-btn-normal" lay-submit lay-filter="set">确定</button>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <script>
  90. layui.config({
  91. version:"{$front_version}",
  92. base: '/static/lib/' //静态资源所在路径
  93. }).use(['form','element'], function(){
  94. var $ = layui.$,form = layui.form,element = layui.element;
  95. // 图片上传
  96. like.delUpload();
  97. $(document).on("click", "#image", function () {
  98. like.imageUpload({
  99. limit: 1,
  100. field: "image",
  101. that: $(this),
  102. content: '/shop/file/lists?type=10',
  103. });
  104. })
  105. form.on('submit(set)', function(data) {
  106. like.ajax({
  107. url:'{:url("setting.customer_service/set")}',
  108. data: data.field,
  109. type:"post",
  110. success:function(res)
  111. {
  112. if(res.code == 1)
  113. {
  114. layui.layer.msg(res.msg, {
  115. offset: '15px'
  116. , icon: 1
  117. , time: 1000
  118. });
  119. }
  120. }
  121. });
  122. });
  123. });
  124. </script>