config.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <!-- 商品分类和轮播图 -->
  2. <form>
  3. <input type="hidden" name="model_id" value="8" />
  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="range-wrapper">
  17. <input type="range" name="padding_top" value="{$config_info.padding_top|default='0'}" onchange="$(this).next().text($(this).val())">
  18. <span>{$config_info.padding_top|default='0'}</span>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="layui-form-item">
  23. <label class="layui-form-label sm">下边距</label>
  24. <div class="layui-input-block">
  25. <div class="range-wrapper">
  26. <input type="range" name="padding_bottom" value="{$config_info.padding_bottom|default='0'}" onchange="$(this).next().text($(this).val())">
  27. <span>{$config_info.padding_bottom|default='0'}</span>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="model-item">
  32. <div class="layui-form-item">
  33. <label class="layui-form-label sm">选择分类</label>
  34. <div class="layui-input-block">
  35. <div data-js="goods_class"><div data-select></div>
  36. <input type="hidden" name="goods_class" data-input value="{$config_info.goods_class|default='0'}" />
  37. <div data-type="template" data-name="gc_id" data-value="{if isset($config_info['gc_id'])}{:json_encode($config_info['gc_id'])}{/if}"></div>
  38. <table class="dssc-default-table mb15">
  39. <thead>
  40. <tr>
  41. <th class="tl">{$Think.lang.ds_goodsclass}</th>
  42. <th class="w90">{$Think.lang.ds_sort}</th>
  43. </tr>
  44. </thead>
  45. <tbody>
  46. </tbody>
  47. </table>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="layui-form-item">
  52. <label class="layui-form-label sm">分类图标</label>
  53. <div class="layui-input-block">
  54. <div class="uploader-wrapper">
  55. <div class="uploader-image-wrapper" {if !isset($config_info['gc'][0]['image']) || !$config_info['gc'][0]['image']}style="display:none" {/if}>
  56. <img class='uploader-image' src='{$config_info['gc'][0]['image']|default=""}' />
  57. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  58. </div>
  59. <div class='uploader-content' {if isset($config_info['gc'][0]['image']) && $config_info['gc'][0]['image']}style="display:none" {/if}>
  60. <div class="uploader-icon iconfont">&#xe6bf;</div>
  61. <div class="uploader-text">点击上传</div>
  62. <div class="uploader-notice">26×26</div>
  63. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  64. <input type='hidden' name='gc[i_0][image]' value='{$config_info['gc'][0]['image']|default=""}'>
  65. </div>
  66. </div>
  67. <div class="uploader-wrapper">
  68. <div class="uploader-image-wrapper" {if !isset($config_info['gc'][1]['image']) || !$config_info['gc'][1]['image']}style="display:none" {/if}>
  69. <img class='uploader-image' src='{$config_info['gc'][1]['image']|default=""}' />
  70. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  71. </div>
  72. <div class='uploader-content' {if isset($config_info['gc'][1]['image']) && $config_info['gc'][1]['image']}style="display:none" {/if}>
  73. <div class="uploader-icon iconfont">&#xe6bf;</div>
  74. <div class="uploader-text">点击上传</div>
  75. <div class="uploader-notice">26×26</div>
  76. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  77. <input type='hidden' name='gc[i_1][image]' value='{$config_info['gc'][1]['image']|default=""}'>
  78. </div>
  79. </div>
  80. <div class="uploader-wrapper">
  81. <div class="uploader-image-wrapper" {if !isset($config_info['gc'][2]['image']) || !$config_info['gc'][2]['image']}style="display:none" {/if}>
  82. <img class='uploader-image' src='{$config_info['gc'][2]['image']|default=""}' />
  83. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  84. </div>
  85. <div class='uploader-content' {if isset($config_info['gc'][2]['image']) && $config_info['gc'][2]['image']}style="display:none" {/if}>
  86. <div class="uploader-icon iconfont">&#xe6bf;</div>
  87. <div class="uploader-text">点击上传</div>
  88. <div class="uploader-notice">26×26</div>
  89. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  90. <input type='hidden' name='gc[i_2][image]' value='{$config_info['gc'][2]['image']|default=""}'>
  91. </div>
  92. </div>
  93. <div class="uploader-wrapper">
  94. <div class="uploader-image-wrapper" {if !isset($config_info['gc'][3]['image']) || !$config_info['gc'][3]['image']}style="display:none" {/if}>
  95. <img class='uploader-image' src='{$config_info['gc'][3]['image']|default=""}' />
  96. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  97. </div>
  98. <div class='uploader-content' {if isset($config_info['gc'][3]['image']) && $config_info['gc'][3]['image']}style="display:none" {/if}>
  99. <div class="uploader-icon iconfont">&#xe6bf;</div>
  100. <div class="uploader-text">点击上传</div>
  101. <div class="uploader-notice">26×26</div>
  102. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  103. <input type='hidden' name='gc[i_3][image]' value='{$config_info['gc'][3]['image']|default=""}'>
  104. </div>
  105. </div>
  106. <div class="uploader-wrapper">
  107. <div class="uploader-image-wrapper" {if !isset($config_info['gc'][4]['image']) || !$config_info['gc'][4]['image']}style="display:none" {/if}>
  108. <img class='uploader-image' src='{$config_info['gc'][4]['image']|default=""}' />
  109. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  110. </div>
  111. <div class='uploader-content' {if isset($config_info['gc'][4]['image']) && $config_info['gc'][4]['image']}style="display:none" {/if}>
  112. <div class="uploader-icon iconfont">&#xe6bf;</div>
  113. <div class="uploader-text">点击上传</div>
  114. <div class="uploader-notice">26×26</div>
  115. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  116. <input type='hidden' name='gc[i_4][image]' value='{$config_info['gc'][4]['image']|default=""}'>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. <div class="model-item">
  123. <div class="layui-form-item">
  124. <label class="layui-form-label sm">中间广告</label>
  125. <div class="layui-input-block">
  126. <div class="uploader-wrapper">
  127. <div class="uploader-image-wrapper" {if !isset($config_info['adv_center'][0]['image']) || !$config_info['adv_center'][0]['image']}style="display:none"{/if}>
  128. <img class='uploader-image' src='{$config_info['adv_center'][0]['image']|default=""}' />
  129. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  130. </div>
  131. <div class='uploader-content' {if isset($config_info['adv_center'][0]['image']) && $config_info['adv_center'][0]['image']}style="display:none"{/if}>
  132. <div class="uploader-icon iconfont">&#xe6bf;</div>
  133. <div class="uploader-text">点击上传</div>
  134. <div class="uploader-notice">800×400</div>
  135. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  136. <input type='hidden' name='adv_center[i_0][image]' value="{$config_info['adv_center'][0]['image']|default=""}">
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <div class="layui-form-item">
  142. <label class="layui-form-label sm">跳转页面</label>
  143. <div class="layui-input-block">
  144. <input type="text" name="adv_center[i_0][link]" value="" placeholder="请输入跳转页面" class="layui-input">
  145. </div>
  146. </div>
  147. </div>
  148. <div class="model-item">
  149. <div class="layui-form-item">
  150. <label class="layui-form-label sm">中间广告</label>
  151. <div class="layui-input-block">
  152. <div class="uploader-wrapper">
  153. <div class="uploader-image-wrapper" {if !isset($config_info['adv_center'][1]['image']) || !$config_info['adv_center'][1]['image']}style="display:none"{/if}>
  154. <img class='uploader-image' src='{$config_info['adv_center'][1]['image']|default=""}' />
  155. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  156. </div>
  157. <div class='uploader-content' {if isset($config_info['adv_center'][1]['image']) && $config_info['adv_center'][1]['image']}style="display:none"{/if}>
  158. <div class="uploader-icon iconfont">&#xe6bf;</div>
  159. <div class="uploader-text">点击上传</div>
  160. <div class="uploader-notice">800×400</div>
  161. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  162. <input type='hidden' name='adv_center[i_1][image]' value="{$config_info['adv_center'][1]['image']|default=""}">
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. <div class="layui-form-item">
  168. <label class="layui-form-label sm">跳转页面</label>
  169. <div class="layui-input-block">
  170. <input type="text" name="adv_center[i_1][link]" value="" placeholder="请输入跳转页面" class="layui-input">
  171. </div>
  172. </div>
  173. </div>
  174. <div class="model-item">
  175. <div class="layui-form-item">
  176. <label class="layui-form-label sm">中间广告</label>
  177. <div class="layui-input-block">
  178. <div class="uploader-wrapper">
  179. <div class="uploader-image-wrapper" {if !isset($config_info['adv_center'][2]['image']) || !$config_info['adv_center'][2]['image']}style="display:none"{/if}>
  180. <img class='uploader-image' src='{$config_info['adv_center'][2]['image']|default=""}' />
  181. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  182. </div>
  183. <div class='uploader-content' {if isset($config_info['adv_center'][2]['image']) && $config_info['adv_center'][2]['image']}style="display:none"{/if}>
  184. <div class="uploader-icon iconfont">&#xe6bf;</div>
  185. <div class="uploader-text">点击上传</div>
  186. <div class="uploader-notice">800×400</div>
  187. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  188. <input type='hidden' name='adv_center[i_2][image]' value="{$config_info['adv_center'][2]['image']|default=""}">
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. <div class="layui-form-item">
  194. <label class="layui-form-label sm">跳转页面</label>
  195. <div class="layui-input-block">
  196. <input type="text" name="adv_center[i_2][link]" value="" placeholder="请输入跳转页面" class="layui-input">
  197. </div>
  198. </div>
  199. </div>
  200. <div class="model-item">
  201. <div class="layui-form-item">
  202. <label class="layui-form-label sm">文章标题1</label>
  203. <div class="layui-input-block">
  204. <input type="text" name="article_title_1" value="{$config_info.article_title_1|default=''}" placeholder="请输入文章标题1" class="layui-input">
  205. </div>
  206. </div>
  207. <div class="layui-form-item">
  208. <label class="layui-form-label sm">文章标题2</label>
  209. <div class="layui-input-block">
  210. <input type="text" name="article_title_2" value="{$config_info.article_title_2|default=''}" placeholder="请输入文章标题2" class="layui-input">
  211. </div>
  212. </div>
  213. </div>
  214. <div class="model-item">
  215. <div class="layui-form-item">
  216. <label class="layui-form-label sm">文章标题</label>
  217. <div class="layui-input-block">
  218. <input type="text" name="article[i_0][title]" value="" placeholder="请输入文章标题" class="layui-input">
  219. </div>
  220. </div>
  221. <div class="layui-form-item">
  222. <label class="layui-form-label sm">跳转页面</label>
  223. <div class="layui-input-block">
  224. <input type="text" name="article[i_0][link]" value="" placeholder="请输入跳转页面" class="layui-input">
  225. </div>
  226. </div>
  227. </div>
  228. <div class="model-item">
  229. <div class="layui-form-item">
  230. <label class="layui-form-label sm">文章标题</label>
  231. <div class="layui-input-block">
  232. <input type="text" name="article[i_1][title]" value="" placeholder="请输入文章标题" class="layui-input">
  233. </div>
  234. </div>
  235. <div class="layui-form-item">
  236. <label class="layui-form-label sm">跳转页面</label>
  237. <div class="layui-input-block">
  238. <input type="text" name="article[i_1][link]" value="" placeholder="请输入跳转页面" class="layui-input">
  239. </div>
  240. </div>
  241. </div>
  242. <div class="model-item">
  243. <div class="layui-form-item">
  244. <label class="layui-form-label sm">文章标题</label>
  245. <div class="layui-input-block">
  246. <input type="text" name="article[i_2][title]" value="" placeholder="请输入文章标题" class="layui-input">
  247. </div>
  248. </div>
  249. <div class="layui-form-item">
  250. <label class="layui-form-label sm">跳转页面</label>
  251. <div class="layui-input-block">
  252. <input type="text" name="article[i_2][link]" value="" placeholder="请输入跳转页面" class="layui-input">
  253. </div>
  254. </div>
  255. </div>
  256. <div class="model-item">
  257. <div class="layui-form-item">
  258. <label class="layui-form-label sm">右侧广告</label>
  259. <div class="layui-input-block">
  260. <div class="uploader-wrapper">
  261. <div class="uploader-image-wrapper" {if !isset($config_info['adv_right'][0]['image']) || !$config_info['adv_right'][0]['image']}style="display:none"{/if}>
  262. <img class='uploader-image' src='{$config_info['adv_right'][0]['image']|default=""}' />
  263. <div class="iconfont uploader-image-btn" onclick="delFile($(this))">&#xe696;</div>
  264. </div>
  265. <div class='uploader-content' {if isset($config_info['adv_right'][0]['image']) && $config_info['adv_right'][0]['image']}style="display:none"{/if}>
  266. <div class="uploader-icon iconfont">&#xe6bf;</div>
  267. <div class="uploader-text">点击上传</div>
  268. <div class="uploader-notice">188×245</div>
  269. <input type='file' class='uploader-file' onchange='uploadFile($(this))'>
  270. <input type='hidden' name='adv_right[i_0][image]' value="{$config_info['adv_right'][0]['image']|default=""}">
  271. </div>
  272. </div>
  273. </div>
  274. </div>
  275. <div class="layui-form-item">
  276. <label class="layui-form-label sm">跳转页面</label>
  277. <div class="layui-input-block">
  278. <input type="text" name="adv_right[i_0][link]" value="" placeholder="请输入跳转页面" class="layui-input">
  279. </div>
  280. </div>
  281. </div>
  282. </form>
  283. <script>
  284. if(typeof(loadConfig8)=='undefined'){
  285. function loadConfig8(obj){
  286. obj.find('[data-js="color"]').colorpicker({showOn: 'both'});
  287. var id=obj.attr('data-id')
  288. obj.find('[data-js="goods_class"]').attr('id','goods_class_'+id)
  289. var gc_id=parseInt(obj.find('*[data-input]').val())
  290. if(gc_id){
  291. getGoodsClass(gc_id,'goods_class_'+id)
  292. }else{
  293. loadGoodsClass(1,0,'goods_class_'+id)
  294. }
  295. }
  296. }
  297. </script>