作者 sgj

圈子人员设置

... ... @@ -53,7 +53,7 @@ class GroupController extends AdminBaseController
*/
public function index(){
$group=$this->GroupModel->getAllGroup()->toArray();
dump($group);
//dump($group);
$this->assign('group',$group);
return $this->fetch();
}
... ...
... ... @@ -47,12 +47,15 @@ class FriendsController extends WeChatBaseController
if (empty($isin)){
$this->error();
}
$silence=$this->GroupModel->silenceCheck($user_id,$group_id);
$group=$this->GroupModel->getGroup($group_id);
$info=$this->GroupModel->getFriendsInfo($group_id);
$article=$this->GroupModel->getArticleList($group_id)->toArray();
foreach ($article as $k=>$v){
$article[$k]['pic']=cmf_get_image_url(json_decode($v['amore'],true)['thumbnail']);
}
$this->assign('silence',$silence);
$this->assign('info',$info);
$this->assign('group',$group);
$this->assign('article',$article);
... ...
... ... @@ -178,4 +178,21 @@ class GroupModel extends Model
return $article;
}
/**
* 检查是否可用发送朋友圈
* @param $user_id
* @param $group_id
*/
public function silenceCheck($user_id,$group_id){
/*检查是否为版主*/
/*检查是否开启禁言*/
$group=$this->getGroup($group_id);
if ($group['silence']=='0'){
return 0;
}
if ($user_id==$group['owner']){
return 0;
}
return 1;
}
}
\ No newline at end of file
... ...
... ... @@ -31,9 +31,11 @@
<div style="font-size: 0.28rem;">{$group.descripe}</div>
</div>
<div class='content_box' hidden>
<div class="top_btn">
<div class='collect_box'>发动态</div>
</div>
<if condition="$silence==0">
<div class="top_btn">
<div class='collect_box'>发动态</div>
</div>
</if>
<volist name="$info" id="v">
<div class='content_item' >
<div class='left_box'>
... ...