e5e29040a284478e13c40410d9450651.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <?php if (!defined('THINK_PATH')) exit();?><!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': '<?php echo ($_W['uniacid']); ?>',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '<?php echo ($_W['acid']); ?>',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '<?php echo ($_W['openid']); ?>',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '<?php echo ($_W['uid']); ?>',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '<?php echo ($_W['siteroot']); ?>',
  27. 'siteurl': '<?php echo ($_W['siteurl']); ?>',
  28. 'attachurl': '<?php echo ($_W['attachurl']); ?>',
  29. 'attachurl_local': '<?php echo ($_W['attachurl_local']); ?>',
  30. 'attachurl_remote': '<?php echo ($_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' : <?php echo 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_presale]' value='0' <?php if( empty($data) || $data['isopen_presale'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  56. </label>
  57. <label class='radio-inline'>
  58. <input type='radio' name='parameter[isopen_presale]' value='1' <?php if( !empty($data) && $data['isopen_presale'] ==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[presale_layout]' value='0' <?php if( empty($data) || $data['presale_layout'] ==0 ){ ?>checked <?php } ?> title="左右布局" />
  69. </label>
  70. <label class='radio-inline'>
  71. <input type='radio' name='parameter[presale_layout]' value='1' <?php if( !empty($data) && $data['presale_layout'] ==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_presale_show]' value='0' <?php if( empty($data) || $data['is_open_presale_show'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  82. </label>
  83. <label class='radio-inline'>
  84. <input type='radio' name='parameter[is_open_presale_show]' value='1' <?php if( !empty($data) && $data['is_open_presale_show'] ==1 ){ ?>checked <?php } ?> title="开启" />
  85. </label>
  86. <span class="help-block">
  87. </span>
  88. </div>
  89. </div>
  90. <div class="layui-form-item">
  91. <label class="layui-form-label">"预售中心"自定义:</label>
  92. <div class="layui-input-block">
  93. <input type="text" name="parameter[presale_name_modify]" maxlength="30" class="form-control" value="<?php echo ($data['presale_name_modify']); ?>" />
  94. <span class='help-block'>默认:预售中心,修改名称前端页面名称和菜单名称会统一变更</span>
  95. </div>
  96. </div>
  97. <div class="layui-form-item" style="display:none;">
  98. <label class="layui-form-label">”预售商品“定金退款:</label>
  99. <div class="layui-input-block">
  100. <label class='radio-inline'>
  101. <input type='radio' name='parameter[iscan_presale_dingrefund]' value='0' <?php if( empty($data) || $data['iscan_presale_dingrefund'] ==0 ){ ?>checked <?php } ?> title="关闭" />
  102. </label>
  103. <label class='radio-inline'>
  104. <input type='radio' name='parameter[iscan_presale_dingrefund]' value='1' <?php if( !empty($data) && $data['iscan_presale_dingrefund'] ==1 ){ ?>checked <?php } ?> title="开启" />
  105. </label>
  106. <span class="help-block">
  107. </span>
  108. </div>
  109. </div>
  110. <div class="layui-form-item">
  111. <label class="layui-form-label">分享标题</label>
  112. <div class="layui-input-block">
  113. <input type="text" name="parameter[presale_share_title]" maxlength="30" class="form-control" value="<?php echo ($data['presale_share_title']); ?>" data-rule-required="true" />
  114. <span class='help-block'>预售首页分享标题</span>
  115. </div>
  116. </div>
  117. <div class="layui-form-item">
  118. <label class="layui-form-label ">分享图片</label>
  119. <div class="layui-input-block">
  120. <?php echo tpl_form_field_image2('parameter[presale_share_img]', $data['presale_share_img']);?>
  121. <span class='help-block'>预售首页分享图片(比例为长宽比5:4)</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. <?php echo tpl_form_field_image2('parameter[presale_index_coming_img]', $data['presale_index_coming_img']);?>
  128. <span class='help-block'>此图为首页拼团入口封面图,备注:不设置不显示,但还会显示拼团商品</span>
  129. </div>
  130. </div>
  131. <div class="layui-form-item">
  132. <label class="layui-form-label">预售协议</label>
  133. <div class="layui-input-block">
  134. <textarea name="parameter[presale_agreement]" rows="5" class="form-control" data-parent=".subtitle" maxlength="100" data-rule-maxlength="100"><?php echo ($data['presale_agreement']); ?></textarea>
  135. <div class="layui-form-mid layui-word-aux">订单提交页,预售说明</div>
  136. </div>
  137. </div>
  138. <div class="layui-form-item">
  139. <label class="layui-form-label">预售规则介绍</label>
  140. <div class="layui-input-block fixmore-input-group">
  141. <div class="">
  142. <?php echo tpl_ueditor('parameter[presale_publish]',$data['presale_publish'],array('height'=>'300'));?>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="layui-form-item">
  147. <label class="layui-form-label"> </label>
  148. <div class="layui-input-block">
  149. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  150. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  151. </div>
  152. </div>
  153. </form>
  154. </div>
  155. </div>
  156. </div>
  157. <script src="/layuiadmin/layui/layui.js"></script>
  158. <script>
  159. layui.config({
  160. base: '/layuiadmin/' //静态资源所在路径
  161. }).extend({
  162. index: 'lib/index' //主入口模块
  163. }).use('index');
  164. </script>
  165. <script>
  166. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  167. var layer = layui.layer;
  168. var $;
  169. var cur_open_div;
  170. layui.use(['jquery', 'layer','form','colorpicker'], function(){
  171. $ = layui.$;
  172. var form = layui.form;
  173. var colorpicker = layui.colorpicker;
  174. form.on('radio(linktype)', function(data){
  175. if (data.value == 2) {
  176. $('#typeGroup').show();
  177. } else {
  178. $('#typeGroup').hide();
  179. }
  180. });
  181. form.on('radio(xianshickbox)', function(data){
  182. if (data.value == 1) {
  183. $('#pintuan_stranger_zero').hide();
  184. } else {
  185. $('#pintuan_stranger_zero').show();
  186. }
  187. });
  188. <!--
  189. <?php if($data['delivery_type_express'] == 2){?>
  190. form.on('radio(pintuan_model_buy1111)', function(data){
  191. if (data.value == 0) {
  192. $('input[name="parameter[pintuan_model_buy]"][value=0]').prop("checked","false");
  193. $('input[name="parameter[pintuan_model_buy]"][value=1]').prop("checked","true");
  194. layer.msg("启用仅快递配送模式,请在物流设置开启快递配送方式!",{icon: 2,time: 3000});
  195. form.render();
  196. }
  197. });
  198. <?php }?>-->
  199. //表单赋值
  200. var goodsdetails_addcart_bg_color = '<?php echo ($data["goodsdetails_addcart_bg_color"]); ?>';
  201. colorpicker.render({
  202. elem: '#minicolors'
  203. ,color: goodsdetails_addcart_bg_color ? goodsdetails_addcart_bg_color : '#f9c706'
  204. ,done: function(color){
  205. $('#test-colorpicker-form-input').val(color);
  206. }
  207. });
  208. //表单赋值
  209. var goodsdetails_buy_bg_color = '<?php echo ($data["goodsdetails_buy_bg_color"]); ?>';
  210. colorpicker.render({
  211. elem: '#minicolors1'
  212. ,color: goodsdetails_buy_bg_color ? goodsdetails_buy_bg_color : '#ff5041'
  213. ,done: function(color){
  214. $('#test-colorpicker-form-input1').val(color);
  215. }
  216. });
  217. $('#chose_link').click(function(){
  218. cur_open_div = $(this).attr('data-input');
  219. $.post("<?php echo U('util.selecturl', array('ok' => 1));?>", {}, function(shtml){
  220. layer.open({
  221. type: 1,
  222. area: '930px',
  223. content: shtml //注意,如果str是object,那么需要字符拼接。
  224. });
  225. });
  226. })
  227. //监听提交
  228. form.on('submit(formDemo)', function(data){
  229. $.ajax({
  230. url: data.form.action,
  231. type: data.form.method,
  232. data: data.field,
  233. dataType:'json',
  234. success: function (info) {
  235. if(info.status == 0)
  236. {
  237. layer.msg(info.result.message,{icon: 1,time: 2000});
  238. }else if(info.status == 1){
  239. var go_url = location.href;
  240. if( info.result.hasOwnProperty("url") )
  241. {
  242. go_url = info.result.url;
  243. }
  244. layer.msg('操作成功',{time: 1000,
  245. end:function(){
  246. location.href = info.result.url;
  247. }
  248. });
  249. }
  250. }
  251. });
  252. return false;
  253. });
  254. })
  255. </script>
  256. </body>