diff --git a/application/wechat/controller/Fans.php b/application/wechat/controller/Fans.php index 91ef40dc1..76b847e69 100644 --- a/application/wechat/controller/Fans.php +++ b/application/wechat/controller/Fans.php @@ -51,6 +51,29 @@ class Fans extends BasicAdmin { return parent::_list($db); } + /** + * 列表数据处理 + * @param type $list + */ + protected function _data_filter(&$list) { + $tags = Db::name('WechatFansTags')->column('id,name'); + foreach ($list as &$vo) { + $vo['tags_list'] = []; + foreach (explode(',', $vo['tagid_list']) as $tag) { + if ($tag !== '' && isset($tags[$tag])) { + $vo['tags_list'][$tag] = $tags[$tag]; + } elseif ($tag !== '') { + $vo['tags_list'][$tag] = $tag; + } + } + } + $this->assign('alert', [ + 'type' => 'success', + 'title' => '开发中', + 'content' => '请稍候...' + ]); + } + /** * 黑名单列表 */ diff --git a/application/wechat/view/fans.index.html b/application/wechat/view/fans.index.html index 55dcf109f..269439a6d 100644 --- a/application/wechat/view/fans.index.html +++ b/application/wechat/view/fans.index.html @@ -80,8 +80,9 @@ 用户昵称 - 性别 - 区域 + 性别 + 标签 + 区域 关注时间 @@ -95,8 +96,33 @@ {$vo.nickname|default="未设置微信昵称"} - {$vo.sex==1?'男':($vo.sex==2?'女':'未知')} - {$vo.country|default='未设置区域信息'}{$vo.province}{$vo.city} + {$vo.sex==1?'男':($vo.sex==2?'女':'未知')} + + {if count($vo.tags_list) < 3} + + + + + {else} + + + + + {/if} + + {if empty($vo.tags_list)} + 尚未设置标签 + {else} + {foreach $vo.tags_list as $k=>$tag} + + {$tag} + + {/foreach} + {/if} + + + {$vo.country|default='未设置区域信息'}{$vo.province}{$vo.city} {$vo.subscribe_at} {/foreach}