config.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  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. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. </head>
  45. <body layadmin-themealias="default">
  46. <div class="layui-fluid">
  47. <div class="layui-card">
  48. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">拼团设置</span></div>
  49. <div class="layui-card-body" style="padding:15px;">
  50. <div class="layui-tab layui-tab-brief" style="padding-bottom:15px;">
  51. <ul class="layui-tab-title">
  52. <li class="layui-this"><a href="{:U('group/config')}">拼团设置</a></li>
  53. <li><a href="{:U('group/rebate_config')}">拼团返利设置</a></li>
  54. </ul>
  55. </div>
  56. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  57. <div class="layui-form-item">
  58. <label class="layui-form-label">是否开启分销</label>
  59. <div class="layui-input-block">
  60. <label class='radio-inline'>
  61. <input type='radio' name='parameter[is_open_pintuan_commiss]' value='0' <?php if( empty($data) || $data['is_open_pintuan_commiss'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  62. </label>
  63. <label class='radio-inline'>
  64. <input type='radio' name='parameter[is_open_pintuan_commiss]' value='1' <?php if( !empty($data) && $data['is_open_pintuan_commiss'] ==1 ){ ?>checked <?php } ?> title="开启" />
  65. </label>
  66. <span class="help-block">
  67. 注:必须先在<a class="blue_txt" lay-href="{:U('distribution/config', array('ok' => 1))}" >“会员=>会员分销=>分销设置”</a>中设置分销等级,才能使用
  68. </span>
  69. </div>
  70. </div>
  71. <div class="layui-form-item">
  72. <label class="layui-form-label">是否开启订单打印</label>
  73. <div class="layui-input-block">
  74. <label class='radio-inline'>
  75. <input type='radio' name='parameter[is_open_pintuan_orderprint]' value='0' <?php if( empty($data) || $data['is_open_pintuan_orderprint'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  76. </label>
  77. <label class='radio-inline'>
  78. <input type='radio' name='parameter[is_open_pintuan_orderprint]' value='1' <?php if( !empty($data) && $data['is_open_pintuan_orderprint'] ==1 ){ ?>checked <?php } ?> title="开启" />
  79. </label>
  80. <span class="help-block">
  81. 注:必须先在<a class="blue_txt" lay-href="{:U('order/config', array('ok' => 1))}" >“订单=>订单设置”</a>中设置小票打印,才能使用
  82. </span>
  83. </div>
  84. </div>
  85. <div class="layui-form-item">
  86. <label class="layui-form-label">活动商品展示方式</label>
  87. <div class="layui-input-block">
  88. <label class='radio-inline'>
  89. <input type='radio' name='parameter[pintuan_show_type]' value='0' <?php if( empty($data) || $data['pintuan_show_type'] ==0 ){ ?>checked <?php } ?> title="横向布局" />
  90. </label>
  91. <label class='radio-inline'>
  92. <input type='radio' name='parameter[pintuan_show_type]' value='1' <?php if( !empty($data) && $data['pintuan_show_type'] ==1 ){ ?>checked <?php } ?> title="左右布局" />
  93. </label>
  94. <span class="help-block">
  95. 左右布局为每行俩个商品,商品多建议左右布局,横向布局为每行一个商品
  96. </span>
  97. </div>
  98. </div>
  99. <div class="layui-form-item" style="display:none;">
  100. <label class="layui-form-label">是否开启推广团</label>
  101. <div class="layui-input-block">
  102. <label class='radio-inline'>
  103. <input type='radio' lay-filter="is_open_pintuan_tuiguang" name='parameter[is_open_pintuan_tuiguang]' value='0' <?php if( empty($data) || $data['is_open_pintuan_tuiguang'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  104. </label>
  105. <label class='radio-inline'>
  106. <input type='radio' lay-filter="is_open_pintuan_tuiguang" name='parameter[is_open_pintuan_tuiguang]' value='1' <?php if( !empty($data) && $data['is_open_pintuan_tuiguang'] ==1 ){ ?>checked <?php } ?> title="开启" />
  107. </label>
  108. <span class="help-block">
  109. 发起拼团,发起拼团的人不生成订单,邀请的好友参团成功,团长会产生相应的佣金
  110. </span>
  111. </div>
  112. </div>
  113. <div class="layui-form-item" id="is_new_old_yongjin" <?php if(!empty($data) && $data['is_open_pintuan_tuiguang'] ==1 ){ ?> <?php }else{ ?> style="display:none;" <?php } ?> >
  114. <label class="layui-form-label">推广团佣金计算方式</label>
  115. <div class="layui-input-block">
  116. <label class='radio-inline'>
  117. <input type='radio' name='parameter[pintuan_tuiguang_just_new]' value='0' <?php if( empty($data) || $data['pintuan_tuiguang_just_new'] ==0 ){ ?>checked <?php } ?> title="所有人有效" />
  118. </label>
  119. <label class='radio-inline'>
  120. <input type='radio' name='parameter[pintuan_tuiguang_just_new]' value='1' <?php if( !empty($data) && $data['pintuan_tuiguang_just_new'] ==1 ){ ?>checked <?php } ?> title="仅新人有效" />
  121. </label>
  122. <span class="help-block">
  123. 仅新人有效: 只有新人参团的商品才计算佣金给团长。所有有效:无论新老会员参团都算佣金给团长
  124. </span>
  125. </div>
  126. </div>
  127. <div class="layui-form-item">
  128. <label class="layui-form-label">拼团详情,猜你喜欢</label>
  129. <div class="layui-input-block">
  130. <label class='radio-inline'>
  131. <input type='radio' name='parameter[is_open_pipntuan_like]' value='0' <?php if( empty($data) || $data['is_open_pipntuan_like'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  132. </label>
  133. <label class='radio-inline'>
  134. <input type='radio' name='parameter[is_open_pipntuan_like]' value='1' <?php if( !empty($data) && $data['is_open_pipntuan_like'] ==1 ){ ?>checked <?php } ?> title="开启" />
  135. </label>
  136. <span class="help-block">
  137. </span>
  138. </div>
  139. </div>
  140. <div class="layui-form-item">
  141. <label class="layui-form-label">拼团规则介绍</label>
  142. <div class="layui-input-block fixmore-input-group">
  143. <div class="">
  144. {:tpl_ueditor('parameter[pintuan_publish]',$data['pintuan_publish'],array('height'=>'300'))}
  145. </div>
  146. </div>
  147. </div>
  148. <div class="layui-form-item">
  149. <label class="layui-form-label">佣金团说明</label>
  150. <div class="layui-input-block">
  151. <textarea style="height:100px;" name="parameter[pintuan_newman_notice]" class="layui-textarea" rows="5" placeholder="仅新人参团的说明">{$data['pintuan_newman_notice']}</textarea>
  152. <div class="layui-form-mid">
  153. </div>
  154. </div>
  155. </div>
  156. <div class="layui-form-item">
  157. <label class="layui-form-label">分享标题</label>
  158. <div class="layui-input-block">
  159. <input type="text" name="parameter[pintuan_index_share_title]" maxlength="30" class="form-control" value="{$data['pintuan_index_share_title']}" data-rule-required="true" />
  160. <span class='help-block'>拼团首页分享标题</span>
  161. </div>
  162. </div>
  163. <div class="layui-form-item">
  164. <label class="layui-form-label ">分享图片</label>
  165. <div class="layui-input-block">
  166. {:tpl_form_field_image2('parameter[pintuan_index_share_img]', $data['pintuan_index_share_img'])}
  167. <span class='help-block'>此图为拼团首页分享图片(比例为长宽比5:4)</span>
  168. </div>
  169. </div>
  170. <div class="layui-form-item">
  171. <label class="layui-form-label">首页显示</label>
  172. <div class="layui-input-block">
  173. <label class='radio-inline'>
  174. <input type='radio' name='parameter[pintuan_index_show]' value='0' <?php if( empty($data) || $data['pintuan_index_show']==0 ){ ?>checked <?php } ?> title="隐藏" />
  175. </label>
  176. <label class='radio-inline'>
  177. <input type='radio' name='parameter[pintuan_index_show]' value='1' <?php if( !empty($data) && $data['pintuan_index_show']==1 ){ ?>checked <?php } ?> title="样式一(小方块)" />
  178. </label>
  179. <label class='radio-inline'>
  180. <input type='radio' name='parameter[pintuan_index_show]' value='2' <?php if( !empty($data) && $data['pintuan_index_show']==2 ){ ?>checked <?php } ?> title="样式二(大篇幅)" />
  181. </label>
  182. <span class="help-block">
  183. 样式一:首页“新人专享”、“限时秒杀”之间显示“封面图+拼团商品”;
  184. <br>
  185. 样式二:首页商品列表顶部图之上显示“封面图+拼团商品”。
  186. </span>
  187. </div>
  188. </div>
  189. <div class="layui-form-item">
  190. <label class="layui-form-label">自动虚拟成团</label>
  191. <div class="layui-input-block">
  192. <label class='radio-inline'>
  193. <input type='radio' name='parameter[pintuan_isvirs_success]' value='0' <?php if( empty($data) || $data['pintuan_isvirs_success'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  194. </label>
  195. <label class='radio-inline'>
  196. <input type='radio' name='parameter[pintuan_isvirs_success]' value='1' <?php if( !empty($data) && $data['pintuan_isvirs_success'] ==1 ){ ?>checked <?php } ?> title="开启" />
  197. </label>
  198. <span class="help-block">
  199. 注:开启模拟成团后,拼团有效期内人数未满的团,系统将会模拟“匿名买家”凑满人数,使该团成团。
  200. 你只需要对已付款参团的真实买家发货。建议合理开启,以提高成团率。
  201. </br>
  202. (需设置<a class="blue_txt" href="{:U('user/userjia',array('ok'=>'1'))}">虚拟会员</a>,虚拟会员人数不足以补足剩余参团人数,拼团还是会失败)
  203. </span>
  204. </div>
  205. </div>
  206. <div class="layui-form-item" >
  207. <label class="layui-form-label">拼团模式</label>
  208. <div class="layui-input-block">
  209. <label class='radio-inline'>
  210. <input type='radio' name='parameter[pintuan_model_buy]' lay-filter="pintuan_model_buy" value='0' <?php if( empty($data) || $data['pintuan_model_buy'] ==0 ){ ?>checked <?php } ?> title="仅快递" />
  211. </label>
  212. <label class='radio-inline'>
  213. <input type='radio' name='parameter[pintuan_model_buy]' lay-filter="pintuan_model_buy" value='1' <?php if( !empty($data) && $data['pintuan_model_buy'] ==1 ){ ?>checked <?php } ?> title="关联团长" />
  214. </label>
  215. <span class="help-block">
  216. 备注:<br/>
  217. “仅快递” 模式,不关联团长,仅快递可送达<br/>
  218. “关联团长”模式,用户自提,团长配送,快递均可使用,并结算给团长佣金
  219. </span>
  220. </div>
  221. </div>
  222. <div class="layui-form-item">
  223. <label class="layui-form-label ">首页拼团入口封面图</label>
  224. <div class="layui-input-block">
  225. {:tpl_form_field_image2('parameter[pintuan_index_coming_img]', $data['pintuan_index_coming_img'])}
  226. <span class='help-block'>此图为首页拼团入口封面图,备注:不设置不显示,但还会显示拼团商品</span>
  227. </div>
  228. </div>
  229. <div class="layui-form-item">
  230. <label class="layui-form-label">拼团详情团长信息</label>
  231. <div class="layui-input-block">
  232. <label class='radio-inline'>
  233. <input type='radio' name='parameter[pintuan_show_community_info]' value='0' <?php if( empty($data) || $data['pintuan_show_community_info'] ==0 ){ ?>checked <?php } ?> title="隐藏" />
  234. </label>
  235. <label class='radio-inline'>
  236. <input type='radio' name='parameter[pintuan_show_community_info]' value='1' <?php if( !empty($data) && $data['pintuan_show_community_info'] ==1 ){ ?>checked <?php } ?> title="显示" />
  237. </label>
  238. <span class="help-block">
  239. 备注:“关联团长” 模式,并且开启此开关才会显示
  240. </span>
  241. </div>
  242. </div>
  243. <div class="layui-form-item">
  244. <label class="layui-form-label">陌生人参团</label>
  245. <div class="layui-input-block">
  246. <label class='radio-inline'>
  247. <input type='radio' name='parameter[pintuan_close_stranger]' lay-filter="xianshickbox" value='1' <?php if( !empty($data) && $data['pintuan_close_stranger']==1 ){ ?>checked <?php } ?> title="隐藏" />
  248. </label>
  249. <label class='radio-inline'>
  250. <input type='radio' name='parameter[pintuan_close_stranger]' lay-filter="xianshickbox" value='0' <?php if( empty($data) || $data['pintuan_close_stranger']==0 ){ ?>checked <?php } ?> title="显示" />
  251. </label>
  252. </div>
  253. </div>
  254. <div class="layui-form-item" id="pintuan_stranger_zero" <?php if( !empty($data) && $data['pintuan_close_stranger']==1 ){ ?>style="display:none;" <?php } ?> >
  255. <label class="layui-form-label">包含0元开团</label>
  256. <div class="layui-input-block ">
  257. <input type="checkbox" lay-skin="primary" title="是" name="parameter[pintuan_stranger_zero]" class="form-control valid" <?php if( !empty($data) && $data['pintuan_stranger_zero'] ==1 ){ ?>checked<?php } ?> value="1" />
  258. </div>
  259. <div class="layui-form-mid layui-word-aux" style="margin-left:15px;">
  260. </div>
  261. </div>
  262. <div class="layui-form-item">
  263. <label class="layui-form-label"> </label>
  264. <div class="layui-input-block">
  265. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  266. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  267. </div>
  268. </div>
  269. </form>
  270. </div>
  271. </div>
  272. </div>
  273. <script src="/layuiadmin/layui/layui.js"></script>
  274. <script>
  275. layui.config({
  276. base: '/layuiadmin/' //静态资源所在路径
  277. }).extend({
  278. index: 'lib/index' //主入口模块
  279. }).use('index');
  280. </script>
  281. <script>
  282. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  283. var layer = layui.layer;
  284. var $;
  285. var cur_open_div;
  286. layui.use(['jquery', 'layer','form','colorpicker'], function(){
  287. $ = layui.$;
  288. var form = layui.form;
  289. var colorpicker = layui.colorpicker;
  290. form.on('radio(linktype)', function(data){
  291. if (data.value == 2) {
  292. $('#typeGroup').show();
  293. } else {
  294. $('#typeGroup').hide();
  295. }
  296. });
  297. form.on('radio(xianshickbox)', function(data){
  298. if (data.value == 1) {
  299. $('#pintuan_stranger_zero').hide();
  300. } else {
  301. $('#pintuan_stranger_zero').show();
  302. }
  303. });
  304. <!--
  305. <?php if($data['delivery_type_express'] == 2){?>
  306. form.on('radio(pintuan_model_buy1111)', function(data){
  307. if (data.value == 0) {
  308. $('input[name="parameter[pintuan_model_buy]"][value=0]').prop("checked","false");
  309. $('input[name="parameter[pintuan_model_buy]"][value=1]').prop("checked","true");
  310. layer.msg("启用仅快递配送模式,请在物流设置开启快递配送方式!",{icon: 2,time: 3000});
  311. form.render();
  312. }
  313. });
  314. <?php }?>-->
  315. //表单赋值
  316. var goodsdetails_addcart_bg_color = '{$data["goodsdetails_addcart_bg_color"]}';
  317. colorpicker.render({
  318. elem: '#minicolors'
  319. ,color: goodsdetails_addcart_bg_color ? goodsdetails_addcart_bg_color : '#f9c706'
  320. ,done: function(color){
  321. $('#test-colorpicker-form-input').val(color);
  322. }
  323. });
  324. //表单赋值
  325. var goodsdetails_buy_bg_color = '{$data["goodsdetails_buy_bg_color"]}';
  326. colorpicker.render({
  327. elem: '#minicolors1'
  328. ,color: goodsdetails_buy_bg_color ? goodsdetails_buy_bg_color : '#ff5041'
  329. ,done: function(color){
  330. $('#test-colorpicker-form-input1').val(color);
  331. }
  332. });
  333. $('#chose_link').click(function(){
  334. cur_open_div = $(this).attr('data-input');
  335. $.post("{:U('util.selecturl', array('ok' => 1))}", {}, function(shtml){
  336. layer.open({
  337. type: 1,
  338. area: '930px',
  339. content: shtml //注意,如果str是object,那么需要字符拼接。
  340. });
  341. });
  342. })
  343. //监听提交
  344. form.on('submit(formDemo)', function(data){
  345. $.ajax({
  346. url: data.form.action,
  347. type: data.form.method,
  348. data: data.field,
  349. dataType:'json',
  350. success: function (info) {
  351. if(info.status == 0)
  352. {
  353. layer.msg(info.result.message,{icon: 1,time: 2000});
  354. }else if(info.status == 1){
  355. var go_url = location.href;
  356. if( info.result.hasOwnProperty("url") )
  357. {
  358. go_url = info.result.url;
  359. }
  360. layer.msg('操作成功',{time: 1000,
  361. end:function(){
  362. location.href = info.result.url;
  363. }
  364. });
  365. }
  366. }
  367. });
  368. return false;
  369. });
  370. })
  371. </script>
  372. </body>