| 
					
				 | 
			
			
				@@ -6,16 +6,21 @@ use Dever; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 class Api 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	public function test() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		return Dever::load('poster/api.gets', array('id' => 1)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	public function gets() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return '<img src="' .$this->get('1', 'k1', array 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			'desc' => '吞吞吐吐', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			'pic' => '/www/grow/data/upload/1/2018/07/19/46d5b0c5c25c800cf197ea4f64f503f2.jpg', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			'pic' => 'http://wx.5dev.cn/wechat/data/upload/applet/code/2018/07/25/69_a2a3694c715c67b6823dedff8a7478bd.jpg', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			'name' => '毒贩夫妇付', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		)) . '" />'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public function get($name, $key, $set) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public function get($name, $key, $set, $update = 2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		$where['key'] = $key; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		$template = Dever::db('poster/template')->one($where); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -37,7 +42,7 @@ class Api 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if ($config['param']) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					$result = Dever::load('upload/view')->create($config, $name, 'im'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					$result = Dever::load('upload/view')->create($config, $name, $template['type'], $update); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					return Dever::pic($result); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} 
			 |