|
@@ -6,6 +6,9 @@
|
|
|
author:rabin
|
|
|
"""
|
|
|
from __load__ import *
|
|
|
+import matplotlib.pyplot as plt
|
|
|
+import matplotlib.image as mpimg
|
|
|
+import numpy as np
|
|
|
|
|
|
class index_path(Load):
|
|
|
"""
|
|
@@ -128,4 +131,15 @@ class msg_path(Load):
|
|
|
update['status'] = True
|
|
|
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)
|