8695018b03cbba6deb8029650a92b57a.php 17 KB

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