chengxun пре 7 година
родитељ
комит
b804738a96

+ 6 - 0
application/common/view/public/top_view.html

@@ -21,7 +21,13 @@
                         </li>
                     </volist>
                 </notempty>
+                <php>
+                    if(!empty($user_id) && $user_id == 1){
+                </php>
                 <li><a href="{:url('edit/index/index')}">项目管理</a></li>
+                <php>
+                    }
+                </php>
             </ul>
         </div>
     </nav>

+ 2 - 1
application/index/controller/Base.php

@@ -21,7 +21,8 @@ class Base extends Common
             $this->redirect(url('User/login'));
         }
         //权限验证
-        $this->aid=$aid;
+        $this->aid = $aid;
+        $this->assign('user_id',$aid);
         $request=Request::instance();
 //        if (!authCheck($request->module(),$request->controller(),$request->action(),$this->aid))        {
 //            $this->error('你没有权限!');

+ 4 - 1
application/index/controller/Common.php

@@ -13,5 +13,8 @@ use think\Controller;
 
 class Common extends Controller
 {
-
+    public function _initialize()
+    {
+        parent::_initialize();
+    }
 }