1fdf5c2c704ef84836098d600f41310f.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. <?php /*a:2:{s:103:"E:\phpstudy_pro_8.1.0.1_64bit_Green\phpstudy_pro\WWW\yueshengshop\app\admin\view\config\web_config.html";i:1588232435;s:90:"E:\phpstudy_pro_8.1.0.1_64bit_Green\phpstudy_pro\WWW\yueshengshop\app\admin\view\base.html";i:1587517806;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta name="renderer" content="webkit" />
  6. <meta http-equiv="X-UA-COMPATIBLE" content="IE=edge,chrome=1" />
  7. <title><?php echo htmlentities((isset($menu_info['title']) && ($menu_info['title'] !== '')?$menu_info['title']:"")); ?> - <?php echo htmlentities((isset($website['title']) && ($website['title'] !== '')?$website['title']:"Niushop开源商城")); ?></title>
  8. <meta name="keywords" content="<?php echo htmlentities((isset($website['keywords']) && ($website['keywords'] !== '')?$website['keywords']:'Niushop开源商城')); ?>">
  9. <meta name="description" content="<?php echo htmlentities((isset($website['desc']) && ($website['desc'] !== '')?$website['desc']:'描述')); ?>}">
  10. <link rel="icon" type="image/x-icon" href="http://yueshengshop.top/public/static/img/bitbug_favicon.ico" />
  11. <link rel="stylesheet" type="text/css" href="http://yueshengshop.top/public/static/css/iconfont.css" />
  12. <link rel="stylesheet" type="text/css" href="http://yueshengshop.top/public/static/ext/layui/css/layui.css" />
  13. <link rel="stylesheet" type="text/css" href="http://yueshengshop.top/public/static/loading/msgbox.css"/>
  14. <link rel="stylesheet" type="text/css" href="http://yueshengshop.top/app/admin/view/public/css/common.css" />
  15. <script src="http://yueshengshop.top/public/static/js/jquery-3.1.1.js"></script>
  16. <script src="http://yueshengshop.top/public/static/ext/layui/layui.js"></script>
  17. <script>
  18. layui.use(['layer', 'upload', 'element'], function() {});
  19. window.ns_url = {
  20. baseUrl: "http://yueshengshop.top/",
  21. route: ['<?php echo request()->module(); ?>', '<?php echo request()->controller(); ?>', '<?php echo request()->action(); ?>'],
  22. };
  23. </script>
  24. <script src="http://yueshengshop.top/public/static/js/common.js"></script>
  25. <style>
  26. .ns-calendar{background: url("http://yueshengshop.top/public/static/img/ns_calendar.png") no-repeat center / 16px 16px;}
  27. </style>
  28. <script type="text/javascript">
  29. </script>
  30. </head>
  31. <body>
  32. <!-- logo -->
  33. <div class="ns-logo">
  34. <div class="logo-box">
  35. <img src="http://yueshengshop.top/app/admin/view/public/img/logo.png">
  36. </div>
  37. <span>B2B2C多商户平台端</span>
  38. <span>
  39. 服务电话:400-886-7993
  40. </span>
  41. </div>
  42. <div class="layui-layout layui-layout-admin">
  43. <div class="layui-header">
  44. <!-- 一级菜单 -->
  45. <ul class="layui-nav layui-layout-left">
  46. <?php $serond_menu = []; foreach($menu as $menu_k => $menu_v): ?>
  47. <li class="layui-nav-item <?php if($menu_v['selected']): ?> layui-this<?php endif; ?>">
  48. <a href="<?php echo htmlentities($menu_v['url']); ?>"><?php echo htmlentities($menu_v['title']); ?></a>
  49. </li>
  50. <?php if($menu_v['selected']):
  51. $serond_menu = $menu_v['child_list'];
  52. ?>
  53. <?php endif; ?>
  54. <?php endforeach; ?>
  55. </ul>
  56. <ul class="layui-nav layui-layout-right">
  57. <li class="layui-nav-item">
  58. <a href="javascript:;">
  59. <div class="ns-img-box">
  60. <img src="http://yueshengshop.top/app/admin/view/public/img/default_headimg.png" alt="">
  61. </div>
  62. <?php echo htmlentities($user_info['username']); ?>
  63. </a>
  64. <dl class="layui-nav-child">
  65. <dd class="ns-reset-pass" onclick="resetPassword();">
  66. <a href="javascript:;">修改密码</a>
  67. </dd>
  68. <dd>
  69. <a onclick="clearCache()" href="javascript:;">清除缓存</a>
  70. </dd>
  71. <dd>
  72. <a href="<?php echo addon_url('admin/login/logout'); ?>" class="login-out">退出登录</a>
  73. </dd>
  74. </dl>
  75. </li>
  76. </ul>
  77. </div>
  78. <?php if(!(empty($serond_menu) || (($serond_menu instanceof \think\Collection || $serond_menu instanceof \think\Paginator ) && $serond_menu->isEmpty()))): ?>
  79. <div class="layui-side">
  80. <div class="layui-side-scroll">
  81. <span class="ns-side-title"><?php echo htmlentities($crumbs[0]['title']); ?></span>
  82. <!-- 二三级菜单-->
  83. <ul class="layui-nav layui-nav-tree" lay-filter="test">
  84. <?php foreach($serond_menu as $menu_second_k => $menu_second_v): ?>
  85. <li class="layui-nav-item <?php if($menu_second_v['selected']): ?> layui-nav-itemed <?php endif; if(!$menu_second_v['child_list'] && $menu_second_v['selected']): ?> layui-this<?php endif; ?>">
  86. <a class="layui-menu-tips" href="<?php if(!$menu_second_v['child_list']): ?> <?php echo htmlentities($menu_second_v['url']); else: ?>javascript:;<?php endif; ?>"><?php echo htmlentities($menu_second_v['title']); ?></a>
  87. <?php if(!(empty($menu_second_v['child_list']) || (($menu_second_v['child_list'] instanceof \think\Collection || $menu_second_v['child_list'] instanceof \think\Paginator ) && $menu_second_v['child_list']->isEmpty()))): ?>
  88. <dl class="layui-nav-child">
  89. <?php foreach($menu_second_v["child_list"] as $menu_third_k => $menu_third_v): ?>
  90. <dd class="<?php if($menu_third_v['selected']): ?> layui-this<?php endif; ?>">
  91. <a href="<?php echo htmlentities($menu_third_v['url']); ?>"><?php echo htmlentities($menu_third_v['title']); ?></a>
  92. </dd>
  93. <?php endforeach; ?>
  94. </dl>
  95. <?php endif; ?>
  96. </li>
  97. <?php endforeach; ?>
  98. </ul>
  99. </div>
  100. </div>
  101. <?php endif; ?>
  102. <div class="layui-body<?php if(empty($serond_menu) || (($serond_menu instanceof \think\Collection || $serond_menu instanceof \think\Paginator ) && $serond_menu->isEmpty())): ?> child_no_exit<?php endif; ?>">
  103. <!-- 面包屑 -->
  104. <?php if(count($serond_menu) > 0): ?>
  105. <div class="ns-crumbs<?php if(empty($serond_menu) || (($serond_menu instanceof \think\Collection || $serond_menu instanceof \think\Paginator ) && $serond_menu->isEmpty())): ?> child_no_exit<?php endif; ?>">
  106. <span class="layui-breadcrumb" lay-separator="-">
  107. <?php foreach($crumbs as $crumbs_k => $crumbs_v): if(count($crumbs) == ($crumbs_k + 1)): ?>
  108. <a href="<?php echo htmlentities($crumbs_v['url']); ?>"><cite><?php echo htmlentities($crumbs_v['title']); ?></cite></a>
  109. <?php else: ?>
  110. <a href="<?php echo htmlentities($crumbs_v['url']); ?>"><?php echo htmlentities($crumbs_v['title']); ?></a>
  111. <?php endif; ?>
  112. <?php endforeach; ?>
  113. </span>
  114. </div>
  115. <?php endif; ?>
  116. <div class="ns-body-content <?php if(count($serond_menu) < 1): ?> crumbs_no_exit<?php endif; ?>">
  117. <div class="ns-body">
  118. <!-- 四级导航 -->
  119. <?php if(isset($forth_menu) && !empty($forth_menu)): ?>
  120. <div class="fourstage-nav layui-tab layui-tab-brief" lay-filter="edit_user_tab">
  121. <ul class="layui-tab-title">
  122. <?php if(is_array($forth_menu) || $forth_menu instanceof \think\Collection || $forth_menu instanceof \think\Paginator): $i = 0; $__LIST__ = $forth_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?>
  123. <li class="<?php echo $menu['selected']==1 ? 'layui-this' : ''; ?>" lay-id="basic_info"><a href="<?php echo htmlentities($menu['parse_url']); ?>"><?php echo htmlentities($menu['title']); ?></a></li>
  124. <?php endforeach; endif; else: echo "" ;endif; ?>
  125. </ul>
  126. </div>
  127. <?php endif; ?>
  128. <div class="layui-collapse ns-tips">
  129. <div class="layui-colla-item">
  130. <h2 class="layui-colla-title">操作提示</h2>
  131. <ul class="layui-colla-content layui-show">
  132. <li>站点设置包括网站的基本信息设置,SEO设置以及网站官方联系方式等</li>
  133. <li>可根据SEO设置优化网站排名</li>
  134. </ul>
  135. </div>
  136. </div>
  137. <div class="layui-form ns-form">
  138. <div class="layui-form-item">
  139. <label class="layui-form-label"><span class="required">*</span>网站标题:</label>
  140. <div class="layui-input-block">
  141. <input type="text" name="title" lay-verify="required" value="<?php echo htmlentities($website_info['data']['title']); ?>" autocomplete="off" class="layui-input ns-len-long">
  142. </div>
  143. <div class="ns-word-aux">网站名称,将显示在前台顶部欢迎信息等位置</div>
  144. </div>
  145. <div class="layui-form-item">
  146. <label class="layui-form-label img-upload-lable">网站logo:</label>
  147. <div class="layui-input-block img-upload">
  148. <input type="hidden" name="logo" value="<?php echo htmlentities($website_info['data']['logo']); ?>" />
  149. <div class="upload-img-block icon">
  150. <div class="upload-img-box" id="webLogoUpload">
  151. <?php if(empty($website_info['data']['logo'])): ?>
  152. <div class="ns-upload-default">
  153. <img src="http://yueshengshop.top/public/static/img/upload_img.png" />
  154. <p>点击上传</p>
  155. </div>
  156. <?php else: ?>
  157. <img src="<?php echo img($website_info['data']['logo']); ?>" alt="">
  158. <?php endif; ?>
  159. </div>
  160. </div>
  161. </div>
  162. <div class="ns-word-aux">默认网站LOGO,通用头部显示,最佳显示尺寸为200px*60px</div>
  163. </div>
  164. <div class="layui-form-item">
  165. <label class="layui-form-label">网站描述:</label>
  166. <div class="layui-input-block">
  167. <textarea name="desc" class="layui-textarea ns-len-long"><?php echo htmlentities($website_info['data']['desc']); ?></textarea>
  168. </div>
  169. </div>
  170. <div class="layui-form-item">
  171. <label class="layui-form-label">网站关键字:</label>
  172. <div class="layui-input-block">
  173. <input type="text" name="keywords" value="<?php echo htmlentities($website_info['data']['keywords']); ?>" autocomplete="off" class="layui-input ns-len-long">
  174. </div>
  175. <div class="ns-word-aux">用于网站搜索引擎的优化,关键字之间请用英文逗号分隔</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="text" name="web_address" value="<?php echo htmlentities($website_info['data']['web_address']); ?>" autocomplete="off" class="layui-input ns-len-long">
  181. </div>
  182. </div>
  183. <div class="layui-form-item">
  184. <label class="layui-form-label img-upload-lable">网站公众号二维码:</label>
  185. <div class="layui-input-inline img-upload">
  186. <div class="upload-img-block icon">
  187. <input type="hidden" name="web_qrcode" value="<?php echo htmlentities($website_info['data']['web_qrcode']); ?>" />
  188. <div class="upload-img-box" id="webQrcodeUpload">
  189. <?php if(empty($website_info['data']['web_qrcode'])): ?>
  190. <div class="ns-upload-default">
  191. <img src="http://yueshengshop.top/public/static/img/upload_img.png" />
  192. <p>点击上传</p>
  193. </div>
  194. <?php else: ?>
  195. <img src="<?php echo img($website_info['data']['web_qrcode']); ?>" alt="">
  196. <?php endif; ?>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. <div class="layui-form-item">
  202. <label class="layui-form-label">网站邮箱:</label>
  203. <div class="layui-input-block">
  204. <input type="text" name="web_email" value="<?php echo htmlentities($website_info['data']['web_email']); ?>" autocomplete="off" class="layui-input ns-len-long">
  205. </div>
  206. </div>
  207. <div class="layui-form-item">
  208. <label class="layui-form-label">网站联系方式:</label>
  209. <div class="layui-input-block">
  210. <input type="text" name="web_phone" value="<?php echo htmlentities($website_info['data']['web_phone']); ?>" autocomplete="off" class="layui-input ns-len-long">
  211. </div>
  212. </div>
  213. <div class="layui-form-item">
  214. <label class="layui-form-label">网站QQ:</label>
  215. <div class="layui-input-block">
  216. <input type="text" name="web_qq" value="<?php echo htmlentities($website_info['data']['web_qq']); ?>" autocomplete="off" class="layui-input ns-len-long">
  217. </div>
  218. </div>
  219. <div class="layui-form-item">
  220. <label class="layui-form-label">网站微信:</label>
  221. <div class="layui-input-block">
  222. <input type="text" name="web_weixin" value="<?php echo htmlentities($website_info['data']['web_weixin']); ?>" autocomplete="off" class="layui-input ns-len-long">
  223. </div>
  224. </div>
  225. <div class="layui-form-item">
  226. <label class="layui-form-label">手机端域名:</label>
  227. <div class="layui-input-block">
  228. <input type="text" name="wap_domain" value="<?php echo htmlentities($website_info['data']['wap_domain']); ?>" autocomplete="off" class="layui-input ns-len-long">
  229. </div>
  230. </div>
  231. <div class="layui-form-item">
  232. <label class="layui-form-label">pc端是否启用:</label>
  233. <div class="layui-input-block">
  234. <input type="checkbox" name="web_status" value="1" lay-skin="switch" <?php if($website_info['data']['web_status'] == 1): ?> checked <?php endif; ?> />
  235. </div>
  236. </div>
  237. <div class="layui-form-item">
  238. <label class="layui-form-label">手机端是否启用:</label>
  239. <div class="layui-input-block">
  240. <input type="checkbox" name="wap_status" value="1" lay-skin="switch" <?php if($website_info['data']['wap_status'] == 1): ?> checked <?php endif; ?> />
  241. </div>
  242. </div>
  243. <div class="layui-form-item">
  244. <label class="layui-form-label">网站关闭原因:</label>
  245. <div class="layui-input-block">
  246. <textarea name="close_reason" class="layui-textarea ns-len-long"><?php echo htmlentities($website_info['data']['close_reason']); ?></textarea>
  247. </div>
  248. </div>
  249. <div class="ns-form-row">
  250. <button class="layui-btn ns-bg-color" lay-submit lay-filter="save">保存</button>
  251. </div>
  252. </div>
  253. </div>
  254. <!-- 版权信息 -->
  255. <div class="ns-footer">
  256. <div class="ns-footer-img">
  257. <a href="#"><img style="-webkit-filter: grayscale(100%);-moz-filter: grayscale(100%);-ms-filter: grayscale(100%);-o-filter: grayscale(100%);filter: grayscale(100%);filter: gray;" src="<?php if(!empty($copyright['logo'])): ?> <?php echo img($copyright['logo']); else: ?>http://yueshengshop.top/public/static/img/copyright_logo.png<?php endif; ?>" /></a>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. <!-- 重置密码弹框html -->
  264. <div class="layui-form" id="reset_pass" style="display: none;">
  265. <div class="layui-form-item">
  266. <label class="layui-form-label"><span class="required">*</span>原密码</label>
  267. <div class="layui-input-block">
  268. <input type="password" id="old_pass" name="old_pass" required class="layui-input ns-len-mid" maxlength="18" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');" onblur="this.setAttribute('readonly',true);">
  269. <span class="required"></span>
  270. </div>
  271. </div>
  272. <div class="layui-form-item">
  273. <label class="layui-form-label"><span class="required">*</span>新密码</label>
  274. <div class="layui-input-block">
  275. <input type="password" id="new_pass" name="new_pass" required class="layui-input ns-len-mid" maxlength="18" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');" onblur="this.setAttribute('readonly',true);">
  276. <span class="required"></span>
  277. </div>
  278. </div>
  279. <div class="layui-form-item">
  280. <label class="layui-form-label"><span class="required">*</span>确认新密码</label>
  281. <div class="layui-input-block">
  282. <input type="password" id="repeat_pass" name="repeat_pass" required class="layui-input ns-len-mid" maxlength="18" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');" onblur="this.setAttribute('readonly',true);">
  283. <span class="required"></span>
  284. </div>
  285. </div>
  286. <div class="ns-form-row">
  287. <button class="layui-btn ns-bg-color" onclick="repass()">确定</button>
  288. <button class="layui-btn layui-btn-primary" onclick="closePass()">返回</button>
  289. </div>
  290. </div>
  291. <script type="text/javascript">
  292. layui.use('element',function () {
  293. var element = layui.element;
  294. element.render('breadcrumb');
  295. });
  296. function clearCache () {
  297. $.ajax({
  298. type: 'post',
  299. url: ns.url("admin/Login/clearCache"),
  300. dataType: 'JSON',
  301. success: function(res) {
  302. layer.msg(res.message);
  303. location.reload();
  304. }
  305. })
  306. }
  307. /**
  308. * 重置密码
  309. */
  310. var index;
  311. function resetPassword() {
  312. index = layer.open({
  313. type:1,
  314. content:$('#reset_pass'),
  315. offset: 'auto',
  316. area: ['650px']
  317. });
  318. setTimeout(function() {
  319. $(".ns-reset-pass").removeClass('layui-this');
  320. }, 1000);
  321. }
  322. // $(".ns-reset-pass").on('click', function() {
  323. // $(this).removeClass('layui-this');
  324. // })
  325. var repeat_flag = false;
  326. function repass(){
  327. var old_pass = $("#old_pass").val();
  328. var new_pass = $("#new_pass").val();
  329. var repeat_pass = $("#repeat_pass").val();
  330. if (old_pass == '') {
  331. $("#old_pass").focus();
  332. layer.msg("原密码不能为空");
  333. return;
  334. }
  335. if (new_pass == '') {
  336. $("#new_pass").focus();
  337. layer.msg("密码不能为空");
  338. return;
  339. } else if ($("#new_pass").val().length < 6) {
  340. $("#new_pass").focus();
  341. layer.msg("密码不能少于6位数");
  342. return;
  343. }
  344. if (repeat_pass == '') {
  345. $("#repeat_pass").focus();
  346. layer.msg("密码不能为空");
  347. return;
  348. } else if ($("#repeat_pass").val().length < 6) {
  349. $("#repeat_pass").focus();
  350. layer.msg("密码不能少于6位数");
  351. return;
  352. }
  353. if (new_pass != repeat_pass) {
  354. $("#repeat_pass").focus();
  355. layer.msg("两次密码输入不一样,请重新输入");
  356. return;
  357. }
  358. if(repeat_flag)return;
  359. repeat_flag = true;
  360. $.ajax({
  361. type: "POST",
  362. dataType: 'JSON',
  363. url: ns.url("admin/login/modifypassword"),
  364. data: {"old_pass": old_pass,"new_pass": new_pass},
  365. success: function(res) {
  366. layer.msg(res.message);
  367. repeat_flag = false;
  368. if (res.code == 0) {
  369. layer.close(index);
  370. location.reload();
  371. }
  372. }
  373. });
  374. }
  375. function closePass() {
  376. layer.close(index);
  377. }
  378. layui.use('element', function() {
  379. var element = layui.element;
  380. element.init();
  381. });
  382. </script>
  383. <script>
  384. layui.use(['form', 'upload'], function() {
  385. var form = layui.form,
  386. upload = layui.upload,
  387. repeat_flag = false; //防重复标识
  388. form.render();
  389. form.on('submit(save)', function(data) {
  390. if (data.field.web_status == undefined) {
  391. data.field.web_status = 0;
  392. }
  393. if (data.field.wap_status == undefined) {
  394. data.field.wap_status = 0;
  395. }
  396. if (repeat_flag) return;
  397. repeat_flag = true;
  398. $.ajax({
  399. type: 'POST',
  400. dataType: 'JSON',
  401. url: ns.url("admin/config/webConfig"),
  402. data: data.field,
  403. success: function(res) {
  404. layer.msg(res.message);
  405. if (res.code == 0) {
  406. location.reload();
  407. }else{
  408. repeat_flag = false;
  409. }
  410. }
  411. });
  412. });
  413. //上传logo
  414. var uploadInst = upload.render({
  415. elem: '#webLogoUpload',
  416. url: ns.url("admin/upload/upload"),
  417. done: function(res) {
  418. if (res.code >= 0) {
  419. $("input[name='logo']").val(res.data.pic_path);
  420. $("#webLogoUpload").html("<img src=" + ns.img(res.data.pic_path) + " >");
  421. }
  422. return layer.msg(res.message);
  423. }
  424. });
  425. //二维码
  426. var uploadInst = upload.render({
  427. elem: '#webQrcodeUpload',
  428. url: ns.url("admin/upload/upload"),
  429. done: function(res) {
  430. if (res.code >= 0) {
  431. $("input[name='web_qrcode']").val(res.data.pic_path);
  432. $("#webQrcodeUpload").html("<img src=" + ns.img(res.data.pic_path) + " >");
  433. }
  434. return layer.msg(res.message);
  435. }
  436. });
  437. });
  438. </script>
  439. </body>
  440. </html>