c2d6e67e633492a2c64048da03d5b216.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  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. <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. <?php echo tpl_form_field_image2('parameter[seller_backimage]', $data['seller_backimage'], "Common/image/login_admin.png");?> <span class='layui-form-mid'>商家后台登录页面,封面图(400*300)。(XXX|管理后台)也是这个图片。手动FTP替换地址:Common/image/pdd_small2.png</span>
  57. </div>
  58. </div>
  59. <div class="layui-form-item" >
  60. <label class="layui-form-label">XXX|管理后台图片</label>
  61. <div class="layui-input-block">
  62. <?php echo tpl_form_field_image2('parameter[admin_login_image]', $data['admin_login_image'], "Common/image/login_small.png");?> <span class='layui-form-mid'>尺寸:250*32。</span>
  63. </div>
  64. </div>
  65. <div class="layui-form-item" >
  66. <label class="layui-form-label">首页商品列表加载图片</label>
  67. <div class="layui-input-block">
  68. <?php echo tpl_form_field_image2('parameter[loading]', $data['loading']);?>
  69. <span class='layui-form-mid'>未加载图片时显示的背景图(小图模式为1:1图片,大图模式为670*400)</span>
  70. </div>
  71. </div>
  72. <div class="layui-form-item" >
  73. <label class="layui-form-label">商品详情价格区域背景图</label>
  74. <div class="layui-input-block">
  75. <?php echo tpl_form_field_image2('parameter[goods_details_price_bg]', $data['goods_details_price_bg'], "/static/placeholder/shareBottomBg.png");?>
  76. <span class='layui-form-mid'>未设置将使用默认,尺寸:710*100。</span>
  77. </div>
  78. </div>
  79. <div class="layui-form-item" >
  80. <label class="layui-form-label">首页分享二维码背景图片</label>
  81. <div class="layui-input-block">
  82. <?php echo tpl_form_field_image2('parameter[index_share_qrcode_bg]', $data['index_share_qrcode_bg'], "/static/images/index_share_bg.jpg");?>
  83. <span class='layui-form-mid'>不传则使用系统默认<b style="color:red">(请传jpg类型图片)</b>,尺寸:750*1334。</span>
  84. </div>
  85. </div>
  86. <div class="layui-form-item" >
  87. <label class="layui-form-label">二维码颜色</label>
  88. <div class="layui-input-block">
  89. <div class="" style="margin:0px;">
  90. <div class="layui-input-inline" style="width: 120px;">
  91. <input type="text" name="parameter[qrcode_rgb]" value="<?php echo ($data['qrcode_rgb']); ?>" placeholder="请选择颜色" class="layui-input" id="test-colorpicker-form-input1">
  92. </div>
  93. <div class="layui-inline" style="left: -11px;">
  94. <div id="minicolors">
  95. <div class="layui-unselect layui-colorpicker"><span><span class="layui-colorpicker-trigger-span" lay-type="" style="background: <?php echo ($data['qrcode_rgb']); ?>"><i class="layui-icon layui-colorpicker-trigger-i layui-icon-down"></i></span></span></div>
  96. </div>
  97. </div>
  98. </div>
  99. <span class='layui-form-mid'>二维码颜色自定义,不设置则默认红色<b style="color:red"></b></span>
  100. </div>
  101. </div>
  102. <div class="layui-form-item" >
  103. <label class="layui-form-label">海报头像圆角填充颜色</label>
  104. <div class="layui-input-block">
  105. <div class="" style="margin:0px;">
  106. <div class="layui-input-inline" style="width: 120px;">
  107. <input type="text" name="parameter[avatar_rgb]" value="<?php echo ($data['avatar_rgb']); ?>" placeholder="请选择颜色" class="layui-input" id="test-colorpicker-form-input2">
  108. </div>
  109. <div class="layui-inline" style="left: -11px;">
  110. <div id="avatar_rgb">
  111. <div class="layui-unselect layui-colorpicker"><span><span class="layui-colorpicker-trigger-span" lay-type="" style="background: <?php echo ($data['avatar_rgb']); ?>"><i class="layui-icon layui-colorpicker-trigger-i layui-icon-down"></i></span></span></div>
  112. </div>
  113. </div>
  114. </div>
  115. <span class='layui-form-mid'>二维码颜色自定义,不设置则默认黄色<b style="color:red"></b></span>
  116. </div>
  117. </div>
  118. <div class="layui-form-item">
  119. <label class="layui-form-label">首页二维码自定义时分</label>
  120. <div class="layui-input-block">
  121. <input type="text" name="parameter[modify_index_share_time]" class="form-control" value="<?php echo ($data['modify_index_share_time']); ?>" />
  122. <span class='layui-form-mid'>例如:08:00,用于首页海报显示的固定时分,日期随着每天改变</span>
  123. </div>
  124. </div>
  125. <div class="layui-form-item" style="">
  126. <label class="layui-form-label">首页底部图片</label>
  127. <div class="layui-input-block">
  128. <?php echo tpl_form_field_image2('parameter[index_bottom_image]', $data['index_bottom_image'], "/static/placeholder/icon-index-slogan.png");?>
  129. <span class='layui-form-mid'>原尺寸:250*56。</span>
  130. </div>
  131. </div>
  132. <div class="layui-form-item" style="">
  133. <label class="layui-form-label">首页商品列表顶部图</label>
  134. <div class="layui-input-block">
  135. <?php echo tpl_form_field_image2('parameter[index_list_top_image]', $data['index_list_top_image'], "/static/placeholder/past-title.png");?>
  136. <span class='layui-form-mid'>原尺寸:332*88。</span>
  137. <label class="layui-form-label" style="width: auto;padding-left: 0;">是否开启</label>
  138. <div class="layui-input-block">
  139. <label class='radio-inline'>
  140. <input type='radio' name='parameter[index_list_top_image_on]' title="显示" value='0' <?php if( !empty($data) && $data['index_list_top_image_on'] ==0 ){ ?>checked <?php } ?> />
  141. </label>
  142. <label class='radio-inline'>
  143. <input type='radio' name='parameter[index_list_top_image_on]' title="隐藏" value='1' <?php if( empty($data) || $data['index_list_top_image_on'] ==1 ){ ?>checked <?php } ?> />
  144. </label>
  145. </div>
  146. </div>
  147. </div>
  148. <div class="layui-form-item" style="">
  149. <label class="layui-form-label">商品详情页声明顶上图</label>
  150. <div class="layui-input-block">
  151. <?php echo tpl_form_field_image2('parameter[goods_details_middle_image]', $data['goods_details_middle_image'], "/static/placeholder/past-title.png");?>
  152. <span class='layui-form-mid'>原尺寸:184*48。</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. <?php echo tpl_form_field_image2('parameter[index_lead_image]', $data['index_lead_image']);?>
  159. <span class='layui-form-mid'>原尺寸:750*1208</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. <label class='radio-inline'>
  166. <input type='radio' name='parameter[is_show_index_lead_image]' title="否" value='0' <?php if( !empty($data) && $data['is_show_index_lead_image'] ==0 ){ ?>checked <?php } ?> />
  167. </label>
  168. <label class='radio-inline'>
  169. <input type='radio' name='parameter[is_show_index_lead_image]' title="是" value='1' <?php if( empty($data) || $data['is_show_index_lead_image'] ==1 ){ ?>checked <?php } ?> />
  170. </label>
  171. </div>
  172. </div>
  173. <div class="layui-form-item">
  174. <label class="layui-form-label">页头公共背景图</label>
  175. <div class="layui-input-block">
  176. <?php echo tpl_form_field_image2('parameter[common_header_backgroundimage]', $data['common_header_backgroundimage'], "/static/placeholder/TOP_background@2x.png");?>
  177. <span class='layui-form-mid'>包括订单详情页头和社区选择页头,尺寸:750*340。</span>
  178. </div>
  179. </div>
  180. <div class="layui-form-item">
  181. <label class="layui-form-label">首页页头背景图</label>
  182. <div class="layui-input-block">
  183. <?php echo tpl_form_field_image2('parameter[index_header_backgroundimage]', $data['index_header_backgroundimage'], "/static/placeholder/TOP_background@2x.png");?>
  184. <span class='layui-form-mid'>尺寸:750*340。</span>
  185. </div>
  186. </div>
  187. <div class="layui-form-item">
  188. <label class="layui-form-label">个人中心页头背景图</label>
  189. <div class="layui-input-block">
  190. <?php echo tpl_form_field_image2('parameter[user_header_backgroundimage]', $data['user_header_backgroundimage'], "/static/placeholder/TOP_background@2x.png");?>
  191. <span class='layui-form-mid'>尺寸:750*340。</span>
  192. </div>
  193. </div>
  194. <div class="layui-form-item">
  195. <label class="layui-form-label">授权弹窗背景</label>
  196. <div class="layui-input-block">
  197. <?php echo tpl_form_field_image2('parameter[newauth_bg_image]', $data['newauth_bg_image'], "/static/placeholder/auth-bg.png");?>
  198. <span class='layui-form-mid'>建议尺寸:宽度520,高度480~660之间。</span>
  199. </div>
  200. </div>
  201. <div class="layui-form-item">
  202. <label class="layui-form-label">授权弹窗取消按钮</label>
  203. <div class="layui-input-block">
  204. <?php echo tpl_form_field_image2('parameter[newauth_cancel_image]', $data['newauth_cancel_image']);?>
  205. <span class='layui-form-mid'>建议尺寸:180*70</span>
  206. </div>
  207. </div>
  208. <div class="layui-form-item">
  209. <label class="layui-form-label">授权弹窗确认按钮</label>
  210. <div class="layui-input-block">
  211. <?php echo tpl_form_field_image2('parameter[newauth_confirm_image]', $data['newauth_confirm_image']);?>
  212. <span class='layui-form-mid'>建议尺寸:180*70</span>
  213. </div>
  214. </div>
  215. <div class="layui-form-item" >
  216. <label class="layui-form-label">更新会员核销二维码</label>
  217. <div class="layui-input-block" style="padding-top:7px;">
  218. <a id="clear_qrcode" href="javascript:;" data-href="<?php echo U('config/clearqrcode');?>" class="text-primary">立即更新</a>
  219. </div>
  220. </div>
  221. <div class="layui-form-item">
  222. <label class="layui-form-label"></label>
  223. <div class="layui-input-block">
  224. <input type="submit" lay-submit lay-filter="formDemo" value="提交" class="btn btn-primary" />
  225. </div>
  226. </div>
  227. </form>
  228. </div>
  229. </div>
  230. </div>
  231. <script src="/layuiadmin/layui/layui.js"></script>
  232. <script>
  233. layui.config({
  234. base: '/layuiadmin/' //静态资源所在路径
  235. }).extend({
  236. index: 'lib/index' //主入口模块
  237. }).use('index');
  238. var minicolors = '<?php echo ($data["qrcode_rgb"]); ?>';
  239. $('#minicolors').colpick({
  240. submit:true,
  241. color: minicolors,
  242. onSubmit: function(color,color2){
  243. $('#test-colorpicker-form-input1').val('#'+color2);
  244. $('#minicolors').find('.layui-colorpicker-trigger-span').css('background','#'+color2);
  245. $('.colpick_full').hide();
  246. }
  247. });
  248. var avatar_rgb = '<?php echo ($data["avatar_rgb"]); ?>';
  249. $('#avatar_rgb').colpick({
  250. submit:true,
  251. color: avatar_rgb,
  252. onSubmit: function(color,color2){
  253. $('#test-colorpicker-form-input2').val('#'+color2);
  254. $('#avatar_rgb').find('.layui-colorpicker-trigger-span').css('background','#'+color2);
  255. $('.colpick_full').hide();
  256. }
  257. });
  258. </script>
  259. <script>
  260. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  261. var layer = layui.layer;
  262. var $;
  263. layui.use(['jquery', 'layer','form','colorpicker'], function(){
  264. $ = layui.$;
  265. var form = layui.form;
  266. var colorpicker = layui.colorpicker;
  267. $('#clear_qrcode').click(function(){
  268. var s_url = $(this).attr('data-href');
  269. console.log(s_url);
  270. layer.confirm('确认更新会员核销二维码吗?', function(index){
  271. //do something
  272. $.ajax({
  273. url : s_url,
  274. dataType:'json',
  275. success:function(ret){
  276. layer.msg('操作成功',{time: 1000,
  277. end:function(){
  278. }
  279. });
  280. }
  281. })
  282. layer.close(index);
  283. });
  284. });
  285. //表单赋值
  286. /*colorpicker.render({
  287. elem: '#minicolors'
  288. ,color: '<?php echo ($data['qrcode_rgb']); ?>'
  289. ,done: function(color){
  290. $('#test-colorpicker-form-input1').val(color);
  291. }
  292. });
  293. colorpicker.render({
  294. elem: '#avatar_rgb'
  295. ,color: '<?php echo ($data['avatar_rgb']); ?>'
  296. ,done: function(color){
  297. $('#test-colorpicker-form-input2').val(color);
  298. }
  299. });*/
  300. //监听提交
  301. form.on('submit(formDemo)', function(data){
  302. $.ajax({
  303. url: data.form.action,
  304. type: data.form.method,
  305. data: data.field,
  306. dataType:'json',
  307. success: function (info) {
  308. if(info.status == 0)
  309. {
  310. layer.msg(info.result.message,{icon: 1,time: 2000});
  311. }else if(info.status == 1){
  312. var go_url = location.href;
  313. if( info.result.hasOwnProperty("url") )
  314. {
  315. go_url = info.result.url;
  316. }
  317. layer.msg('操作成功',{time: 1000,
  318. end:function(){
  319. location.href = info.result.url;
  320. }
  321. });
  322. }
  323. }
  324. });
  325. return false;
  326. });
  327. })
  328. </script>