| 
					
				 | 
			
			
				@@ -14,13 +14,11 @@ class Journal extends Core 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $cate = array(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if ($id > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $cate = Dever::db('journal/cate')->one($id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $this->data['cate'] = $cate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!$cate) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            Dever::alert('分类错误'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $this->data['cate'] = $cate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $cateList = Dever::db('journal/cate')->getAll(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $this->data['cateList'] = $cateList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return $cate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -35,7 +33,9 @@ class Journal extends Core 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # 小刊列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $where = array(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $where['cate_id'] = $cate['id']; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (isset($cate['id'])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $where['cate_id'] = $cate['id']; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (checkVersion()->journal_buy == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             # 隐藏支付的小刊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //$where['buy'] = 2; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -64,7 +64,10 @@ class Journal extends Core 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # 小刊列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $where = array(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $where['cate_id'] = $cate['id']; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (isset($cate['id'])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $where['cate_id'] = $cate['id']; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $data = Dever::db('journal/info')->getAllByPage($where); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if ($data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             foreach ($data as $k => $v) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -87,6 +90,10 @@ class Journal extends Core 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $cate = $this->getCate(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!$cate) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Dever::alert('错误的信息'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $this->data['push'] = Dever::db('journal/info')->getOne($cate['journal_id']); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $this->data['push'] = $this->ding($this->data['push']); 
			 |