ss 1 year ago
parent
commit
bfa2a09ed3

+ 4 - 0
application/admin/controller/Index.php

@@ -1233,9 +1233,13 @@ class Index extends Auth
     public function indexsub(){
         $curmenu = input('curmenu',500);
         $menuId = input('menuId',0);
+
         $this->assign('curmenu',$curmenu);
         $this->assign('menuId',$menuId);
 
+        $curmenuId = input('curmenuId',0);
+        $this->assign('curmenuId',$curmenuId);
+
         $menuInfo =  Db::name('menu')->where('id',$curmenu)->find();
         $menuTitle = $menuInfo['title'];
         $menuTitle1 = $menuTitle2 = '';

+ 2 - 1
application/admin/view/index/index.html

@@ -492,7 +492,8 @@
                                 </a>
                             </div>
                             <div class="col-xs-12" style="padding: 0 5px!important;">
-                                <a href="http://gyjk.jya-tech.com/admin/camera/index.html" target="_blank">
+
+                                <a href="{:url('index/indexsub',['curmenu'=>1,'menuId'=>41,'curmenuId'=>503,'ct'=>1])}">
                                     <div class="tj-info2">
                                         视频监控
                                     </div>

+ 24 - 4
application/admin/view/index/indexsub.html

@@ -802,6 +802,9 @@
 
     var curmenu = {:json_encode($curmenu)};
     var menuId = {:json_encode($menuId)};
+
+    var curmenuId = {:json_encode($curmenuId)};
+
     $(function (){
         if(curmenu == 500){
             $('.gyindexsub-menu-list-box').css('display','none');
@@ -826,8 +829,16 @@
                                 aaaa = submenulistaa[a].child;
                                 if(aaaa.length > 0){
                                     for (let z in aaaa){
-                                        menuurl2 = aaaa[0].url;
-                                        firstmenuid = aaaa[0].id;
+                                        if(aaaa[z].id == curmenuId){
+                                            menuurl2 = aaaa[z].url;
+                                            firstmenuid = aaaa[z].id;
+                                            $('#threebreadcrumbs').html(aaaa[z].title);
+                                            break;
+                                        }else{
+                                            menuurl2 = aaaa[0].url;
+                                            firstmenuid = aaaa[0].id;
+                                        }
+
                                     }
                                 }
                                 break;
@@ -863,10 +874,12 @@
                     str += '<div class="sub">';
                     let ftitle = menusublist[i].title;
                     if(childList.length >0){
+
                         for (let o in childList){
                             str += '<a href="javascript:;">';
                             str += '<div class="sub-list endmenuactive'+childList[o].id+'" data-url="'+childList[o].url+'"  data-id="'+menusublist[i].id+'" data-title="'+childList[o].title+'" data-ftitle="'+ftitle+'" onclick="changeEndSubMenu(this,1)">'+childList[o].title+'</div>';
                             str += '</a>';
+
                         }
                     }
                     str += '</div>';
@@ -887,10 +900,17 @@
 
             let menustr = '<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="'+menuurl2+'" frameborder="0" data-id="'+menuurl2+'" seamless id="def2breadcrumbs"></iframe>';
             $('#gy-main-iframe-menu').html(menustr);
-
-            if(firstmenuid){
+            console.log(curmenuId)
+            console.log(firstmenuid,'xxxxxxxxxxxxxx')
+            if(curmenuId > 0 ){
                 $('.endmenuactive'+firstmenuid).addClass('cur');
+            }else{
+                if(firstmenuid){
+                    $('.endmenuactive'+firstmenuid).addClass('cur');
+                }
             }
+
+
         }
 
 

+ 4 - 10
application/api/controller/screen/Index.php

@@ -17,9 +17,8 @@ class Index extends Controller
         parent::initialize();
 
         $token = input('token','','trim');
-
-//        $str = think_decrypt($token);
-        $str = '1|3';
+        $str = think_decrypt($token);
+//        $str = '1|3';
         $data = $str?explode('|',$str):[];
         if(count($data) != 2){
             HelpHander::error('参数错误');
@@ -69,13 +68,8 @@ class Index extends Controller
     }
 
     public function getMonitor(){
-        $list = Db::name('monitor')
-            ->where('org_id',$this->orgId)
-            ->where('del',0)
-            ->where('enable',0)
-            ->limit(10)
-            ->order('id desc')
-            ->select();
+        $list = model('Monitor')->getMonitors($this->orgId,10);
+
         $data = [
             'info'=>isset($list[0])?$list[0]:null,
             'info1'=>isset($list[1])?$list[1]:null,