dever %!s(int64=6) %!d(string=hai) anos
pai
achega
835436a54f
Modificáronse 1 ficheiros con 18 adicións e 0 borrados
  1. 18 0
      main/src/Journal.php

+ 18 - 0
main/src/Journal.php

@@ -527,6 +527,24 @@ class Journal extends Core
 
 
         $this->data['score'] = Dever::load('act/lib/score')->getList($id);
         $this->data['score'] = Dever::load('act/lib/score')->getList($id);
 
 
+        $this->data['my'] = array();
+        if ($this->data['uid'] && $this->data['score']) {
+            foreach ($this->data['score'] as $k => $v) {
+                if ($v['uid'] == $this->data['uid']) {
+                    $this->data['my'] = $v;
+                    $this->data['my']['pai'] = $k + 1;
+                }
+            }
+        }
+
+        if (!$this->data['my']) {
+            $my = Dever::load('act/lib/score')->getList($id, 4, $this->data['uid']);
+            if ($my) {
+                $this->data['my'] = $my[0];
+                $this->data['my']['pai'] = '50+';
+            }
+        }
+
         # 获取活动说明
         # 获取活动说明
         $this->data['active'] = Dever::db('journal/active')->one(array('id' => $id));
         $this->data['active'] = Dever::db('journal/active')->one(array('id' => $id));