config.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!-- 魔方 -->
  2. <form onchange="changeForm($(this),15)">
  3. <input type="hidden" name="model_id" value="15" />
  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. <div class="ds-icon-radio">
  17. <input type="hidden" name="show_format" value="{$config_info.show_format|default='1'}" />
  18. <ul class="ds-icon">
  19. <li{if !isset($config_info['show_format']) || $config_info['show_format']==1} class="ds-icon-active"{/if} data-val="1" onclick="setRadio($(this),showBlock($(this),0))">
  20. <img src="{$Think.HOME_SITE_ROOT}/images/editable_page/rubik_cube_row1_of2.png">
  21. <div class="text">1行2列</div>
  22. </li>
  23. <li{if isset($config_info['show_format']) && $config_info['show_format']==2} class="ds-icon-active"{/if} data-val="2" onclick="setRadio($(this),showBlock($(this),1))">
  24. <img src="{$Think.HOME_SITE_ROOT}/images/editable_page/rubik_cube_row1_lt_of2_rt.png">
  25. <div class="text">1左2右</div>
  26. </li>
  27. <li{if isset($config_info['show_format']) && $config_info['show_format']==3} class="ds-icon-active"{/if} data-val="3" onclick="setRadio($(this),showBlock($(this),1))">
  28. <img src="{$Think.HOME_SITE_ROOT}/images/editable_page/rubik_cube_row1_tp_of2_bm.png">
  29. <div class="text">1上2下</div>
  30. </li>
  31. </ul>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="model-item">
  36. <div class="layui-form-item">
  37. <label class="layui-form-label sm">广告图片</label>
  38. <div class="layui-input-block">
  39. <div class="uploader-wrapper">
  40. <div class="uploader-image-wrapper" {if !isset($config_info['adv'][0]['image']) || !$config_info['adv'][0]['image']}style="display:none" {/if}>
  41. <img class='uploader-image' src='{$config_info['adv'][0]['image']|default=""}' />
  42. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  43. </div>
  44. <div class='uploader-content' {if isset($config_info['adv'][0]['image']) && $config_info['adv'][0]['image']}style="display:none" {/if}>
  45. <div class="uploader-icon iconfont">&#xe6bf;</div>
  46. <div class="uploader-text">点击上传</div>
  47. <div class="uploader-notice"></div>
  48. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  49. <input type='hidden' name='adv[i_0][image]' value='{$config_info['adv'][0]['image']|default=""}'>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="layui-form-item">
  55. <label class="layui-form-label sm">跳转页面</label>
  56. <div class="layui-input-block">
  57. <input type="text" name='adv[i_0][link]' value='{$config_info['adv'][0]['link']|default=""}' placeholder="请输入跳转页面" class="layui-input">
  58. </div>
  59. </div>
  60. </div>
  61. <div class="model-item">
  62. <div class="layui-form-item">
  63. <label class="layui-form-label sm">广告图片</label>
  64. <div class="layui-input-block">
  65. <div class="uploader-wrapper">
  66. <div class="uploader-image-wrapper" {if !isset($config_info['adv'][1]['image']) || !$config_info['adv'][1]['image']}style="display:none" {/if}>
  67. <img class='uploader-image' src='{$config_info['adv'][1]['image']|default=""}' />
  68. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  69. </div>
  70. <div class='uploader-content' {if isset($config_info['adv'][1]['image']) && $config_info['adv'][1]['image']}style="display:none" {/if}>
  71. <div class="uploader-icon iconfont">&#xe6bf;</div>
  72. <div class="uploader-text">点击上传</div>
  73. <div class="uploader-notice"></div>
  74. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  75. <input type='hidden' name='adv[i_1][image]' value='{$config_info['adv'][1]['image']|default=""}'>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="layui-form-item">
  81. <label class="layui-form-label sm">跳转页面</label>
  82. <div class="layui-input-block">
  83. <input type="text" name='adv[i_1][link]' value='{$config_info['adv'][1]['link']|default=""}' placeholder="请输入跳转页面" class="layui-input">
  84. </div>
  85. </div>
  86. </div>
  87. <div class="model-item" data-show="0"{if !isset($config_info['show_format']) || $config_info['show_format']==1} style="display:none"{/if}>
  88. <div class="layui-form-item">
  89. <label class="layui-form-label sm">广告图片</label>
  90. <div class="layui-input-block">
  91. <div class="uploader-wrapper">
  92. <div class="uploader-image-wrapper" {if !isset($config_info['adv'][2]['image']) || !$config_info['adv'][2]['image']}style="display:none" {/if}>
  93. <img class='uploader-image' src='{$config_info['adv'][2]['image']|default=""}' />
  94. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  95. </div>
  96. <div class='uploader-content' {if isset($config_info['adv'][2]['image']) && $config_info['adv'][2]['image']}style="display:none" {/if}>
  97. <div class="uploader-icon iconfont">&#xe6bf;</div>
  98. <div class="uploader-text">点击上传</div>
  99. <div class="uploader-notice"></div>
  100. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  101. <input type='hidden' name='adv[i_2][image]' value='{$config_info['adv'][2]['image']|default=""}'>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. <div class="layui-form-item">
  107. <label class="layui-form-label sm">跳转页面</label>
  108. <div class="layui-input-block">
  109. <input type="text" name='adv[i_2][link]' value='{$config_info['adv'][2]['link']|default=""}' placeholder="请输入跳转页面" class="layui-input">
  110. </div>
  111. </div>
  112. </div>
  113. </form>
  114. <script>
  115. if(typeof(loadConfig15)=='undefined'){
  116. function loadConfig15(obj){
  117. obj.find('[data-js="color"]').colorpicker({showOn: 'both'});
  118. }
  119. }
  120. if(typeof(showBlock)=='undefined'){
  121. function showBlock(obj,flag){
  122. if(flag){
  123. $(obj).parents('form').find('[data-show=0]').show()
  124. }else{
  125. $(obj).parents('form').find('[data-show=0]').hide()
  126. }
  127. }
  128. }
  129. </script>