config.html 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_W['attachurl_remote']}',
  31. 'module' : {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie' : {'pre': ''},
  33. 'account' : {:json_encode($_W['account'])},
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <script type="text/javascript" src="./resource/components/colpick/colpick.js"></script>
  43. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  44. <link href="/static/css/snailfish.css" rel="stylesheet">
  45. <link href="./resource/components/colpick/colpick.css" rel="stylesheet">
  46. </head>
  47. <body layadmin-themealias="default">
  48. <div class="layui-fluid">
  49. <div class="layui-card">
  50. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">商品设置</span></div>
  51. <div class="layui-card-body" style="padding:15px;">
  52. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  53. <div class="layui-form-item">
  54. <label class="layui-form-label">商品库存预警</label>
  55. <div class="layui-input-block">
  56. <input type="text" name="parameter[goods_stock_notice]" class="form-control" value="{$data['goods_stock_notice']}" />
  57. </div>
  58. </div>
  59. <div class="layui-form-item">
  60. <label class="layui-form-label">购买记录</label>
  61. <div class="layui-input-block">
  62. <label class='radio-inline'>
  63. <input type='radio' name='parameter[is_show_buy_record]' value='0' <?php if( !empty($data) && $data['is_show_buy_record'] ==0 ){ ?>checked <?php } ?> title="隐藏" />
  64. </label>
  65. <label class='radio-inline'>
  66. <input type='radio' name='parameter[is_show_buy_record]' value='1' <?php if( empty($data) || $data['is_show_buy_record'] ==1 ){ ?>checked <?php } ?> title="显示" />
  67. </label>
  68. </div>
  69. </div>
  70. <div class="layui-form-item">
  71. <label class="layui-form-label">商品评价</label>
  72. <div class="layui-input-block">
  73. <label class='radio-inline'>
  74. <input type='radio' name='parameter[is_show_comment_list]' value='0' <?php if( !empty($data) && $data['is_show_comment_list'] ==0 ){ ?>checked <?php } ?> title="隐藏" />
  75. </label>
  76. <label class='radio-inline'>
  77. <input type='radio' name='parameter[is_show_comment_list]' value='1' <?php if( empty($data) || $data['is_show_comment_list'] ==1 ){ ?>checked <?php } ?> title="显示" />
  78. </label>
  79. </div>
  80. </div>
  81. <div class="layui-form-item">
  82. <label class="layui-form-label">首页商品倒计时</label>
  83. <div class="layui-input-block">
  84. <label class='radio-inline'>
  85. <input type='radio' name='parameter[is_show_list_timer]' value='0' <?php if( empty($data) || $data['is_show_list_timer'] ==0 ){ ?>checked <?php } ?> title="隐藏" />
  86. </label>
  87. <label class='radio-inline'>
  88. <input type='radio' name='parameter[is_show_list_timer]' value='1' <?php if( !empty($data) && $data['is_show_list_timer'] ==1 ){ ?>checked <?php } ?> title="显示" />
  89. </label>
  90. </div>
  91. </div>
  92. <div class="layui-form-item">
  93. <label class="layui-form-label">首页商品排序方式</label>
  94. <div class="layui-input-block">
  95. <label class='radio-inline'>
  96. <input type='radio' name='parameter[index_sort_method]' value='0' <?php if( empty($data) || $data['index_sort_method'] ==0 ){ ?>checked <?php } ?> title="使用置顶排序" />
  97. </label>
  98. <label class='radio-inline'>
  99. <input type='radio' name='parameter[index_sort_method]' value='1' <?php if( !empty($data) && $data['index_sort_method'] ==1 ){ ?>checked <?php } ?> title="使用数字大小排序(从大到小)" />
  100. </label>
  101. </div>
  102. </div>
  103. <div class="layui-form-item">
  104. <label class="layui-form-label">首页商品销量</label>
  105. <div class="layui-input-block">
  106. <label class='radio-inline'>
  107. <input type='radio' name='parameter[is_show_list_count]' value='0' <?php if( !empty($data) && $data['is_show_list_count'] ==0 ){ ?>checked <?php } ?> title="隐藏" />
  108. </label>
  109. <label class='radio-inline'>
  110. <input type='radio' name='parameter[is_show_list_count]' value='1' <?php if( empty($data) || $data['is_show_list_count'] ==1 ){ ?>checked <?php } ?> title="显示" />
  111. </label>
  112. </div>
  113. </div>
  114. <div class="layui-form-item">
  115. <label class="layui-form-label">详情页商品销量</label>
  116. <div class="layui-input-block">
  117. <label class='radio-inline'>
  118. <input type='radio' name='parameter[is_hide_details_count]' value='1' <?php if( !empty($data) && $data['is_hide_details_count']==1 ){ ?>checked <?php } ?> title="隐藏" />
  119. </label>
  120. <label class='radio-inline'>
  121. <input type='radio' name='parameter[is_hide_details_count]' value='0' <?php if( empty($data) || $data['is_hide_details_count']==0 ){ ?>checked <?php } ?> title="显示" />
  122. </label>
  123. </div>
  124. </div>
  125. <div class="layui-form-item">
  126. <label class="layui-form-label">新人专享</label>
  127. <div class="layui-input-block">
  128. <label class='radio-inline'>
  129. <input type='radio' name='parameter[is_show_new_buy]' value='0' <?php if(!empty($data) && $data['is_show_new_buy'] ==0){ ?>checked <?php } ?> title="隐藏" />
  130. </label>
  131. <label class='radio-inline'>
  132. <input type='radio' name='parameter[is_show_new_buy]' value='1' <?php if(empty($data) || $data['is_show_new_buy'] ==1){ ?>checked <?php } ?> title="显示" />
  133. </label>
  134. </div>
  135. </div>
  136. <div class="layui-form-item">
  137. <label class="layui-form-label">新人专享限制</label>
  138. <div class="layui-input-block">
  139. <div class="input-group" style="width: 300px;">
  140. <div class="input-group-addon" style="padding-top: 0px;">
  141. <input type="checkbox" lay-skin="primary" name="parameter[is_new_buy_limit]" class="form-control" <?php if( !empty($data) && $data['is_new_buy_limit'] == 1 ){ ?>checked<?php } ?> value="1"/>
  142. </div>
  143. <div class="input-group-addon">限制新人购买“新人专享”商品</div>
  144. <input class="form-control" name="parameter[new_buy_limit_num]" type="text" style="width: 50px;height: 40px;" value="<?php echo !empty($data['new_buy_limit_num']) ? $data['new_buy_limit_num'] : 1;?>">
  145. <div class="input-group-addon">种</div>
  146. </div>
  147. <span class="layui-form-mid layui-word-aux">勾选以后,新用户购买“新人专享”商品种类根据设置种类数购买,无设置商品种类则默认限制1种</span>
  148. </div>
  149. </div>
  150. <div class="layui-form-item">
  151. <label class="layui-form-label">限时秒杀</label>
  152. <div class="layui-input-block">
  153. <label class='radio-inline'>
  154. <input type='radio' name='parameter[is_show_spike_buy]' value='0' <?php if(!empty($data) && $data['is_show_spike_buy'] ==0){ ?>checked <?php } ?> title="隐藏" />
  155. </label>
  156. <label class='radio-inline'>
  157. <input type='radio' name='parameter[is_show_spike_buy]' value='1' <?php if(empty($data) || $data['is_show_spike_buy'] ==1){ ?>checked <?php } ?> title="显示" />
  158. </label>
  159. </div>
  160. </div>
  161. <div class="layui-form-item">
  162. <label class="layui-form-label">限时秒杀倒计时</label>
  163. <div class="layui-input-block">
  164. <label class='radio-inline'>
  165. <input type='radio' name='parameter[is_show_spike_buy_time]' value='0' <?php if(!empty($data) && $data['is_show_spike_buy_time']==0){ ?>checked <?php } ?> title="隐藏" />
  166. </label>
  167. <label class='radio-inline'>
  168. <input type='radio' name='parameter[is_show_spike_buy_time]' value='1' <?php if(empty($data) || $data['is_show_spike_buy_time']==1){ ?>checked <?php } ?> title="显示" />
  169. </label>
  170. </div>
  171. </div>
  172. <div class="layui-form-item">
  173. <label class="layui-form-label">大家常买<br/>(购物车)</label>
  174. <div class="layui-input-block">
  175. <label class='radio-inline'>
  176. <input type='radio' name='parameter[is_show_guess_like]' value='0' <?php if(!empty($data) && $data['is_show_guess_like'] ==0){ ?>checked <?php } ?> title="隐藏" />
  177. </label>
  178. <label class='radio-inline'>
  179. <input type='radio' name='parameter[is_show_guess_like]' value='1' <?php if(empty($data) || $data['is_show_guess_like'] ==1){ ?>checked <?php } ?> title="显示" />
  180. </label>
  181. </div>
  182. </div>
  183. <div class="layui-form-item">
  184. <label class="layui-form-label">猜你喜欢<br/>(商品详情页)</label>
  185. <div class="layui-input-block">
  186. <label class='radio-inline'>
  187. <input type='radio' name='parameter[show_goods_guess_like]' value='0' <?php if( !empty($data) && $data['show_goods_guess_like'] ==0 ){ ?>checked <?php } ?> title="隐藏" />
  188. </label>
  189. <label class='radio-inline'>
  190. <input type='radio' name='parameter[show_goods_guess_like]' value='1' <?php if( empty($data) || $data['show_goods_guess_like'] ==1 ){ ?>checked <?php } ?> title="显示" />
  191. </label>
  192. </div>
  193. </div>
  194. <div class="layui-form-item">
  195. <label class="layui-form-label">猜你喜欢展示数量</label>
  196. <div class="layui-input-block fixmore-input-group">
  197. <div class="input-group">
  198. <input type="text" name="parameter[num_guess_like]" class="form-control valid" value="{$data['num_guess_like']}" />
  199. </div>
  200. <div class="help-block">默认:8个</div>
  201. </div>
  202. </div>
  203. <div class="layui-form-item">
  204. <label class="layui-form-label">自提时间</label>
  205. <div class="layui-input-block">
  206. <label class='radio-inline'>
  207. <input type='radio' name='parameter[is_show_ziti_time]' value='0' <?php if(!empty($data) && $data['is_show_ziti_time'] ==0){ ?>checked <?php } ?> title="隐藏" />
  208. </label>
  209. <label class='radio-inline'>
  210. <input type='radio' name='parameter[is_show_ziti_time]' value='1' <?php if(empty($data) || $data['is_show_ziti_time'] ==1){ ?>checked <?php } ?> title="显示" />
  211. </label>
  212. </div>
  213. </div>
  214. <div class="layui-form-item">
  215. <label class="layui-form-label">支持商品仅快递</label>
  216. <div class="layui-input-block">
  217. <label class='radio-inline'>
  218. <input type='radio' name='parameter[is_open_only_express]' value='0' <?php if(empty($data) || $data['is_open_only_express'] ==0 ){ ?>checked <?php } ?> title="否" />
  219. </label>
  220. <label class='radio-inline'>
  221. <input type='radio' name='parameter[is_open_only_express]' value='1' <?php if(!empty($data) && $data['is_open_only_express'] ==1){ ?>checked <?php } ?> title="是" />
  222. </label>
  223. </div>
  224. </div>
  225. <div class="layui-form-item">
  226. <label class="layui-form-label">开启推荐商品</label>
  227. <div class="layui-input-block">
  228. <label class='radio-inline'>
  229. <input type='radio' name='parameter[is_open_goods_relative_goods]' value='0' <?php if(empty($data) || $data['is_open_goods_relative_goods'] ==0){ ?>checked <?php } ?> title="否" />
  230. </label>
  231. <label class='radio-inline'>
  232. <input type='radio' name='parameter[is_open_goods_relative_goods]' value='1' <?php if(!empty($data) && $data['is_open_goods_relative_goods'] ==1){ ?>checked <?php } ?> title="是" />
  233. </label>
  234. </div>
  235. </div>
  236. <div class="layui-form-item">
  237. <label class="layui-form-label">关闭商品详情页倒计时</label>
  238. <div class="layui-input-block">
  239. <label class='radio-inline'>
  240. <input type='radio' name='parameter[is_close_details_time]' value='0' <?php if( empty($data) || $data['is_close_details_time'] ==0 ){ ?>checked <?php } ?> title="否" />
  241. </label>
  242. <label class='radio-inline'>
  243. <input type='radio' name='parameter[is_close_details_time]' value='1' <?php if( !empty($data) && $data['is_close_details_time'] ==1 ){ ?>checked <?php } ?> title="是" />
  244. </label>
  245. </div>
  246. </div>
  247. <div class="layui-form-item">
  248. <label class="layui-form-label">加入购物车背景色</label>
  249. <div class="layui-input-block">
  250. <div style="margin:0px;">
  251. <div class="layui-input-inline" style="width: 120px;">
  252. <input type="text" name="parameter[goodsdetails_addcart_bg_color]" value="{$data['goodsdetails_addcart_bg_color']}" placeholder="请选择颜色" class="layui-input" id="test-colorpicker-form-input">
  253. </div>
  254. <div class="layui-inline" style="left: -11px;">
  255. <div id="minicolors">
  256. <div class="layui-unselect layui-colorpicker"><span><span class="layui-colorpicker-trigger-span" lay-type="" style="background: {$data['goodsdetails_addcart_bg_color']}"><i class="layui-icon layui-colorpicker-trigger-i layui-icon-down"></i></span></span></div>
  257. </div>
  258. </div>
  259. </div>
  260. <span class='layui-form-mid'>背景颜色值,有效值为十六进制颜色,默认:#f9c706</span>
  261. </div>
  262. </div>
  263. <div class="layui-form-item">
  264. <label class="layui-form-label">立即购买背景色</label>
  265. <div class="layui-input-block">
  266. <div style="margin:0px;">
  267. <div class="layui-input-inline" style="width: 120px;">
  268. <input type="text" name="parameter[goodsdetails_buy_bg_color]" value="{$data['goodsdetails_buy_bg_color']}" placeholder="请选择颜色" class="layui-input" id="test-colorpicker-form-input1">
  269. </div>
  270. <div class="layui-inline" style="left: -11px;">
  271. <div id="minicolors1">
  272. <div class="layui-unselect layui-colorpicker"><span><span class="layui-colorpicker-trigger-span" lay-type="" style="background: {$data['goodsdetails_buy_bg_color']}"><i class="layui-icon layui-colorpicker-trigger-i layui-icon-down"></i></span></span></div>
  273. </div>
  274. </div>
  275. </div>
  276. <span class='layui-form-mid'>背景颜色值,有效值为十六进制颜色,默认:#ff5041</span>
  277. </div>
  278. </div>
  279. <div class="layui-form-item" >
  280. <label class="layui-form-label">海报头像圆角填充颜色</label>
  281. <div class="layui-input-block">
  282. <div class="" style="margin:0px;">
  283. <div class="layui-input-inline" style="width: 120px;">
  284. <input type="text" name="parameter[goods_avatar_rgb]" value="{$data['goods_avatar_rgb']}" placeholder="请选择颜色" class="layui-input" id="goods_avatar_rgb_colorpicker">
  285. </div>
  286. <div class="layui-inline" style="left: -11px;">
  287. <div id="goods_avatar_rgb">
  288. <div class="layui-unselect layui-colorpicker"><span><span class="layui-colorpicker-trigger-span" lay-type="" style="background: {$data['goods_avatar_rgb']}"><i class="layui-icon layui-colorpicker-trigger-i layui-icon-down"></i></span></span></div>
  289. </div>
  290. </div>
  291. </div>
  292. <span class='layui-form-mid'>商品详情页海报头像颜色自定义,不设置则默认黄色<b style="color:red"></b></span>
  293. </div>
  294. </div>
  295. <div class="layui-form-item">
  296. <label class="layui-form-label">服务说明</label>
  297. <div class="layui-input-block">
  298. <div class="">
  299. {:tpl_ueditor('parameter[instructions]',$data['instructions'],array('height'=>'300'))}
  300. </div>
  301. </div>
  302. </div>
  303. <div class="layui-form-item">
  304. <label class="layui-form-label">显示团长信息</label>
  305. <div class="layui-input-block">
  306. <label class='radio-inline'>
  307. <input type='radio' name='parameter[is_show_goodsdetails_communityinfo]' value='0' <?php if( empty($data) || $data['is_show_goodsdetails_communityinfo'] ==0 ){ ?>checked <?php } ?> title="否" />
  308. </label>
  309. <label class='radio-inline'>
  310. <input type='radio' name='parameter[is_show_goodsdetails_communityinfo]' value='1' <?php if( !empty($data) && $data['is_show_goodsdetails_communityinfo'] ==1 ){ ?>checked <?php } ?> title="是" />
  311. </label>
  312. </div>
  313. </div>
  314. <div class="layui-form-item">
  315. <label class="layui-form-label">显示预计佣金信息</label>
  316. <div class="layui-input-block">
  317. <label class='radio-inline'>
  318. <input type='radio' name='parameter[is_show_goodsdetails_commiss_money]' value='0' <?php if( empty($data) || $data['is_show_goodsdetails_commiss_money'] ==0 ){ ?>checked <?php } ?> title="否" />
  319. </label>
  320. <label class='radio-inline'>
  321. <input type='radio' name='parameter[is_show_goodsdetails_commiss_money]' value='1' <?php if( !empty($data) && $data['is_show_goodsdetails_commiss_money'] ==1 ){ ?>checked <?php } ?> title="是" />
  322. </label>
  323. </div>
  324. <span class='layui-form-mid' style="margin-left: 50px;">普通会员不显示,团长或分销身份时显示,既是团长又是分销,仅显示团长佣金</span>
  325. </div>
  326. <div class="layui-form-item">
  327. <label class="layui-form-label">预售、提货时间显示</label>
  328. <div class="layui-input-block">
  329. <label class='radio-inline'>
  330. <input type="radio" name="parameter[ishow_index_pickup_time]" value="0" title="隐藏" <?php if( empty($data) || $data['ishow_index_pickup_time'] ==0 ){ ?>checked <?php } ?> />
  331. </label>
  332. <label class='radio-inline'>
  333. <input type="radio" name="parameter[ishow_index_pickup_time]" value="1" title="显示" <?php if( !empty($data) && $data['ishow_index_pickup_time'] ==1 ){ ?>checked <?php } ?> />
  334. </label>
  335. <br>
  336. <span class='layui-form-mid' style="margin-left: 20px;">首页商品列表预售、提货时间显示,默认隐藏。</span>
  337. </div>
  338. </div>
  339. <div class="layui-form-item">
  340. <label class="layui-form-label">非付费会员购买会员专享商品弹出图片:</label>
  341. <div class="layui-input-block">
  342. <label class='radio-inline'>
  343. <input type="radio" name="parameter[is_pop_vipmember_buytip]" value="0" title="关闭" <?php if( empty($data) || $data['is_pop_vipmember_buytip'] ==0 ){ ?>checked <?php } ?> />
  344. </label>
  345. <label class='radio-inline'>
  346. <input type="radio" name="parameter[is_pop_vipmember_buytip]" value="1" title="开启" <?php if( !empty($data) && $data['is_pop_vipmember_buytip'] ==1 ){ ?>checked <?php } ?> />
  347. </label>
  348. <br>
  349. <span class='layui-form-mid' style="margin-left: 20px;">开启后,需要上传弹出图片</span>
  350. </div>
  351. </div>
  352. <div class="layui-form-item">
  353. <label class="layui-form-label">非付费会员弹出图片</label>
  354. <div class="layui-input-block">
  355. {:tpl_form_field_image2('parameter[pop_vipmember_buyimage]', $data['pop_vipmember_buyimage'])}
  356. <span class='layui-form-mid'>需要开启付费会员卡功能</span>
  357. </div>
  358. </div>
  359. <div class="layui-form-item">
  360. <label class="layui-form-label">开启全屏视频播放</label>
  361. <div class="layui-input-block">
  362. <label class='radio-inline'>
  363. <input type='radio' name='parameter[is_open_goods_full_video]' value='0' <?php if(empty($data) || $data['is_open_goods_full_video'] ==0){ ?>checked <?php } ?> title="否" />
  364. </label>
  365. <label class='radio-inline'>
  366. <input type='radio' name='parameter[is_open_goods_full_video]' value='1' <?php if(!empty($data) && $data['is_open_goods_full_video'] ==1){ ?>checked <?php } ?> title="是" />
  367. </label>
  368. <br />
  369. <span class='layui-form-mid'>开启后,若有此商品带有视频,则进入商品详情页面先全屏展示视频,播放结束后自动关闭。默认关闭。</span>
  370. </div>
  371. </div>
  372. <div class="layui-form-item">
  373. <label class="layui-form-label">商品海报背景</label>
  374. <div class="layui-input-block">
  375. {:tpl_form_field_image2('parameter[haibao_gooods_bg2]', $data['haibao_gooods_bg2'], "/static/images/bg2.jpg")}
  376. <span class='layui-form-mid'>请注意:请勿开图片压缩功能,否则生成海报变形。请务必传jpg背景图(750*1364),<a href="/static/images/bg2.jpg" target="_blank" class="line-text">点击查看</a>默认背景图。</span>
  377. </div>
  378. </div>
  379. <div class="layui-form-item">
  380. <label class="layui-form-label">商品详情头部</label>
  381. <div class="layui-input-block">
  382. {:tpl_form_field_image2('parameter[goods_details_title_bg]', $data['goods_details_title_bg'], "/static/placeholder/goodsDetailTitle.png")}
  383. <span class='layui-form-mid'>商品详情页详情内容头部标题图片。坚持尺寸:336*60。</span>
  384. </div>
  385. </div>
  386. <div class="layui-form-item">
  387. <label class="layui-form-label">商品详情</label>
  388. <div class="layui-input-block">
  389. <label class='radio-inline'>
  390. <input type='radio' name='parameter[ishide_details_desc]' value='1' <?php if( !empty($data) && $data['ishide_details_desc'] ==1 ){ ?>checked <?php } ?> title="隐藏" />
  391. </label>
  392. <label class='radio-inline'>
  393. <input type='radio' name='parameter[ishide_details_desc]' value='0' <?php if( empty($data) || $data['ishide_details_desc'] ==0 ){ ?>checked <?php } ?> title="显示" />
  394. </label>
  395. <br>
  396. <span class='layui-form-mid'>默认显示,隐藏则包括“商品详情头部”一起隐藏。</span>
  397. </div>
  398. </div>
  399. <div class="layui-form-item">
  400. <label class="layui-form-label">销量单位</label>
  401. <div class="layui-input-block fixmore-input-group">
  402. <div class="input-group">
  403. <label class='radio-inline'>
  404. <input lay-filter="isnull_unit" type='radio' name='parameter[isnull_goods_sale_unit]' value='1' <?php if(!empty($data) && $data['isnull_goods_sale_unit']==1){ ?>checked <?php } ?> title="空" />
  405. </label>
  406. <label class='radio-inline'>
  407. <input lay-filter="isnull_unit" type='radio' name='parameter[isnull_goods_sale_unit]' value='0' <?php if(empty($data) || $data['isnull_goods_sale_unit']==0){ ?>checked <?php } ?> title="自定义" />
  408. </label>
  409. <div class="radio-inline" style="padding-left: 0;margin-left: 0">
  410. <input id="goodsSaleUnit" type="text" name="parameter[goods_sale_unit]" class="form-control valid" value="{$data['goods_sale_unit']}" style="<?php if(empty($data) || $data['isnull_goods_sale_unit'] ==0){ ?>display:inline;<?php }else{ ?>display: none;<?php } ?>width:120px;" />
  411. </div>
  412. </div>
  413. <div class="help-block">前端默认展示已售**件,仅剩**件。默认单位:件</div>
  414. </div>
  415. </div>
  416. <div class="layui-form-item">
  417. <label class="layui-form-label">商品简介<br/>(商品详情页)</label>
  418. <div class="layui-input-block">
  419. <label class='radio-inline'>
  420. <input type='radio' name='parameter[show_goods_subtitle]' value='0' <?php if( empty($data) || $data['show_goods_subtitle'] ==0 ){ ?>checked <?php } ?> title="隐藏" />
  421. </label>
  422. <label class='radio-inline'>
  423. <input type='radio' name='parameter[show_goods_subtitle]' value='1' <?php if( !empty($data) && $data['show_goods_subtitle'] ==1 ){ ?>checked <?php } ?> title="显示" />
  424. </label>
  425. </div>
  426. </div>
  427. <div class="layui-form-item">
  428. <label class="layui-form-label">图片单击放大<br/>(商品详情页)</label>
  429. <div class="layui-input-block">
  430. <label class='radio-inline'>
  431. <input type='radio' name='parameter[show_goods_preview]' value='0' <?php if( empty($data) || $data['show_goods_preview'] ==0 ){ ?>checked <?php } ?> title="开启" />
  432. </label>
  433. <label class='radio-inline'>
  434. <input type='radio' name='parameter[show_goods_preview]' value='1' <?php if( !empty($data) && $data['show_goods_preview'] ==1 ){ ?>checked <?php } ?> title="关闭" />
  435. </label>
  436. <br>
  437. <div class="help-block">商品详情页顶部幻灯片。默认开启。</div>
  438. </div>
  439. </div>
  440. <blockquote class="layui-elem-quote">商品详情域名替换</blockquote>
  441. <div class="layui-form-item">
  442. <label class="layui-form-label">旧的域名</label>
  443. <div class="layui-input-block">
  444. <input type="text" name="present_realm_name" class="form-control" /> <!--readonly="readonly"-->
  445. 域名格式为 http://域名 , 如 https://www.baidu.com </br>
  446. </div>
  447. </div>
  448. <div class="layui-form-item">
  449. <label class="layui-form-label">新的域名</label>
  450. <div class="layui-input-block">
  451. <input type="text" name="new_realm_name" class="form-control" />
  452. 填写‘旧的域名’与‘新的域名’后开始替换域名,不填写无效
  453. </div>
  454. </div>
  455. <blockquote class="layui-elem-quote">分享群信息</blockquote>
  456. <div class="layui-form-item">
  457. <label class="layui-form-label">团长群分享</label>
  458. <div class="layui-input-block">
  459. <label class='radio-inline'>
  460. <input type='radio' name='parameter[isopen_community_group_share]' value='1' <?php if(!empty($data) && $data['isopen_community_group_share'] ==1){ ?>checked <?php } ?> title="开启" />
  461. </label>
  462. <label class='radio-inline'>
  463. <input type='radio' name='parameter[isopen_community_group_share]' value='0' <?php if(empty($data) || $data['isopen_community_group_share'] ==0){ ?>checked <?php } ?> title="关闭" />
  464. </label>
  465. </div>
  466. </div>
  467. <div class="layui-form-item">
  468. <label class="layui-form-label">头像</label>
  469. <div class="layui-input-block">
  470. {:tpl_form_field_image2('parameter[group_share_avatar]', $data['group_share_avatar'])}
  471. <span class='layui-form-mid'>正方型图片</span>
  472. </div>
  473. </div>
  474. <div class="layui-form-item">
  475. <label class="layui-form-label">标题</label>
  476. <div class="layui-input-block">
  477. <input type="text" name="parameter[group_share_title]" class="form-control" value="{$data['group_share_title']}" />
  478. </div>
  479. </div>
  480. <div class="layui-form-item">
  481. <label class="layui-form-label">描述</label>
  482. <div class="layui-input-block">
  483. <input type="text" name="parameter[group_share_desc]" class="form-control" value="{$data['group_share_desc']}" />
  484. </div>
  485. </div>
  486. <blockquote class="layui-elem-quote">商品视频列表</blockquote>
  487. <div class="layui-form-item">
  488. <label class="layui-form-label">顶部导航标题</label>
  489. <div class="layui-input-block">
  490. <input type="text" name="parameter[videolist_nav_title]" class="form-control" value="{$data['videolist_nav_title']}" />
  491. </div>
  492. </div>
  493. <div class="layui-form-item">
  494. <label class="layui-form-label">分享标题</label>
  495. <div class="layui-input-block">
  496. <input type="text" name="parameter[videolist_share_title]" class="form-control" value="{$data['videolist_share_title']}" />
  497. </div>
  498. </div>
  499. <div class="layui-form-item">
  500. <label class="layui-form-label">分享图</label>
  501. <div class="layui-input-block">
  502. {:tpl_form_field_image2('parameter[videolist_share_poster]', $data['videolist_share_poster'])}
  503. <span class='layui-form-mid'>支持PNG及JPG,显示图片长宽比是 5:4。</span>
  504. </div>
  505. </div>
  506. <div class="layui-form-item">
  507. <label class="layui-form-label"> </label>
  508. <div class="layui-input-block">
  509. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  510. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  511. </div>
  512. </div>
  513. </form>
  514. </div>
  515. </div>
  516. </div>
  517. <script src="/layuiadmin/layui/layui.js"></script>
  518. <script>
  519. layui.config({
  520. base: '/layuiadmin/' //静态资源所在路径
  521. }).extend({
  522. index: 'lib/index' //主入口模块
  523. }).use('index');
  524. var goodsdetails_addcart_bg_color = '{$data["goodsdetails_addcart_bg_color"]}';
  525. $('#minicolors').colpick({
  526. submit:true,
  527. color: goodsdetails_addcart_bg_color,
  528. onSubmit: function(color,color2){
  529. $('#test-colorpicker-form-input').val('#'+color2);
  530. $('#minicolors').find('.layui-colorpicker-trigger-span').css('background','#'+color2);
  531. $('.colpick_full').hide();
  532. }
  533. });
  534. var goods_avatar_rgb = '{$data["goods_avatar_rgb"]}';
  535. $('#goods_avatar_rgb').colpick({
  536. submit:true,
  537. color: goods_avatar_rgb,
  538. onSubmit: function(color,color2){
  539. $('#goods_avatar_rgb_colorpicker').val('#'+color2);
  540. $('#goods_avatar_rgb').find('.layui-colorpicker-trigger-span').css('background','#'+color2);
  541. $('.colpick_full').hide();
  542. }
  543. });
  544. var goodsdetails_buy_bg_color = '{$data["goodsdetails_buy_bg_color"]}';
  545. $('#minicolors1').colpick({
  546. submit:true,
  547. color: goodsdetails_buy_bg_color,
  548. onSubmit: function(color,color2){
  549. $('#test-colorpicker-form-input1').val('#'+color2);
  550. $('#minicolors1').find('.layui-colorpicker-trigger-span').css('background','#'+color2);
  551. $('.colpick_full').hide();
  552. }
  553. });
  554. </script>
  555. <script>
  556. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  557. var layer = layui.layer;
  558. var $;
  559. var cur_open_div;
  560. layui.use(['jquery', 'layer','form','colorpicker'], function(){
  561. $ = layui.$;
  562. var form = layui.form;
  563. var colorpicker = layui.colorpicker;
  564. form.on('radio(linktype)', function(data){
  565. if (data.value == 2) {
  566. $('#typeGroup').show();
  567. } else {
  568. $('#typeGroup').hide();
  569. }
  570. });
  571. //表单赋值
  572. /*var goodsdetails_addcart_bg_color = '{$data["goodsdetails_addcart_bg_color"]}';
  573. colorpicker.render({
  574. elem: '#minicolors'
  575. ,color: goodsdetails_addcart_bg_color ? goodsdetails_addcart_bg_color : '#f9c706'
  576. ,done: function(color){
  577. $('#test-colorpicker-form-input').val(color);
  578. }
  579. });
  580. colorpicker.render({
  581. elem: '#goods_avatar_rgb'
  582. ,color: '{$data['goods_avatar_rgb']}'
  583. ,done: function(color){
  584. $('#goods_avatar_rgb_colorpicker').val(color);
  585. }
  586. });
  587. //表单赋值
  588. var goodsdetails_buy_bg_color = '{$data["goodsdetails_buy_bg_color"]}';
  589. colorpicker.render({
  590. elem: '#minicolors1'
  591. ,color: goodsdetails_buy_bg_color ? goodsdetails_buy_bg_color : '#ff5041'
  592. ,done: function(color){
  593. $('#test-colorpicker-form-input1').val(color);
  594. }
  595. });*/
  596. $('#chose_link').click(function(){
  597. cur_open_div = $(this).attr('data-input');
  598. $.post("{:U('util.selecturl', array('ok' => 1))}", {}, function(shtml){
  599. layer.open({
  600. type: 1,
  601. area: '930px',
  602. content: shtml //注意,如果str是object,那么需要字符拼接。
  603. });
  604. });
  605. })
  606. //监听提交
  607. form.on('submit(formDemo)', function(data){
  608. $.ajax({
  609. url: data.form.action,
  610. type: data.form.method,
  611. data: data.field,
  612. dataType:'json',
  613. success: function (info) {
  614. if(info.status == 0)
  615. {
  616. layer.msg(info.result.message,{icon: 1,time: 2000});
  617. }else if(info.status == 1){
  618. var go_url = location.href;
  619. if( info.result.hasOwnProperty("url") )
  620. {
  621. go_url = info.result.url;
  622. }
  623. layer.msg('操作成功',{time: 1000,
  624. end:function(){
  625. location.href = info.result.url;
  626. }
  627. });
  628. }
  629. }
  630. });
  631. return false;
  632. });
  633. form.on('radio(isnull_unit)', function(data){
  634. if (data.value==1) {
  635. $("#goodsSaleUnit").hide();
  636. } else {
  637. $("#goodsSaleUnit").css('display','inline');
  638. }
  639. form.render('checkbox');
  640. });
  641. })
  642. </script>
  643. </body>