config.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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='parameter[isopen_virtualcard]' value='0' <?php if( empty($data) || $data['isopen_virtualcard'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  56. </label>
  57. <label class='radio-inline'>
  58. <input type='radio' name='parameter[isopen_virtualcard]' value='1' <?php if( !empty($data) && $data['isopen_virtualcard'] ==1 ){ ?>checked <?php } ?> title="开启" />
  59. </label>
  60. <span class="help-block">
  61. </span>
  62. </div>
  63. </div>
  64. <div class="layui-form-item">
  65. <label class="layui-form-label">是否参与分销</label>
  66. <div class="layui-input-block">
  67. <label class='radio-inline'>
  68. <input type='radio' name='parameter[virtualcard_is_takecommiss]' value='0' <?php if( empty($data) || $data['virtualcard_is_takecommiss'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  69. </label>
  70. <label class='radio-inline'>
  71. <input type='radio' name='parameter[virtualcard_is_takecommiss]' value='1' <?php if( !empty($data) && $data['virtualcard_is_takecommiss'] ==1 ){ ?>checked <?php } ?> title="开启" />
  72. </label>
  73. <span class="help-block">
  74. </span>
  75. </div>
  76. </div>
  77. <div class="layui-form-item">
  78. <label class="layui-form-label">会员中心入口</label>
  79. <div class="layui-input-block">
  80. <label class='radio-inline'>
  81. <input type='radio' name='parameter[is_open_virtualcard_show]' value='0' <?php if( empty($data) || $data['is_open_virtualcard_show'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  82. </label>
  83. <label class='radio-inline'>
  84. <input type='radio' name='parameter[is_open_virtualcard_show]' value='1' <?php if( !empty($data) && $data['is_open_virtualcard_show'] ==1 ){ ?>checked <?php } ?> title="开启" />
  85. </label>
  86. <span class="help-block">
  87. 会员中心页面显示 ”礼品卡中心“ 入口
  88. </span>
  89. </div>
  90. </div>
  91. <div class="layui-form-item" style="display:none;">
  92. <label class="layui-form-label">是否允许退款</label>
  93. <div class="layui-input-block">
  94. <label class='radio-inline'>
  95. <input type='radio' name='parameter[iscan_virtualcard_refund]' value='0' <?php if( empty($data) || $data['iscan_virtualcard_refund'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  96. </label>
  97. <label class='radio-inline'>
  98. <input type='radio' name='parameter[iscan_virtualcard_refund]' value='1' <?php if( !empty($data) && $data['iscan_virtualcard_refund'] ==1 ){ ?>checked <?php } ?> title="开启" />
  99. </label>
  100. <span class="help-block">
  101. 开启后未兑换的礼品卡可以申请退款
  102. </span>
  103. </div>
  104. </div>
  105. <div class="layui-form-item">
  106. <label class="layui-form-label">活动商品展示方式</label>
  107. <div class="layui-input-block">
  108. <label class='radio-inline'>
  109. <input type='radio' name='parameter[virtualcard_layout]' value='0' <?php if( empty($data) || $data['virtualcard_layout'] ==0 ){ ?>checked <?php } ?> title="左右布局" />
  110. </label>
  111. <label class='radio-inline'>
  112. <input type='radio' name='parameter[virtualcard_layout]' value='1' <?php if( !empty($data) && $data['virtualcard_layout'] ==1 ){ ?>checked <?php } ?> title="横向布局" />
  113. </label>
  114. <span class="help-block">
  115. 左右布局为每行俩个商品,商品多建议左右布局,横向布局为每行一个商品
  116. </span>
  117. </div>
  118. </div>
  119. <div class="layui-form-item">
  120. <label class="layui-form-label">"礼品卡中心“自定义:</label>
  121. <div class="layui-input-block">
  122. <input type="text" name="parameter[virtualcard_name_modify]" maxlength="30" class="form-control" value="{$data['virtualcard_name_modify']}" />
  123. <span class='help-block'>默认:礼品卡中心,修改名称页面名称和菜单名称会统一变更</span>
  124. </div>
  125. </div>
  126. <div class="layui-form-item" >
  127. <label class="layui-form-label">兑换防刷:</label>
  128. <div class="layui-input-block">
  129. <div class="input-group fixsingle-input-group">
  130. <input type="text" name="parameter[virtcard_flush_limit_miniter]" class="form-control" value="{$data['virtcard_flush_limit_miniter']}" />
  131. <div class="input-group-addon"><b>分钟</b></div>
  132. <div class="input-group-addon"><b>内连续输入兑换码错误</b></div>
  133. <input type="text" name="parameter[virtcard_flush_error_timers]" class="form-control" value="{$data['virtcard_flush_error_timers']}" />
  134. <div class="input-group-addon"><b>次后,冻结该用户兑换资格</b></div>
  135. <input type="text" name="parameter[virtcard_flush_error_hours]" class="form-control" value="<?php echo !isset($data['virtcard_flush_error_hours']) ? 1 : $data['virtcard_flush_error_hours']; ?>" />
  136. <div class="input-group-addon"><b>小时</b></div>
  137. </div>
  138. <span class='help-block'></span>
  139. </div>
  140. </div>
  141. <div class="layui-form-item">
  142. <label class="layui-form-label">分享标题</label>
  143. <div class="layui-input-block">
  144. <input type="text" name="parameter[virtcard_share_title]" maxlength="30" class="form-control" value="{$data['virtcard_share_title']}" data-rule-required="true" />
  145. <span class='help-block'>礼品卡首页分享标题</span>
  146. </div>
  147. </div>
  148. <div class="layui-form-item">
  149. <label class="layui-form-label ">分享图片</label>
  150. <div class="layui-input-block">
  151. {:tpl_form_field_image2('parameter[virtcard_share_img]', $data['virtcard_share_img'])}
  152. <span class='help-block'>礼品卡首页分享图片(比例为长宽比5:4)</span>
  153. </div>
  154. </div>
  155. <div class="layui-form-item">
  156. <label class="layui-form-label ">礼品卡入口封面图</label>
  157. <div class="layui-input-block">
  158. {:tpl_form_field_image2('parameter[virtualcard_index_coming_img]', $data['virtualcard_index_coming_img'])}
  159. <span class='help-block'>此图为首页礼品卡入口封面图,备注:不设置不显示,但还会显示礼品卡商品</span>
  160. </div>
  161. </div>
  162. <div class="layui-form-item">
  163. <label class="layui-form-label ">礼品卡顶部图片</label>
  164. <div class="layui-input-block">
  165. {:tpl_form_field_image2('parameter[virtcard_top_banner]', $data['virtcard_top_banner'])}
  166. <span class='help-block'>礼品卡中心顶部图片</span>
  167. </div>
  168. </div>
  169. <div class="layui-form-item">
  170. <label class="layui-form-label">礼品卡兑换中心说明</label>
  171. <div class="layui-input-block fixmore-input-group">
  172. <div class="">
  173. {:tpl_ueditor('parameter[virtcard_publish]',$data['virtcard_publish'],array('height'=>'300'))}
  174. </div>
  175. </div>
  176. </div>
  177. <div class="layui-form-item">
  178. <label class="layui-form-label"> </label>
  179. <div class="layui-input-block">
  180. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  181. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  182. </div>
  183. </div>
  184. </form>
  185. </div>
  186. </div>
  187. </div>
  188. <script src="/layuiadmin/layui/layui.js"></script>
  189. <script>
  190. layui.config({
  191. base: '/layuiadmin/' //静态资源所在路径
  192. }).extend({
  193. index: 'lib/index' //主入口模块
  194. }).use('index');
  195. </script>
  196. <script>
  197. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  198. var layer = layui.layer;
  199. var $;
  200. var cur_open_div;
  201. layui.use(['jquery', 'layer','form','colorpicker'], function(){
  202. $ = layui.$;
  203. var form = layui.form;
  204. var colorpicker = layui.colorpicker;
  205. form.on('radio(linktype)', function(data){
  206. if (data.value == 2) {
  207. $('#typeGroup').show();
  208. } else {
  209. $('#typeGroup').hide();
  210. }
  211. });
  212. form.on('radio(xianshickbox)', function(data){
  213. if (data.value == 1) {
  214. $('#pintuan_stranger_zero').hide();
  215. } else {
  216. $('#pintuan_stranger_zero').show();
  217. }
  218. });
  219. <!--
  220. <?php if($data['delivery_type_express'] == 2){?>
  221. form.on('radio(pintuan_model_buy1111)', function(data){
  222. if (data.value == 0) {
  223. $('input[name="parameter[pintuan_model_buy]"][value=0]').prop("checked","false");
  224. $('input[name="parameter[pintuan_model_buy]"][value=1]').prop("checked","true");
  225. layer.msg("启用仅快递配送模式,请在物流设置开启快递配送方式!",{icon: 2,time: 3000});
  226. form.render();
  227. }
  228. });
  229. <?php }?>-->
  230. //表单赋值
  231. var goodsdetails_addcart_bg_color = '{$data["goodsdetails_addcart_bg_color"]}';
  232. colorpicker.render({
  233. elem: '#minicolors'
  234. ,color: goodsdetails_addcart_bg_color ? goodsdetails_addcart_bg_color : '#f9c706'
  235. ,done: function(color){
  236. $('#test-colorpicker-form-input').val(color);
  237. }
  238. });
  239. //表单赋值
  240. var goodsdetails_buy_bg_color = '{$data["goodsdetails_buy_bg_color"]}';
  241. colorpicker.render({
  242. elem: '#minicolors1'
  243. ,color: goodsdetails_buy_bg_color ? goodsdetails_buy_bg_color : '#ff5041'
  244. ,done: function(color){
  245. $('#test-colorpicker-form-input1').val(color);
  246. }
  247. });
  248. $('#chose_link').click(function(){
  249. cur_open_div = $(this).attr('data-input');
  250. $.post("{:U('util.selecturl', array('ok' => 1))}", {}, function(shtml){
  251. layer.open({
  252. type: 1,
  253. area: '930px',
  254. content: shtml //注意,如果str是object,那么需要字符拼接。
  255. });
  256. });
  257. })
  258. //监听提交
  259. form.on('submit(formDemo)', function(data){
  260. $.ajax({
  261. url: data.form.action,
  262. type: data.form.method,
  263. data: data.field,
  264. dataType:'json',
  265. success: function (info) {
  266. if(info.status == 0)
  267. {
  268. layer.msg(info.result.message,{icon: 1,time: 2000});
  269. }else if(info.status == 1){
  270. var go_url = location.href;
  271. if( info.result.hasOwnProperty("url") )
  272. {
  273. go_url = info.result.url;
  274. }
  275. layer.msg('操作成功',{time: 1000,
  276. end:function(){
  277. location.href = info.result.url;
  278. }
  279. });
  280. }
  281. }
  282. });
  283. return false;
  284. });
  285. })
  286. </script>
  287. </body>