config.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  51. <div class="layui-form-item">
  52. <label class="layui-form-label">群接龙功能开关</label>
  53. <div class="layui-input-block">
  54. <label class='radio-inline'>
  55. <input type='radio' name='data[is_open_solitaire]' lay-filter="solitaire" value='0' <?php if( empty($data) || $data['is_open_solitaire'] ==0 ){ ?>checked <?php } ?> title="不开启" />
  56. </label>
  57. <label class='radio-inline'>
  58. <input type='radio' name='data[is_open_solitaire]' lay-filter="solitaire" value='1' <?php if( !empty($data) && $data['is_open_solitaire'] ==1 ){ ?>checked <?php } ?> title="开启" />
  59. </label>
  60. </div>
  61. </div>
  62. <div class="layui-form-item">
  63. <label class="layui-form-label">群接龙活动审核</label>
  64. <div class="layui-input-block">
  65. <label class='radio-inline'>
  66. <input type='radio' name='data[solitaire_is_needexamine]' lay-filter="solitaire_is_needexamine" value='0' <?php if( empty($data) || $data['solitaire_is_needexamine'] ==0 ){ ?>checked <?php } ?> title="自动审核" />
  67. </label>
  68. <label class='radio-inline'>
  69. <input type='radio' name='data[solitaire_is_needexamine]' lay-filter="solitaire_is_needexamine" value='1' <?php if( !empty($data) && $data['solitaire_is_needexamine'] ==1 ){ ?>checked <?php } ?> title="人工审核" />
  70. </label>
  71. </div>
  72. <span class="layui-form-mid" style="margin-left:50px;">自动审核团长前端发起群接龙活动自动审核通过,人工审核为后台人员进行审核</span>
  73. </div>
  74. <div class="layui-form-item">
  75. <label class="layui-form-label">群接龙留言功能</label>
  76. <div class="layui-input-block">
  77. <label class='radio-inline'>
  78. <input type='radio' name='data[solitaire_is_message]' lay-filter="solitaire_is_message" value='0' <?php if( empty($data) || $data['solitaire_is_message'] ==0 ){ ?>checked <?php } ?> title="不开启" />
  79. </label>
  80. <label class='radio-inline'>
  81. <input type='radio' name='data[solitaire_is_message]' lay-filter="solitaire_is_message" value='1' <?php if( !empty($data) && $data['solitaire_is_message'] ==1 ){ ?>checked <?php } ?> title="开启" />
  82. </label>
  83. </div>
  84. <span class="layui-form-mid" style="margin-left:50px;">开启后用户可以在群接龙下发进行留言,团长可以对留言进行删除或者回复</span>
  85. </div>
  86. <div class="layui-form-item" >
  87. <label class="layui-form-label">群接龙活动目标</label>
  88. <div class="layui-input-block">
  89. <input type="checkbox" lay-filter="solitaire_target" lay-skin="primary" value="1" name="data[solitaire_target]" <?php if( !empty($data) && $data['solitaire_target']==1 ){ ?>checked<?php } ?> title="开启活动目标" />
  90. </div>
  91. </div>
  92. <div class="layui-form-item" id="solitaire_target_type" <?php if( empty($data) || $data['solitaire_target']==0 ){ ?>style="display:none;"<?php } ?>>
  93. <label class="layui-form-label">&nbsp;</label>
  94. <div class="layui-input-block">
  95. <label class='radio-inline'>
  96. <input type='radio' name='data[solitaire_target_type]' lay-filter="solitaire_target_type" value='0' <?php if( empty($data) || $data['solitaire_target_type'] ==0 ){ ?>checked <?php } ?> title="参与人数" />
  97. </label>
  98. <label class='radio-inline'>
  99. <input type='radio' name='data[solitaire_target_type]' lay-filter="solitaire_target_type" value='1' <?php if( !empty($data) && $data['solitaire_target_type'] ==1 ){ ?>checked <?php } ?> title="接龙金额" />
  100. </label>
  101. </div>
  102. <span class="layui-form-mid" style="margin-left:50px;"></span>
  103. </div>
  104. <div class="layui-form-item" id="solitaire_target_takemember" <?php if( !empty($data) && $data['solitaire_target']==1 && $data['solitaire_target_type'] ==0 ){ ?><?php }else{ ?>style="display:none;" <?php } ?>>
  105. <label class="layui-form-label">&nbsp;</label>
  106. <div class="layui-input-block">
  107. <div class="input-group">
  108. <input type="text" name="data[solitaire_target_takemember]" class="form-control" value="{$data['solitaire_target_takemember']}" />
  109. <span class="input-group-addon">人</span>
  110. </div>
  111. <span class="layui-form-mid">参与人数设置直接展示在商品接龙的详情页进行宣传</span>
  112. </div>
  113. </div>
  114. <div class="layui-form-item" id="solitaire_target_takemoney" <?php if( !empty($data) && $data['solitaire_target']==1 && $data['solitaire_target_type'] ==1 ){ ?><?php }else{ ?>style="display:none;" <?php } ?>>
  115. <label class="layui-form-label">&nbsp;</label>
  116. <div class="layui-input-block">
  117. <div class="input-group">
  118. <input type="text" name="data[solitaire_target_takemoney]" class="form-control" value="{$data['solitaire_target_takemoney']}" />
  119. <span class="input-group-addon">元</span>
  120. </div>
  121. <span class="layui-form-mid">参与金额设置直接展示在商品接龙的详情页进行宣传</span>
  122. </div>
  123. </div>
  124. <div class="layui-form-item" >
  125. <label class="layui-form-label">群接龙规则</label>
  126. <div class="layui-input-block">
  127. <div class="">
  128. {:tpl_ueditor('data[solitaire_notice]',$data['solitaire_notice'],array('height'=>'300'))}
  129. </div>
  130. </div>
  131. </div>
  132. <div class="layui-form-item">
  133. <label class="layui-form-label"></label>
  134. <div class="layui-input-block">
  135. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  136. </div>
  137. </div>
  138. </form>
  139. </div>
  140. </div>
  141. </div>
  142. <script src="/layuiadmin/layui/layui.js"></script>
  143. <script>
  144. layui.config({
  145. base: '/layuiadmin/' //静态资源所在路径
  146. }).extend({
  147. index: 'lib/index' //主入口模块
  148. }).use('index');
  149. </script>
  150. <script>
  151. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  152. var layer = layui.layer;
  153. var $;
  154. layui.use(['jquery', 'layer','form','colorpicker'], function(){
  155. $ = layui.$;
  156. var form = layui.form;
  157. var colorpicker = layui.colorpicker;
  158. form.on('checkbox(solitaire_target)', function(data){
  159. if (data.elem.checked) {
  160. $("#solitaire_target_type").css('display','inline');
  161. $('#solitaire_target_takemember').show();
  162. } else {
  163. $("#solitaire_target_type").hide();
  164. $('#solitaire_target_takemember').hide();
  165. }
  166. form.render('checkbox');
  167. });
  168. form.on('radio(solitaire_target_type)', function(data){
  169. if (data.value == 1) {
  170. $('#solitaire_target_takemoney').show();
  171. $('#solitaire_target_takemember').hide();
  172. } else {
  173. $('#solitaire_target_takemoney').hide();
  174. $('#solitaire_target_takemember').show();
  175. }
  176. });
  177. //表单赋值
  178. colorpicker.render({
  179. elem: '#minicolors'
  180. ,color: '{$data['nav_bg_color']}'
  181. ,done: function(color){
  182. $('#test-colorpicker-form-input').val(color);
  183. }
  184. });
  185. //监听提交
  186. form.on('submit(formDemo)', function(data){
  187. $.ajax({
  188. url: data.form.action,
  189. type: data.form.method,
  190. data: data.field,
  191. dataType:'json',
  192. success: function (info) {
  193. if(info.status == 0)
  194. {
  195. layer.msg(info.result.message,{icon: 1,time: 2000});
  196. }else if(info.status == 1){
  197. var go_url = location.href;
  198. if( info.result.hasOwnProperty("url") )
  199. {
  200. go_url = info.result.url;
  201. }
  202. layer.msg('操作成功',{time: 1000,
  203. end:function(){
  204. location.href = info.result.url;
  205. }
  206. });
  207. }
  208. }
  209. });
  210. return false;
  211. });
  212. })
  213. </script>
  214. </body>
  215. </html>