config.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!-- 搜索 -->
  2. <form onchange="changeForm($(this),14)">
  3. <input type="hidden" name="model_id" value="14" />
  4. <h2 class="attr-title">搜索</h2>
  5. <div class="layui-form-item">
  6. <label class="layui-form-label sm">背景颜色</label>
  7. <div class="layui-input-block">
  8. <div class="color-wrapper">
  9. <input data-js="color" type="text" name="back_color" value="{$config_info.back_color|default=''}" />
  10. </div>
  11. </div>
  12. </div>
  13. <div class="layui-form-item">
  14. <label class="layui-form-label sm">跳转页面</label>
  15. <div class="layui-input-block">
  16. <input type="text" name="link" value="{$config_info.link|default=''}" placeholder="请输入跳转页面" class="layui-input">
  17. </div>
  18. </div>
  19. <div class="layui-form-item">
  20. <label class="layui-form-label sm">显示logo</label>
  21. <div class="layui-input-block">
  22. <div class="onoff">
  23. <label for="if_show_logo_1" class="cb-enable{if !isset($config_info.if_show_logo) || $config_info.if_show_logo==1} selected{/if}">{$Think.lang.ds_yes}</label>
  24. <label for="if_show_logo_0" class="cb-disable{if isset($config_info.if_show_logo) && $config_info.if_show_logo==0} selected{/if}">{$Think.lang.ds_no}</label>
  25. <input id="if_show_logo_1"{if !isset($config_info.if_show_logo) || $config_info.if_show_logo==1} checked="checked"{/if} name="if_show_logo" value="1" type="radio">
  26. <input id="if_show_logo_0"{if isset($config_info.if_show_logo) && $config_info.if_show_logo==0} checked="checked"{/if} name="if_show_logo" value="0" type="radio">
  27. </div>
  28. </div>
  29. </div>
  30. <div class="layui-form-item">
  31. <label class="layui-form-label sm">显示更多</label>
  32. <div class="layui-input-block">
  33. <div class="onoff">
  34. <label for="if_show_more_1" class="cb-enable{if !isset($config_info.if_show_more) || $config_info.if_show_more==1} selected{/if}">{$Think.lang.ds_yes}</label>
  35. <label for="if_show_more_0" class="cb-disable{if isset($config_info.if_show_more) && $config_info.if_show_more==0} selected{/if}">{$Think.lang.ds_no}</label>
  36. <input id="if_show_more_1"{if !isset($config_info.if_show_more) || $config_info.if_show_more==1} checked="checked"{/if} name="if_show_more" value="1" type="radio">
  37. <input id="if_show_more_0"{if isset($config_info.if_show_more) && $config_info.if_show_more==0} checked="checked"{/if} name="if_show_more" value="0" type="radio">
  38. </div>
  39. </div>
  40. </div>
  41. </form>
  42. <script>
  43. if(typeof(loadConfig14)=='undefined'){
  44. function loadConfig14(obj){
  45. obj.find('[data-js="color"]').colorpicker({showOn: 'both'});
  46. obj.find('.onoff').each(function(){
  47. $(this).find(".cb-enable").click(function() {
  48. var parent = $(this).parents('.onoff');
  49. $('.cb-disable', parent).removeClass('selected');
  50. $(this).addClass('selected');
  51. $('.checkbox', parent).prop('checked', true);
  52. });
  53. $(this).find(".cb-disable").click(function() {
  54. var parent = $(this).parents('.onoff');
  55. $('.cb-enable', parent).removeClass('selected');
  56. $(this).addClass('selected');
  57. $('.checkbox', parent).prop('checked', false);
  58. });
  59. })
  60. }
  61. }
  62. </script>