Exemplo n.º 1
0
 public function run()
 {
     $params = M::getRoot();
     //组装参数
     $params["scope"] = "sliderbar";
     //指定定查询范围
     //获取菜单数组
     $navarr = FrontMenu::getChildMenu($params);
     $this->render('navbar', array('nav' => $navarr));
 }
Exemplo n.º 2
0
 public function run()
 {
     //获取
     $params = M::getRoot();
     //组装参数
     $params["scope"] = "sliderbar";
     //指定定查询范围
     //获取菜单数组
     $navarr = FrontMenu::getChildMenu($params);
     $service_arr = array('orders' => '订单管理', 'quos' => '查看报价单', 'returns' => '退货管理');
     $dealer_arr = array('orders' => '订单管理', 'quos' => '管理报价单', 'returns' => '退货管理');
     foreach ($navarr as $key => $val) {
         if (Yii::app()->user->isServicer()) {
             if ($val['name'] != '采购管理') {
                 unset($navarr[$key]);
                 continue;
             }
             foreach ($navarr[$key]['children'] as $k => $v) {
                 if ($v['name'] == $service_arr['orders']) {
                     $data['order'] = $v['name'];
                 } else {
                     if ($v['name'] == $service_arr['quos']) {
                         $data['quo'] = $v['name'];
                     } else {
                         if ($v['name'] == $service_arr['returns']) {
                             $data['return'] = $v['name'];
                         }
                     }
                 }
             }
         }
         if (Yii::app()->user->isDealer()) {
             if ($val['name'] != '销售管理') {
                 unset($navarr[$key]);
                 continue;
             }
             foreach ($navarr[$key]['children'] as $k => $v) {
                 if ($v['name'] == $dealer_arr['orders']) {
                     $data['order'] = $v['name'];
                 } else {
                     if ($v['name'] == $dealer_arr['quos']) {
                         $data['quo'] = $v['name'];
                     } else {
                         if ($v['name'] == $dealer_arr['returns']) {
                             $data['return'] = $v['name'];
                         }
                     }
                 }
             }
         }
     }
     $this->render('topnews', array('mesmenu' => $data));
 }
Exemplo n.º 3
0
 public function run()
 {
     //获取是经销商还是服务店菜单
     $params = M::getRoot();
     //组装参数
     $params["scope"] = "sliderbar";
     //指定定查询范围
     //获取菜单数组
     $navarr = FrontMenu::getChildMenu($params);
     foreach ($navarr as $key => $val) {
         if ($val['name'] != '信息管理') {
             unset($navarr[$key]);
             continue;
         }
     }
     $this->render('topNav', array('permenu' => $navarr));
 }
Exemplo n.º 4
0
 public function run()
 {
     //大类子类数据源
     $main = DefaultService::getMainCategorys(0);
     $main = DefaultService::findChild($main, 0);
     $maincate = DefaultService::findsub($main);
     //获取是经销商还是服务店菜单
     $params = M::getRoot();
     //组装参数
     $params["scope"] = "sliderbar";
     //指定定查询范围
     //获取菜单数组
     $navarr = FrontMenu::getChildMenu($params);
     foreach ($navarr as $key => $val) {
         if ($val['name'] != '信息管理') {
             unset($navarr[$key]);
             continue;
         }
     }
     $this->render('topNav', array('MainCategory' => $maincate, 'permenu' => $navarr));
 }