huangdong 6 years ago
parent
commit
b5d8271094
3 changed files with 16 additions and 32 deletions
  1. 13 31
      helper/room/room_info.php
  2. 1 1
      helper/room/util.php
  3. 2 0
      mobile/templates/default/talk/homepage.php

+ 13 - 31
helper/room/room_info.php

@@ -49,40 +49,22 @@ class room_info
         return $this->mParams['tmp_name'];
     }
 
-    public function format($mode = 'fast')
+    public function format()
     {
         $ret = [];
 
-        if($mode == 'fast')
-        {
-            $ret['room_id'] = $this->room_id();
-            $ret['type']    = $this->type();
-            $ret['name']    = $this->name();
-            $ret['tmp_name'] = $this->tmp_name();
-            $ret['avatar'] = $this->avatar();
-            $ret['users'] = $this->user_count();
-
-            return $ret;
-        }
-        elseif($mode == 'all')
-        {
-            $ret['room_id'] = $this->room_id();
-            $ret['type']    = $this->type();
-            $ret['name']    = $this->name();
-            $ret['tmp_name'] = $this->tmp_name();
-            $ret['avatar'] = $this->avatar();
-            $ret['users']  = $this->user_count();
-            $ret['max_user']    = $this->max_user();
-            $ret['room_time']    = $this->room_time();
-            $ret['creator']    = $this->creator();
-            $ret['owner']    = $this->owner();
-            $ret['owner_name']    = $this->owner_name();
-
-            return $ret;
-        }
-    }
-
-    public function fast_format(){
+        $ret['room_id'] = $this->room_id();
+        $ret['type']    = $this->type();
+        $ret['name']    = $this->name();
+        $ret['tmp_name'] = $this->tmp_name();
+        $ret['avatar'] = $this->avatar();
+        $ret['users']  = $this->user_count();
+        $ret['max_user']    = $this->max_user();
+        $ret['room_time']    = $this->room_time();
+        $ret['creator']    = $this->creator();
+        $ret['owner']    = $this->owner();
+        $ret['owner_name']    = $this->owner_name();
 
+        return $ret;
     }
 }

+ 1 - 1
helper/room/util.php

@@ -405,7 +405,7 @@ class talks_helper
         //if(empty($room) || $room['type'] !=proto_type::room_chat) return false;
 
         $info = new room_info($room);
-        $room_base = $info->format('all');
+        $room_base = $info->format();
         $room_base['name'] =  $room_base['name']?$room_base['name']:$this->room_tmp_name($room_base);
         $owner = $room_base['owner'];
         $isManager = $owner == $user?true:false;

+ 2 - 0
mobile/templates/default/talk/homepage.php

@@ -15,6 +15,8 @@
     <div class="group_info">
         <?php $output['tpl']->show_group_header();?>
     </div>
+
+
     <div class="group_handle weui-flex">
         <div class="weui-flex__item group_sport">
             <img src="<?php echo RESOURCE_SITE_URL; ?>/mobile/talk/images/group_sport.png" alt="">