index.html 11 KB

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