dever 4 лет назад
Родитель
Сommit
af7b24d7e2
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      app/user/src/Api.php

+ 9 - 0
app/user/src/Api.php

@@ -20,15 +20,24 @@ class Api extends Core
         # 获取合集扩展信息
         $data['user'] = $this->getUser($this->uid, $this->id);
 
+        # 有多少余额
         $score = Dever::load('score/lib/core')->getUserScore($this->uid);
         if ($score) {
             $data['num'][0] = array('¥' . $score['score'], '', $score['name']);
         }
+
+        # 有多少积分
         $score = Dever::load('score/lib/core')->getUserScore($this->uid, $info['score_id'], 'collection/info', $info['id']);
         if ($score) {
             $data['num'][1] = array($score['score'], '', $score['name']);
         }
 
+        # 有多少门票
+        $ticket = Dever::load('user/lib/ticket')->check($this->uid, $info['id']);
+        if ($ticket) {
+            $data['num'][2] = array($ticket['num'], '', $info['ticket_name']);
+        }
+
         //$data['num'][2] = array('10', '', '好友');
         //$data['num'][3] = array('30', '', '动态');