rabin 7 years ago
parent
commit
8f78e40ec0
3 changed files with 6 additions and 6 deletions
  1. 2 2
      conf/dev.conf
  2. 2 2
      conf/env.conf
  3. 2 2
      front/api/farm.py

+ 2 - 2
conf/dev.conf

@@ -65,8 +65,8 @@ max_buffer_size		= 210763776
 ;子进程
 process				= 0
 url					= http://192.168.15.10:8088/device
-;qrcode				= http://192.168.15.10:8088/farm/qrcode?url=
-qrcode				= http://pan.baidu.com/share/qrcode?w=300&h=300&url=
+qrcode				= http://192.168.15.10:8088/farm/qrcode?url=
+;qrcode				= http://pan.baidu.com/share/qrcode?w=300&h=300&url=
 qrcode_create		= http://pan.baidu.com/share/qrcode?w=300&h=300&url=
 
 ;网站前台配置

+ 2 - 2
conf/env.conf

@@ -65,8 +65,8 @@ max_buffer_size		= 210763776
 ;子进程
 process				= 0
 url					= http://api.nongxiaohe.com/device
-;qrcode				= http://api.nongxiaohe.com/farm/qrcode?url=
-qrcode				= http://pan.baidu.com/share/qrcode?w=300&h=300&url=
+qrcode				= http://api.nongxiaohe.com/farm/qrcode?url=
+;qrcode				= http://pan.baidu.com/share/qrcode?w=300&h=300&url=
 qrcode_create		= http://pan.baidu.com/share/qrcode?w=300&h=300&url=
 
 [web]

+ 2 - 2
front/api/farm.py

@@ -138,5 +138,5 @@ class qrcode_path(Load):
 		url = self.input('url')
 		url = Demeter.config['front']['qrcode_create'] + url
 		data = Demeter.curl(url)
-		filename = Demeter.md5(url)
-		File.write(filename, data)
+		self.write(data)
+		self.set_header("Content-type", "image/jpg")