8695018b03cbba6deb8029650a92b57a.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  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_name; ?></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/layui/css/layui.css" media="all">
  12. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  13. <link href="/static/css/snailfish.css?v=2.0.0" rel="stylesheet">
  14. <style>
  15. .wb-nav .snailfishicon{
  16. position: absolute;
  17. left: 20px;
  18. top: 50%;
  19. margin-top: -10px;
  20. }
  21. </style>
  22. </head>
  23. <body class="layui-layout-body">
  24. <div id="LAY_app">
  25. <div class="layui-layout layui-layout-admin">
  26. <!--头部区域begin-->
  27. <div class="layui-header">
  28. <ul class="layui-nav layui-layout-left">
  29. <li class="layui-nav-item layadmin-flexible" lay-unselect="">
  30. <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩" id="href_flexible">
  31. <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
  32. </a>
  33. </li>
  34. <li class="layui-nav-item" lay-unselect="">
  35. <a href="javascript:;" layadmin-event="refresh" title="刷新">
  36. <i class="layui-icon layui-icon-refresh-3"></i>
  37. </a>
  38. </li>
  39. <span class="layui-nav-bar" style="left: 30px; top: 48px; width: 0px; opacity: 0;"></span>
  40. </ul>
  41. <?php $version_info = M('lionfish_comshop_config')->where( array('name' => 'site_version') )->find(); $version = $version_info['value']; ?>
  42. <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
  43. <li id="neworder" style="display:none;" class="layui-nav-item layui-hide-xs" lay-unselect>
  44. <a href="javascript:void(0)" data-href="<?php echo U('order/index');?>">
  45. <span style="margin: -4px -15px 0;"></span>
  46. 新订单<span id="notice"><?php echo ($order_count); ?></span>条
  47. </a>
  48. </li>
  49. <li id="orderdistribution" style="display:none;" class="layui-nav-item layui-hide-xs" lay-unselect>
  50. <a href="javascript:void(0)">
  51. <span style="margin: -4px -15px 0;"></span>
  52. 发配送员消息<span id="distributionnotice" style="color:red;"></span>条
  53. </a>
  54. </li>
  55. <li class="layui-nav-item layui-hide-xs" lay-unselect >
  56. <a href="<?php echo U('index/index', array('is_new' => 2) );?>" >
  57. <span class="layui-badge-dot" style="margin: -4px -15px 0;"></span>
  58. 切换旧版后台
  59. </a>
  60. </li>
  61. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  62. <a href="javascript:;" layadmin-event="theme">
  63. <i class="layui-icon layui-icon-theme"></i>
  64. </a>
  65. </li>
  66. <li class="layui-nav-item layui-hide-xs"><a class="btn btn-primary" href="/seller.php?s=/Public/clear">清空缓存</a></li>
  67. <?php if (!defined('ROLE') || ROLE != 'agenter' ) {?>
  68. <li class="layui-nav-item layui-hide-xs" lay-unselect >
  69. <font style="color:#009688;">
  70. 当前社区团购版本18.0
  71. </font>
  72. </li>
  73. <?php } ?>
  74. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  75. <a href="javascript:;" layadmin-event="fullscreen">
  76. <i class="layui-icon layui-icon-screen-full"></i>
  77. </a>
  78. </li>
  79. <li class="layui-nav-item layui-hide-xs lay-logins" lay-unselect>
  80. <a href="javascript:;">
  81. <?php if (defined('ROLE') && ROLE == 'agenter' ) { $agent_auth = session('agent_auth'); echo $agent_auth['shopname']; }else{ echo D('Home/Front')->get_config_by_name('shoname'); } ?>
  82. </a>
  83. </li>
  84. <li class="layui-nav-item layui-hide-xs" lay-unselect>
  85. <a href="<?php echo U('Public/logout');?>">退出</a>
  86. </li>
  87. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  88. <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
  89. </li>
  90. <span class="layui-nav-bar" style="left: 28px; top: 48px; width: 0px; opacity: 0;"></span>
  91. </ul>
  92. </div>
  93. <!--头部区域end-->
  94. <!--左侧导航区域begin--->
  95. <div class="layui-side layui-side-menu">
  96. <div class="layui-side-scroll">
  97. <!-- logo -->
  98. <div class="index-inner-container">
  99. <?php $shoplogo = D('Home/Front')->get_config_by_name('shoplogo'); ?>
  100. <div class="layui-logo">
  101. <span>
  102. <?php if( empty($shoplogo) ){ ?>
  103. <img class="layui-circle" src="/static/images/default-pic.jpg" height="46px" width="46px">
  104. <?php }else{ ?>
  105. <img class="layui-circle" src="<?php echo tomedia($shoplogo);?>" height="46px" width="46px">
  106. <?php } ?>
  107. </span>
  108. </div>
  109. <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
  110. <span class="layui-nav-bar" style="height: 0px; top: 0px; opacity: 0;"></span>
  111. <?php $sysmenus = D('Seller/menu')->getMenu(true); ?>
  112. <?php $i =0; foreach($sysmenus['menu'] as $key => $menu){ ?>
  113. <li class="layui-nav-item <?php if($i ==0){ ?>layui-nav-itemed<?php } ?>" pinyin="<?php echo $key; ?>">
  114. <a href="javascript:;" <?php if( empty($menu['route']) ){ ?>lay-href="<?php echo U($menu['route']);?>"<?php } ?> lay-tips="<?php echo ($menu['text']); ?>" lay-direction="2">
  115. <i class=" snailfishicon snailfishicon-<?php echo ($menu['icon']); ?>"></i>
  116. <cite style="font-size:15px"><?php echo ($menu['text']); ?></cite>
  117. </a>
  118. </li>
  119. <?php $i++; } ?>
  120. </ul>
  121. </div>
  122. </div>
  123. </div>
  124. <!--左侧导航区域end--->
  125. <!--内容体begin-->
  126. <div class="layui-body" id="LAY_app_body">
  127. <div class="layadmin-tabsbody-item layui-show sub-nav-show">
  128. <!--二级菜单begin-->
  129. <div class="sub-nav" style="width:125px">
  130. <?php $i =0; foreach($sysmenus['menu'] as $key => $menu){ ?>
  131. <?php if( empty($menu['items']) ){ ?>
  132. <div class="nav-new wb-subnav"></div>
  133. <?php }else{ ?>
  134. <div class="nav-new wb-subnav <?php if($i ==0 ){ ?> layui-this<?php } ?>" >
  135. <div class="subnav-scene" style="font-size: 14px" >
  136. <?php echo ($menu['subtitle']); ?>
  137. </div>
  138. <?php foreach($menu['items'] as $sub_menu){ ?>
  139. <?php if( !empty($sub_menu['items']) ){ ?>
  140. <!--<div class="menu-header <?php if( $menu['route'] != 'config/index' ){ ?>active<?php } ?>">-->
  141. <div class="menu-header active">
  142. <!--<?php if( $menu['route'] == 'config/index' ){ ?>
  143. <div class="menu-icon fa fa-caret-right layui-icon ">&#xe623;</div>
  144. <?php }else{ ?>-->
  145. <!--<?php } ?>-->
  146. <div class="menu-icon fa fa-caret-right layui-icon " style="color: #656161;">&#xe625;</div>
  147. <div style="font-size: 13px;color: #656161;"> <?php echo ($sub_menu['title']); ?></div>
  148. </div>
  149. <?php }else{ ?>
  150. <ul style="display:block;">
  151. <li <?php if($perm_url == $sub_menu['route']){ ?>class="active"<?php } ?> data-class="active">
  152. <a href="javascript:;" lay-href="<?php echo U($sub_menu['route']);?>" style="cursor: pointer;font-size: 13px;color: #656161;"><?php echo ($sub_menu['title']); ?></a>
  153. </li>
  154. </ul>
  155. <?php } ?>
  156. <?php if( !empty($sub_menu['items']) ){ ?>
  157. <!--<ul style="<?php if( $menu['route'] == 'config/index' ){ ?>display: none;<?php }else{ ?>display: block;<?php } ?>">-->
  158. <ul style="display: block;">
  159. <?php foreach($sub_menu['items'] as $third_sub_menu){ ?>
  160. <li class="" data-class="active">
  161. <a lay-href="<?php echo U($third_sub_menu['route']);?>" style="cursor: pointer;"><cite style="font-size:12px;padding-left: 10px;" ><?php echo ($third_sub_menu['title']); ?></cite></a>
  162. </li>
  163. <?php } ?>
  164. </ul>
  165. <?php } ?>
  166. <?php } ?>
  167. </div>
  168. <?php } ?>
  169. <?php $i++; } ?>
  170. </div>
  171. <!--二级菜单end-->
  172. <div class="new-iframe">
  173. <?php if( empty($perm_url) || $perm_url == '/' ){ ?>
  174. <iframe src="<?php echo U('index/analys', array('ok' => 1)); ?>" frameborder="0" class="layadmin-iframe"></iframe>
  175. <?php }else{ ?>
  176. <iframe src="<?php echo U( $perm_url, array('ok' => 1)); ?>" frameborder="0" class="layadmin-iframe"></iframe>
  177. <?php } ?>
  178. </div>
  179. </div>
  180. </div>
  181. <!--内容体end-->
  182. </div>
  183. </div>
  184. <style>
  185. .layui-side-menu .layui-nav .layui-nav-item > a{
  186. padding-top: 4px;
  187. padding-bottom: 4px;
  188. }
  189. .layui-layout-admin .layui-side{width: 120px;}
  190. .layui-side-menu .layui-side-scroll {width: 120px;}
  191. .index-inner-container {
  192. position: absolute;
  193. left: 0;
  194. top: 0;
  195. right: -17px;
  196. bottom: 0;
  197. overflow-x: hidden;
  198. overflow-y: scroll;
  199. }
  200. .layui-layout-admin .layui-logo {
  201. position: fixed;
  202. left: 0;
  203. top: 0;
  204. z-index: 1002;
  205. width: 120px;
  206. height: 65px;
  207. padding: 0 15px;
  208. box-sizing: border-box;
  209. overflow: hidden;
  210. font-weight: 300;
  211. background-repeat: no-repeat;
  212. background-position: center center;
  213. }
  214. .layui-side-menu .layui-nav {
  215. width: 120px;
  216. margin-top: 65px;
  217. background: 0 0;
  218. }
  219. .snailfishicon{
  220. position: absolute;
  221. top: 32%;
  222. left: 20px;
  223. font-size: 16px;
  224. }
  225. .layadmin-pagetabs, .layui-layout-admin .layui-body, .layui-layout-admin .layui-footer, .layui-layout-admin .layui-layout-left {
  226. left: 120px;
  227. }
  228. .new-iframe {
  229. position: absolute;
  230. left: 0;
  231. top: 0;
  232. bottom: 0;
  233. right: 0;
  234. overflow-x: auto;
  235. overflow-y: hidden;
  236. }
  237. .sub-nav-show .new-iframe {
  238. left: 126px;
  239. }
  240. .sub-nav {
  241. width: 115px;
  242. background-color: #fff;
  243. position: absolute;
  244. z-index: 998;
  245. left: 0;
  246. top: 0;
  247. bottom: 0;
  248. overflow-y: auto;
  249. display: none;
  250. box-shadow: 2px 0 2px rgba(0,0,0,.05);
  251. }
  252. .sub-nav-show .sub-nav {
  253. display: block;
  254. }
  255. .nav-new {
  256. display: none;
  257. }
  258. .sub-nav-show .sub-nav .nav-new.layui-this {
  259. display: block;
  260. }
  261. .one-nav {
  262. border-bottom: 1px solid #e3e2e5;
  263. padding: 12px 0;
  264. }
  265. .one-nav:last-child {
  266. border-bottom: 0;
  267. }
  268. .one-nav .dt {
  269. font-weight: 700;
  270. }
  271. .one-nav a {
  272. color: #595959;
  273. line-height: 32px;
  274. display: block;
  275. cursor: pointer;
  276. }
  277. .dd p {
  278. margin: 0 -10px 5px;
  279. }
  280. .dd p a {
  281. padding: 0 10px;
  282. font-size: 13px;
  283. }
  284. .dd p.layui-this a, .dd p a:hover {
  285. background-color: #E9EAF0;
  286. border-radius: 3px;
  287. }
  288. .layui-layout-admin .layui-body {
  289. position: fixed;
  290. top: 60px;
  291. }
  292. .layui-layout-admin .layui-body {
  293. top: 50px;
  294. }
  295. .wb-subnav .subnav-scene {
  296. overflow: hidden;
  297. height: 78px;
  298. line-height: 78px;
  299. padding-left: 20px;
  300. }
  301. .menu-header {
  302. line-height: 50px;
  303. height: 50px;
  304. /* border-top: 1px solid #f4f4f4; */
  305. cursor: pointer;
  306. padding-left: 5px;
  307. }
  308. .fa {
  309. display: inline-block;
  310. font: normal normal normal 14px/1 FontAwesome;
  311. font-size: inherit;
  312. text-rendering: auto;
  313. -webkit-font-smoothing: antialiased;
  314. -moz-osx-font-smoothing: grayscale;
  315. }
  316. .menu-icon {
  317. width: 20px;
  318. height: 50px;
  319. float: left;
  320. text-align: center;
  321. font-size: 8px;
  322. color: #666;
  323. line-height: 50px;
  324. }
  325. .fa-caret-down:before {
  326. content: "\f0d7";
  327. }
  328. :after, :before {
  329. -webkit-box-sizing: border-box;
  330. -moz-box-sizing: border-box;
  331. box-sizing: border-box;
  332. }
  333. .wb-subnav ul {
  334. display: none;
  335. overflow: hidden;
  336. }
  337. .wb-subnav ul li {
  338. height: 50px;
  339. line-height: 50px;
  340. font-size: 12px;
  341. cursor:pointer;
  342. }
  343. .wb-subnav ul li.active, .wb-subnav ul li:hover {
  344. background: #edf6ff;
  345. }
  346. .wb-subnav ul a {
  347. padding-left: 25px;
  348. height: 100%;
  349. width: 100%;
  350. }
  351. .wb-subnav ul li a {
  352. color: #7c838a;
  353. }
  354. .wb-subnav ul li.active a {
  355. color: #009688;
  356. }
  357. .layadmin-side-shrink .layui-side {
  358. left: 0;
  359. width: 60px;
  360. }
  361. </style>
  362. <script src="/layuiadmin/layui/layui.js"></script>
  363. <script src="/static/js/jquery-ui.min.js"></script>
  364. <script>
  365. layui.config({
  366. base: '/layuiadmin/' //静态资源所在路径
  367. }).extend({
  368. index: 'lib/index' //主入口模块
  369. }).use('index');
  370. </script>
  371. <audio id="musicClick" src="/static/mp3/click.mp3" preload="auto"></audio>
  372. <script>
  373. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  374. var layer = layui.layer;
  375. var $;
  376. var par_index = 0;
  377. var cur_open_div;
  378. var form;
  379. layui.use(['jquery', 'layer','form'], function(){
  380. $ = layui.$;
  381. setInterval( function() {
  382. order_distribution();
  383. },3000);
  384. function order_distribution() {
  385. $.ajax({
  386. url:"<?php echo U('index/order_distribution');?>",
  387. type:'get',
  388. data:{},
  389. dataType:'json',
  390. success:function(ret){
  391. if(ret.no_send > 0)
  392. {
  393. $('#orderdistribution').show();
  394. $("#distributionnotice").html(ret.no_send);
  395. }else{
  396. $("#orderdistribution").hide();
  397. $("#distributionnotice").html(0);
  398. }
  399. }
  400. })
  401. }
  402. setInterval( function() {
  403. $.getJSON("<?php echo "index.php?s=/Cron/index"; ?>");
  404. },10000);
  405. var i = 0;
  406. var y = 0
  407. setInterval(notice,10000);
  408. function notice() {
  409. $.ajax({
  410. url:"<?php echo U('index/order_count');?>",
  411. type:'get',
  412. data:{},
  413. dataType:'json',
  414. success:function(ret){
  415. if(ret.resultCode == 200 && ret.data > 0 && ret.voice_notice == 1)
  416. {
  417. if(i<3){
  418. $('#neworder').show();
  419. $("#notice").html(ret.data);
  420. $("#musicClick")[0].play();
  421. i++;
  422. y = ret.data ;
  423. }else{
  424. $('#neworder').show();
  425. $("#notice").html(ret.data);
  426. if( y < ret.data ){
  427. i = 0;
  428. }
  429. }
  430. var url = "";
  431. if(ret.order_type == 'pintuan'){
  432. url = "<?php echo U('group/orderlist'); ?>";
  433. $('#neworder').find('a').attr('data-href',url);
  434. }else if(ret.order_type == 'integral'){
  435. url = "<?php echo U('points/order'); ?>";
  436. $('#neworder').find('a').attr('data-href',url);
  437. }
  438. }else{
  439. $("#neworder").hide();
  440. $("#notice").html(0);
  441. i = 0;
  442. }
  443. }
  444. })
  445. }
  446. <?php if(is_seller_login() == 1){ ?>
  447. setInterval( function() {
  448. //check_lionfish_comshop_upgrade();
  449. },10000);
  450. function check_lionfish_comshop_upgrade() {
  451. $.post('<?php echo U("system/upgrade_check");?>', function (ret) {
  452. if (ret && ret.status == '1') {
  453. var result = ret.result;
  454. if (result.filecount > 0 || result.database || result.upgrades) {
  455. $('#new_msg').show();
  456. $('#new_msg_tip').html('点击升级新版本:'+ result.version);
  457. }
  458. }
  459. }, 'json');
  460. }
  461. <?php } ?>
  462. $('.layui-side-scroll .layui-nav-item a').click(function(){
  463. var url = $(this).attr('lay-href');
  464. console.log( $.trim($(this).text()) );
  465. if( url == undefined )
  466. {
  467. var _cur_text = $.trim($(this).text());
  468. if( _cur_text == '应用' )
  469. {
  470. $('.new-iframe').css('left','0px');
  471. $('.sub-nav').hide();
  472. $('.layadmin-iframe').attr('src', "<?php echo U('application/index'); ?>");
  473. }else{
  474. $('.new-iframe').css('left','125px');
  475. $('.sub-nav').show();
  476. var s_index = $(this).parent().index()-1;
  477. par_index = s_index;
  478. $('.wb-subnav').eq(s_index).addClass('layui-this').siblings().removeClass('layui-this');
  479. var s_u = $('.wb-subnav').eq(s_index).children('ul:first');
  480. $('.wb-subnav li').removeClass('active');
  481. if( !$(s_u).children('li:first').hasClass('active') )
  482. {
  483. $(s_u).children('li:first').addClass('active');
  484. }
  485. var s_a = $(s_u).children('li:first').children('a:first');
  486. var s_url = $(s_a).attr('lay-href');
  487. $('.layadmin-iframe').attr('src', s_url);
  488. }
  489. }else{
  490. var s_index = $(this).parent().parent().index()-1;
  491. par_index = s_index+1;
  492. console.log(12);
  493. }
  494. })
  495. $('#neworder a').click(function(event){
  496. var s_url = $(this).attr('data-href');
  497. $('.layadmin-iframe').attr('src', s_url);
  498. })
  499. $('.wb-subnav li a').click(function(event){
  500. var s_url = $(this).attr('lay-href');
  501. $('.layadmin-iframe').attr('src', s_url);
  502. })
  503. $('#update_urlevent').click(function(event){
  504. var s_url = $(this).attr('lay-href');
  505. $('.layadmin-iframe').attr('src', s_url);
  506. })
  507. $('.wb-subnav li').click(function(event){
  508. $('.wb-subnav li').removeClass('active')
  509. $(this).addClass('active');
  510. $('.layui-side-scroll .layui-nav-item').eq(par_index).addClass('layui-this').siblings().removeClass('layui-this');
  511. var s_url = $(this).children('a').attr('lay-href');
  512. $('.layadmin-iframe').attr('src', s_url);
  513. event.stopPropagation();
  514. })
  515. $('.menu-header').click(function(){
  516. if( $(this).hasClass('active') )
  517. {
  518. //关闭 向右
  519. $(this).children('.layui-icon').html('&#xe623;');
  520. $(this).next().hide();
  521. $(this).removeClass('active');
  522. }else{
  523. //开启 向下
  524. $(this).children('.layui-icon').html('&#xe625;');
  525. $(this).next().show();
  526. $(this).addClass('active');
  527. }
  528. })
  529. })
  530. </script>
  531. </body>
  532. </html>