/**
  * 添加分类
  */
 public function cateAction()
 {
     if (ComTool::isAjax()) {
         $group = $this->post('group');
         $store = $this->post('store');
         $level = $this->post('level');
         $parent = $this->post('parent');
         $name = $this->post('name');
         $ename = $this->post('ename');
         $desc = $this->post('desc');
         $limit = $this->post('limit');
         $days = $this->post('day');
         $start = $this->post('start');
         $end = $this->post('end');
         $orderway = $this->post('orderway');
         $status = $this->post('status');
         $deliver_desc = $this->post('deliver_desc');
         $data = array();
         $data['group_id'] = $group;
         $data['store_id'] = $store;
         $data['level'] = $level;
         $data['pid'] = $parent;
         $data['name'] = $name;
         $data['ename'] = $ename;
         $data['desc'] = $desc;
         $data['create_time'] = time();
         $data['update_time'] = time();
         $data['time_limit'] = $limit;
         $data['days'] = $days;
         $data['start_time'] = $start;
         $data['end_time'] = $end;
         $data['order_way'] = $orderway;
         $data['status'] = $status;
         $data['deliver_desc'] = $deliver_desc;
         $res = CategoryData::add($data);
         ComTool::result($res, '失败', '成功');
     }
     $parentCats = CategoryData::getParents();
     $allCats = CategoryData::getsAll();
     $groups = GroupData::getsAll();
     $stores = StoreData::getsAll();
     $this->assign('parentCats', $parentCats);
     $this->assign('allCats', $allCats);
     $this->assign('groups', $groups);
     $this->assign('stores', $stores);
     $this->display();
 }