コード例 #1
0
 protected function ajaxExecute(MUser $me, MShop $shop)
 {
     try {
         $category = $shop->allCategories();
     } catch (Exception $e) {
         return MJsonRespond::respondFail('获取店铺分类失败');
     }
     return MJsonRespond::respondSuccess('成功', array('category' => $category));
 }
コード例 #2
0
 protected function dashExecute(MUser $user, MShop $shop)
 {
     $category = $shop->allCategories();
     $catkv = array();
     foreach ($category as $c1) {
         if (isset($c1['nodes'])) {
             foreach ($c1['nodes'] as $node) {
                 $catkv[$node['cid']] = $node['name'];
             }
         }
     }
     $this->assign('category', $catkv);
     $this->pageMod = 'dashboard/shop/itemmanage.tpl.php';
     $this->title = '商品管理';
 }