From 7cd0ba27c69d5db7ce97141d55c801d3df51539d Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 5 May 2017 18:03:50 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E7=B2=89?= =?UTF-8?q?=E4=B8=9D=E9=BB=91=E5=90=8D=E5=8D=95=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/controller/Fans.php | 23 +++++++++++++++++ application/wechat/view/fans.index.html | 34 ++++++++++++++++++++++--- 2 files changed, 53 insertions(+), 4 deletions(-) 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}