01883b97b5d9a9559eff5f77c537fb11.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  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. <div class="layui-header">
  27. <!-- 头部区域 -->
  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="侧边伸缩">
  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. </ul>
  40. <?php $version_info = M('lionfish_comshop_config')->where( array('name' => 'site_version') )->find(); $version = $version_info['value']; ?>
  41. <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
  42. <li id="neworder" style="display:none;" class="layui-nav-item layui-hide-xs" lay-unselect >
  43. <a lay-href="<?php echo U('order/index');?>" >
  44. <span style="margin: -4px -15px 0;"></span>
  45. 新订单<span id="notice"><?php echo ($order_count); ?></span>条
  46. </a>
  47. </li>
  48. <li id="orderdistribution" style="display:none;" class="layui-nav-item layui-hide-xs" lay-unselect>
  49. <a href="javascript:void(0)">
  50. <span style="margin: -4px -15px 0;"></span>
  51. 发配送员消息<span id="distributionnotice" style="color:red;"></span>条
  52. </a>
  53. </li>
  54. <li class="layui-nav-item layui-hide-xs" lay-unselect >
  55. <a href="<?php echo U('index/index', array('is_new' => 1) );?>" >
  56. <span class="layui-badge-dot" style="margin: -4px -15px 0;"></span>
  57. 切换新版后台
  58. </a>
  59. </li>
  60. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  61. <a href="javascript:;" layadmin-event="theme">
  62. <i class="layui-icon layui-icon-theme"></i>
  63. </a>
  64. </li>
  65. <?php if (!defined('ROLE') || ROLE != 'agenter' ) {?>
  66. <li class="layui-nav-item layui-hide-xs" lay-unselect >
  67. <font style="color:#009688;">
  68. 当前社区团购版本18.0
  69. </font>
  70. </li>
  71. <!-- <li class="layui-nav-item" lay-unselect id="new_msg" style="">
  72. <a lay-href="<?php echo U('index/updatelog'); ?>" layadmin-event="message" lay-text="更新日志" >
  73. <font style="color:#009688;">更新日志</font>
  74. </a>
  75. </li> -->
  76. <?php } ?>
  77. <li class="layui-nav-item" lay-unselect>
  78. <a href="javascript:;">
  79. <cite><?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'); } ?></cite>
  80. </a>
  81. <dl class="layui-nav-child" >
  82. <dd ><a href="<?php echo U('Public/logout');?>">退出</a></dd>
  83. </dl>
  84. </li>
  85. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  86. <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
  87. </li>
  88. </ul>
  89. </div>
  90. <?php $sysmenus = D('Seller/menu')->getMenu(true); ?>
  91. <!-- 侧边菜单 -->
  92. <div class="layui-side layui-side-menu">
  93. <div class="layui-side-scroll">
  94. <div class="layui-logo" lay-href="<?php echo U('index/analys');?>">
  95. <?php $shoplogo = D('Home/Front')->get_config_by_name('shoplogo'); ?>
  96. <?php if( empty($shoplogo) ){ ?>
  97. <img class="layui-circle" src="/static/images/default-pic.jpg" height="46px" width="46px">
  98. <?php }else{ ?>
  99. <img class="layui-circle" src="<?php echo tomedia($shoplogo);?>" height="46px" width="46px">
  100. <?php } ?>
  101. </div>
  102. <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
  103. <?php $i =0; foreach($sysmenus['menu'] as $key => $menu){ ?>
  104. <li data-name="<?php echo $key; ?>" class="wb-nav layui-nav-item <?php if($i ==0){ ?>layui-nav-itemed<?php } ?>">
  105. <a href="javascript:;" <?php if( !empty($menu['route']) ){ ?>lay-href="<?php echo U($menu['route']);?>"<?php } ?> d-r="<?php echo ($menu['route']); ?>" lay-tips="<?php echo ($menu['text']); ?>" lay-direction="2">
  106. <i class=" snailfishicon snailfishicon-<?php echo ($menu['icon']); ?>"></i>
  107. <cite style="font-size:15px" ><?php echo ($menu['text']); ?></cite>
  108. </a>
  109. <?php if(!empty($menu['items'])){ ?>
  110. <?php foreach($menu['items'] as $sub_menu){ ?>
  111. <dl class="layui-nav-child">
  112. <dd data-name="<?php echo ($sub_menu['title']); ?>" >
  113. <a href="javascript:;" <?php if( !empty($sub_menu['route']) ){ ?>lay-href="<?php echo U($sub_menu['route']);?>"<?php } ?>><cite style="font-weight:bold;"><?php echo ($sub_menu['title']); ?></cite></a>
  114. <?php if( !empty($sub_menu['items']) ){ ?>
  115. <dl class="layui-nav-child">
  116. <?php foreach($sub_menu['items'] as $third_sub_menu){ ?>
  117. <dd data-name="list"><a lay-href="<?php echo U($third_sub_menu['route']);?>"><cite style="font-size:13px" ><?php echo ($third_sub_menu['title']); ?></cite></a></dd>
  118. <?php } ?>
  119. </dl>
  120. <?php } ?>
  121. </dd>
  122. </dl>
  123. <?php } ?>
  124. <?php } ?>
  125. </li>
  126. <?php $i++; } ?>
  127. </ul>
  128. </div>
  129. </div>
  130. <!-- 页面标签 -->
  131. <div class="layadmin-pagetabs" id="LAY_app_tabs">
  132. <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
  133. <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
  134. <div class="layui-icon layadmin-tabs-control layui-icon-down">
  135. <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
  136. <li class="layui-nav-item" lay-unselect>
  137. <a href="javascript:;"></a>
  138. <dl class="layui-nav-child layui-anim-fadein">
  139. <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
  140. <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
  141. <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
  142. </dl>
  143. </li>
  144. </ul>
  145. </div>
  146. <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
  147. <ul class="layui-tab-title" id="LAY_app_tabsheader">
  148. <li lay-id="<?php echo U('index/index'); ?>" lay-attr="<?php echo U('index/index'); ?>" class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
  149. </ul>
  150. </div>
  151. </div>
  152. <!-- 主体内容 -->
  153. <div class="layui-body" id="LAY_app_body">
  154. <div class="layadmin-tabsbody-item layui-show">
  155. <?php if( empty($perm_url) || $perm_url == '/'){ ?>
  156. <iframe src="<?php echo U('index/analys', array('ok' => 1)); ?>" frameborder="0" class="layadmin-iframe"></iframe>
  157. <?php }else{ ?>
  158. <iframe src="<?php echo U( $perm_url, array('ok' => 1)); ?>" frameborder="0" class="layadmin-iframe"></iframe>
  159. <?php } ?>
  160. </div>
  161. </div>
  162. <!-- 辅助元素,一般用于移动设备下遮罩 -->
  163. <div class="layadmin-body-shade" layadmin-event="shade"></div>
  164. </div>
  165. </div>
  166. <script src="/layuiadmin/layui/layui.js"></script>
  167. <script src="/static/js/jquery-ui.min.js"></script>
  168. <script>
  169. layui.config({
  170. base: '/layuiadmin/' //静态资源所在路径
  171. }).extend({
  172. index: 'lib/index' //主入口模块
  173. }).use('index');
  174. </script>
  175. <audio id="musicClick" src="/static/mp3/click.mp3" preload="auto"></audio>
  176. <script>
  177. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  178. var layer = layui.layer;
  179. var $;
  180. var cur_open_div;
  181. var form;
  182. layui.use(['jquery', 'layer','form'], function(){
  183. $ = layui.$;
  184. setInterval( function() {
  185. order_distribution();
  186. },3000);
  187. function order_distribution() {
  188. $.ajax({
  189. url:"<?php echo U('index/order_distribution');?>",
  190. type:'get',
  191. data:{},
  192. dataType:'json',
  193. success:function(ret){
  194. if(ret.no_send > 0)
  195. {
  196. $('#orderdistribution').show();
  197. $("#distributionnotice").html(ret.no_send);
  198. }else{
  199. $("#orderdistribution").hide();
  200. $("#distributionnotice").html(0);
  201. }
  202. }
  203. })
  204. }
  205. setInterval( function() {
  206. $.getJSON("<?php echo "index.php?s=/Cron/index"; ?>");
  207. },10000);
  208. var i = 0;
  209. var y = 0
  210. setInterval(notice,10000);
  211. function notice() {
  212. $.ajax({
  213. url:"<?php echo U('index/order_count');?>",
  214. type:'get',
  215. data:{},
  216. dataType:'json',
  217. success:function(ret){
  218. if(ret.resultCode == 200 && ret.data > 0 && ret.voice_notice == 1)
  219. {
  220. if(i<3){
  221. $('#neworder').show();
  222. $("#notice").html(ret.data);
  223. $("#musicClick")[0].play();
  224. i++;
  225. y = ret.data ;
  226. }else{
  227. $('#neworder').show();
  228. $("#notice").html(ret.data);
  229. if( y < ret.data ){
  230. i = 0;
  231. }
  232. }
  233. var url = "";
  234. if(ret.order_type == 'pintuan'){
  235. url = "<?php echo U('group/orderlist'); ?>";
  236. $('#neworder').find('a').attr('lay-href',url);
  237. }else if(ret.order_type == 'integral'){
  238. url = "<?php echo U('points/order'); ?>";
  239. $('#neworder').find('a').attr('lay-href',url);
  240. }
  241. }else{
  242. $("#neworder").hide();
  243. $("#notice").html(0);
  244. i = 0;
  245. }
  246. }
  247. })
  248. }
  249. <?php if( !isset($is_show_notice001) ){ ?>
  250. layer.msg('更新涉及团长提成方式设置,请到“团长”——”团长设置“,查看并设置是否启用“团长等级”提成比例',{time: 10000,
  251. });
  252. <?php } ?>
  253. <?php if(is_seller_login() == 1){ ?>
  254. setInterval( function() {
  255. //check_lionfish_comshop_upgrade();
  256. },10000);
  257. function check_lionfish_comshop_upgrade() {
  258. $.post('<?php echo U("system/upgrade_check");?>', function (ret) {
  259. if (ret && ret.status == '1') {
  260. var result = ret.result;
  261. if (result.filecount > 0 || result.database || result.upgrades) {
  262. $('#new_msg').show();
  263. $('#new_msg_tip').html('点击升级新版本:'+ result.version);
  264. }
  265. }
  266. }, 'json');
  267. }
  268. <?php } ?>
  269. })
  270. </script>
  271. </body>
  272. </html>