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

edit.html 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. {layout name="layout2" /}
  2. <link href="__PUBLIC__/static/lib/layui/layeditor/layedit.css" rel="stylesheet"/>
  3. <script src="__PUBLIC__/static/lib/layui/layeditor/index.js"></script>
  4. <script src="__PUBLIC__/static/lib/layui/layeditor/ace/ace.js"></script>
  5. <style>
  6. .layui-form-item .layui-input-inline { width: 340px; }
  7. .w60{
  8. display: inline !important;
  9. width: 80px !important;
  10. }
  11. .w30{
  12. display: inline !important;
  13. width: 50px !important;
  14. }
  15. .w100{
  16. display: inline !important;
  17. width: 300px !important;
  18. margin-right: 10px;
  19. }
  20. .tips{
  21. color: #999!important;
  22. }
  23. .ks{
  24. display: block;
  25. margin-top: 5px;
  26. wdith: 100%;
  27. }
  28. .ks_del{
  29. color: #01AAED;
  30. margin-left: 10px;
  31. cursor: pointer;
  32. }
  33. .ks:nth-child(2){
  34. display: none;
  35. }
  36. .ks_del2{
  37. color: #01AAED;
  38. margin-left: 10px;
  39. cursor: pointer;
  40. }
  41. .ds{
  42. display: block;
  43. margin-top: 5px;
  44. wdith: 100%;
  45. }
  46. .wb80{
  47. width: 80%;
  48. margin-left: 20px;
  49. }
  50. .ks .grid-demo-bg1{
  51. height: 38px;
  52. line-height: 38px;
  53. text-align: right;
  54. }
  55. </style>
  56. <div class="layui-card layui-form" style="box-shadow:none;">
  57. <div class="layui-card-body">
  58. <div class="layui-tab layui-tab-card" lay-filter="like-tabs">
  59. <ul class="layui-tab-title">
  60. <li data-type='1' class="layui-this">基础信息</li>
  61. <li data-type='2'>启动设置</li>
  62. <li data-type='3'>列表设置</li>
  63. <li data-type='4'>浏览笔记</li>
  64. <li data-type='5'>浏览视频</li>
  65. <li data-type='6'>互动设置</li>
  66. <li data-type='7'>获客设置</li>
  67. <li data-type='8'>获客规则</li>
  68. <li data-type='9'>其他设置</li>
  69. </ul>
  70. <div class="layui-tab-content">
  71. <!--基础信息-->
  72. <div class="layui-tab-item layui-show">
  73. {include file="content/closure/edit/01"/}
  74. </div>
  75. <!--启动设置-->
  76. <div class="layui-tab-item">
  77. {include file="content/closure/edit/02"/}
  78. </div>
  79. <!--列表设置-->
  80. <div class="layui-tab-item">
  81. {include file="content/closure/edit/03"/}
  82. </div>
  83. <!--浏览笔记-->
  84. <div class="layui-tab-item">
  85. {include file="content/closure/edit/04"/}
  86. </div>
  87. <!--浏览视频-->
  88. <div class="layui-tab-item">
  89. {include file="content/closure/edit/05"/}
  90. </div>
  91. <!--互动设置-->
  92. <div class="layui-tab-item">
  93. {include file="content/closure/edit/06"/}
  94. </div>
  95. <!--获客设置-->
  96. <div class="layui-tab-item">
  97. {include file="content/closure/edit/07"/}
  98. </div>
  99. <!--获客规则-->
  100. <div class="layui-tab-item">
  101. {include file="content/closure/edit/08"/}
  102. </div>
  103. <!--其他设置-->
  104. <div class="layui-tab-item">
  105. {include file="content/closure/edit/09"/}
  106. </div>
  107. </div>
  108. </div>
  109. <div class="layui-form-item layui-hide">
  110. <input type="button" lay-submit lay-filter="addSubmit" id="addSubmit" value="确认">
  111. </div>
  112. </div>
  113. </div>
  114. <script>
  115. layui.config({
  116. base: "/static/lib/"
  117. }).extend({
  118. likeedit: "likeedit/likeedit"
  119. }).use(["layEditor", "form"], function(){
  120. var form = layui.form;
  121. var layEditor = layui.layEditor;
  122. layEditor.set({
  123. uploadImage: {
  124. url: '{:url("file/lists")}?type=10'
  125. },
  126. })
  127. var ieditor = layEditor.build('content')
  128. form.verify({
  129. content: function(value) {
  130. return layEditor.sync(ieditor);
  131. }
  132. });
  133. like.delUpload();
  134. $(document).on("click", ".add-upload-image", function () {
  135. like.imageUpload({
  136. limit: 1,
  137. field: "image",
  138. that: $(this)
  139. });
  140. });
  141. //增加新的数据规则
  142. $(document).on("click","#add_b2",function (){
  143. var html = '<span class="ks">';
  144. html += $(".b2 .ks:eq(1)").html();
  145. html += '</span>';
  146. $(".b2 .ks:last").before(html);
  147. });
  148. //删除指定 数据规则
  149. $(document).on("click",".ks_del",function (){
  150. var that = $(this);
  151. layer.confirm("确定删除", function (index) {
  152. that.parent().remove();
  153. layer.close(index);
  154. })
  155. });
  156. $(document).on("click",".ks_del2",function (){
  157. var that = $(this);
  158. layer.confirm("确定删除", function (index) {
  159. that.parent().parent().parent().remove();
  160. layer.close(index);
  161. })
  162. });
  163. //增加新的数据规则
  164. $(document).on("click","#add_c1",function (){
  165. var html = '<span class="ks">';
  166. html += $(".c1 .ks:eq(1)").html();
  167. html += '</span>';
  168. $(".c1 .ks:last").before(html);
  169. });
  170. //增加新的数据规则
  171. $(document).on("click","#add_d1",function (){
  172. var html = '<span class="ks">';
  173. html += $(".d1 .ks:eq(1)").html();
  174. html += '</span>';
  175. $(".d1 .ks:last").before(html);
  176. });
  177. //增加新的数据规则
  178. $(document).on("click","#add_f21",function (){
  179. var html = '<span class="ks">';
  180. html += $(".f21 .ks:eq(1)").html();
  181. html += '</span>';
  182. $(".f21 .ks:last").before(html);
  183. });
  184. //增加新的数据规则
  185. $(document).on("click","#add_f25",function (){
  186. var html = '<span class="ks">';
  187. html += $(".f25 .ks:eq(1)").html();
  188. html += '</span>';
  189. $(".f25 .ks:last").before(html);
  190. });
  191. form.on('select(a1)', function(data){
  192. //console.log(data.elem); //得到select原始DOM对象
  193. //console.log(data.value); //得到被选中的值
  194. //console.log(data.othis); //得到美化后的DOM对象
  195. if(data.value == '推荐'){
  196. $("#a5").show();
  197. $("#a6").hide();
  198. }else if(data.value == '搜索'){
  199. $("#a5").hide();
  200. $("#a6").show();
  201. }else{
  202. }
  203. });
  204. // 绑定单选改变事件
  205. form.on('radio(a4)', function(data){
  206. //console.log(data.elem.name); // 得到单选框的name属性
  207. //console.log(data.value); // 得到被选中的值
  208. /*if(data.value == 0){
  209. //隐藏
  210. $('#qhsj').hide();
  211. }else{
  212. $('#qhsj').show();
  213. }*/
  214. });
  215. })
  216. </script>