dever 7 years ago
parent
commit
582bba8cd2
2 changed files with 17 additions and 0 deletions
  1. 7 0
      web/page/origin.py
  2. 10 0
      web/templates/mobile/origin/index.html

+ 7 - 0
web/page/origin.py

@@ -57,6 +57,13 @@ class index_path(Load):
 		if self.data['list']:
 			for key, value in enumerate(self.data['list']):
 				self.data['list'][key]['cdates'] = Demeter.date(value['cdate'], '%Y-%m-%d')
+
+		self.data['pic'] = {}
+		if self.data['info']['pic_id']:
+			self.data['pic'] = self.service('common').one('device_info', id=self.data['info']['pic_id'])
+			if self.data['pic']:
+				self.data['pic']['cdates'] = Demeter.date(self.data['pic']['cdate'], '%Y-%m-%d')
+
 		self.view(self.data['path'] + "origin/index.html")
 
 class work_path(Load):

+ 10 - 0
web/templates/mobile/origin/index.html

@@ -31,6 +31,16 @@
             </dl>
         </section>
     </section>
+    {% if 'pic' in data and data['pic'] %}
+    <section class="m-wrapper">
+        <div >
+            <section class="img-wrap">
+                <img src="{{pic['value']}}" width="100%" />
+                <p style="display:none;">{{pic['cdates']}}</p>
+            </section>
+        </div>
+    </section>
+    {% end %}
     <section class="m-wrapper" id="dever-list">
         <div >
             {% for v in data['list'] %}