dever 6 år sedan
förälder
incheckning
bb14135c0e
1 ändrade filer med 8 tillägg och 1 borttagningar
  1. 8 1
      main/src/User.php

+ 8 - 1
main/src/User.php

@@ -38,7 +38,10 @@ class User extends Core
             $this->data['user']['score'] = $score_num;
 
             # 查看当前用户的消息
-            $this->data['user_msg'] = Dever::load('message/lib/data')->num($this->data['uid'], $this->data['system']);
+            if ($this->data['system'] == 1) {
+                $this->data['user_msg'] = Dever::load('message/lib/data')->num($this->data['uid'], $this->data['system']);
+            }
+            
         }
 
         return $this->data;
@@ -47,6 +50,10 @@ class User extends Core
     # 我的消息页面
     public function my_msg()
     {
+        if ($this->data['system'] != 1) {
+            $this->data['msg'] = array();
+            return $this->data;
+        }
         $this->data['msg'] = Dever::load('message/lib/data')->read($this->data['uid'], false, true, false, $this->data['system']);
 
         if ($this->data['msg']) {