正在显示
2 个修改的文件
包含
5 行增加
和
1 行删除
@@ -70,7 +70,7 @@ class GroupModel extends Model | @@ -70,7 +70,7 @@ class GroupModel extends Model | ||
70 | public function getFriendsInfo($group_id){ | 70 | public function getFriendsInfo($group_id){ |
71 | $map['t.delete_time']=null; | 71 | $map['t.delete_time']=null; |
72 | $map['t.group_id']=$group_id; | 72 | $map['t.group_id']=$group_id; |
73 | - | 73 | + $user_id= cmf_get_current_user_id(); |
74 | $info=db('group_text') | 74 | $info=db('group_text') |
75 | ->alias('t') | 75 | ->alias('t') |
76 | ->field('u.avatar,u.user_login,t.*,t.id as text_id') | 76 | ->field('u.avatar,u.user_login,t.*,t.id as text_id') |
@@ -82,6 +82,7 @@ class GroupModel extends Model | @@ -82,6 +82,7 @@ class GroupModel extends Model | ||
82 | ->toArray(); | 82 | ->toArray(); |
83 | foreach ($info as $k=>$v){ | 83 | foreach ($info as $k=>$v){ |
84 | $info[$k]['like']=$this->getLIke($v['text_id']); | 84 | $info[$k]['like']=$this->getLIke($v['text_id']); |
85 | + $info[$k]['is_like']=in_array($user_id,$info[$k]['like']); | ||
85 | $info[$k]['comment']=$this->getComment($v['text_id']); | 86 | $info[$k]['comment']=$this->getComment($v['text_id']); |
86 | } | 87 | } |
87 | return $info; | 88 | return $info; |
@@ -58,6 +58,7 @@ | @@ -58,6 +58,7 @@ | ||
58 | <div> | 58 | <div> |
59 | <div class='list_content'>{$v.content}</div> | 59 | <div class='list_content'>{$v.content}</div> |
60 | <switch name="v.pic_num"> | 60 | <switch name="v.pic_num"> |
61 | + | ||
61 | <case value="1"> | 62 | <case value="1"> |
62 | <div class='list_img_box'> | 63 | <div class='list_img_box'> |
63 | <volist name="pic.photos" id="vo"> | 64 | <volist name="pic.photos" id="vo"> |
@@ -65,6 +66,7 @@ | @@ -65,6 +66,7 @@ | ||
65 | </volist> | 66 | </volist> |
66 | </div> | 67 | </div> |
67 | </case> | 68 | </case> |
69 | + | ||
68 | <case value="4"> | 70 | <case value="4"> |
69 | <div class='list_img_box'> | 71 | <div class='list_img_box'> |
70 | <volist name="pic.photos" id="vo"> | 72 | <volist name="pic.photos" id="vo"> |
@@ -80,6 +82,7 @@ | @@ -80,6 +82,7 @@ | ||
80 | </volist> | 82 | </volist> |
81 | </div> | 83 | </div> |
82 | </case> | 84 | </case> |
85 | + | ||
83 | </switch> | 86 | </switch> |
84 | 87 | ||
85 | </div> | 88 | </div> |
-
请 注册 或 登录 后发表评论