|  | @@ -6,6 +6,9 @@
 | 
											
												
													
														|  |  	author:rabin
 |  |  	author:rabin
 | 
											
												
													
														|  |  """
 |  |  """
 | 
											
												
													
														|  |  from __load__ import *
 |  |  from __load__ import *
 | 
											
												
													
														|  | 
 |  | +import matplotlib.pyplot as plt # plt 用于显示图片
 | 
											
												
													
														|  | 
 |  | +import matplotlib.image as mpimg # mpimg 用于读取图片
 | 
											
												
													
														|  | 
 |  | +import numpy as np
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  class index_path(Load):
 |  |  class index_path(Load):
 | 
											
												
													
														|  |  	"""
 |  |  	"""
 | 
											
										
											
												
													
														|  | @@ -128,4 +131,15 @@ class msg_path(Load):
 | 
											
												
													
														|  |  			update['status'] = True
 |  |  			update['status'] = True
 | 
											
												
													
														|  |  			self.service('common').update('msg', id, update, cdate=False)
 |  |  			self.service('common').update('msg', id, update, cdate=False)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -		self.out('yes', self.data)
 |  | 
 | 
											
												
													
														|  | 
 |  | +		self.out('yes', self.data)
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +class qrcode_path(Load):
 | 
											
												
													
														|  | 
 |  | +	@auth
 | 
											
												
													
														|  | 
 |  | +	@Web.setting
 | 
											
												
													
														|  | 
 |  | +	def get(self):
 | 
											
												
													
														|  | 
 |  | +		url = self.input('url')
 | 
											
												
													
														|  | 
 |  | +		url = Demeter.config['front']['qrcode_create'] + url
 | 
											
												
													
														|  | 
 |  | +		data = Demeter.curl(url)
 | 
											
												
													
														|  | 
 |  | +		filename = Demeter.md5(url)
 | 
											
												
													
														|  | 
 |  | +		File.write(filename, data)
 |