<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<link rel="stylesheet" href="{{ kg['tpl_url'] }}style/fans_list.css">
<script src="{{ kg['tpl_url'] }}script/jquery.min.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{ kg['tpl_url'] }}script/fans_list.js"></script>
</head>
<body data-type="generalComponents">
	{% include 'component_header.tpl' %}
	<div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
		{% include 'component_left.tpl' %}
		<div class="tpl-content-wrapper">
			<div class="tpl-content-page-title">
				微信用户（粉丝）管理
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" class="am-icon-home">首页</a></li>
				<li class="am-active">微信用户（粉丝）管理</li>
			</ol>
			<div class="tpl-portlet-components">
				<div class="portlet-title">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span>&nbsp;微信用户（粉丝）管理
					</div>
					<ul class="list-inline ngsty-boxR">
						<li>
							<div class="am-no-marginbtm am-select-hover  am-no-outline">
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}" name="menu" class="" style="display: none;" id="selected-search">
									<option value="fans_list?group=-1">全部分组</option>
									{% for row in wx_group %}
									<option {% if row['id'] == group %}selected="selected"{% endif %}value="fans_list?{{url['group']}}group={{row['id']}}">{{row['name']}}</option>
									{% endfor %}
								</select>
							</div>
						</li>
						<li>
							<div class="am-select-hover  am-no-outline">
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}" style="display: none;">
									<option value="fans_list?source=0">全部来源（推广二维码）</option>
									{% for row in wx_qrcode %}
									<option {% if row['id'] == source %}selected="selected"{% endif %}value="fans_list?{{url['source']}}source={{row['id']}}">{{row["name"]}}</option>
									{% endfor %}
								</select>
							</div>
						</li>
						<li>
							<div class="portlet-input input-small">
								<form action="" method="get" id="search">
									<div class="input-icon right">
										<i class="am-icon-search log-search"></i>
										<input type="text" class="form-control form-control-solid am-hover ngar-Vxiugai-radius ngco-Alo-Noborder" placeholder="搜索..." name="word" value="{{word}}" id="word">
									</div>
								</form>
							</div>
						</li>
						<li>
							<div class="am-btn-group am-btn-group-xs">
								<a href="fans_list?{{kg['run_start_time'][1]}}" class="am-btn am-btn-secondary ng-add-hightB"><span class="am-icon-search"></span>&nbsp;刷新</a>
								<a class="am-btn am-btn-default am-btn-warning" href="fans_list?action=syn" target="_blank"><span class="am-icon-plus"></span>&nbsp;同步数据</a>
							</div>
						</li>
					</ul>
				</div>
				<div class="tpl-block ngALL-AFenyeFu-marginT none_paddingT none_paddingB">
					<div class="am-g">
						<div class="am-u-sm-12 ngco-No-paddingR">
							<div class="am-alert am-alert-success success-info ngco-No-marginT set_marginB">
								<ul class="margin-bottom-none padding-left-lg">
									<li class="am-verify">
										<span>关注总人数：{{attention['count']}}&nbsp;&nbsp;&nbsp;&nbsp;今日关注人数：{{attention['today']}}&nbsp;&nbsp;&nbsp;&nbsp;最近7天关注人数：{{attention['last7days']}}&nbsp;&nbsp;&nbsp;&nbsp;最近30天关注人数：{{attention["last30days"]}}</span>
									</li>
								</ul>
							</div>
							<form action="" method="post" class="am-form" id="am-form">
								<table class="ngco-Kfubox am-table am-table-striped am-table-hover table-main ngco-Esz-mgibdr">
									<thead>
										<tr>
											<!-- 1 -->
											<th class="table-check">
												<div class="ngjs-ziLi1 ngco-inbl-display"><input type="checkbox" id="all" onclick="kg.select_all(this.form);" class="tpl-table-fz-check" style="margin-top: 0;vertical-align: middle;"></div>
											</th>
											<!-- 2 -->
											<th class="table-id">
												<div class="ngjs-ziLi2 ngco-inbl-display">ID</div>
											</th>
											<!-- 3 -->
											<th class="table-title">
												<div class="ngjs-ziLi3 ngco-inbl-display">用户</div>
											</th>
											<!-- 4 -->
											<th class="table-type">
												<div class="ngjs-ziLi4 ngco-inbl-display">用户分组</div>
											</th>
											<!-- 6 -->
											<th class="table-date am-hide-sm-only">
												<div class="ngjs-ziLi6 ngco-inbl-display">用户信息</div>
											</th>
											<!-- 7 -->
											<th class="table-date am-hide-sm-only">
												<div class="ngjs-ziLi7 ngco-inbl-display">关注时间</div>
											</th>
											<th class="table-set">
												<div class="ngjs-ziLi8 ngco-inbl-display">操作</div>
											</th>
										</tr>
									</thead>
									<tbody>
									{% for row in data %}
										<tr>
											<td><input type="checkbox" name="id[]" value="{{row['openid']}}"></td>
											<td>{{row['id']}}</td>
											<td>
												<ul data-am-widget="gallery" class="am-gallery sm-block-grid-2 md-block-grid-3 lg-block-grid-4 am-gallery-bordered  am-no-layout" data-am-gallery="{ pureview: true }" style="display: inline-block">
													<li><img src="{{row['headimgurl']}}" alt="" style="height: 46px" ></li>
												</ul>
												<div style="display: inline-block; vertical-align: middle;">
													<div>{{row['nickname']}}</div>
													<div>
														{% if row['country'] %}<a href="fans_list?country={{row['country']}}">{{row['country']}}</a>{% endif %}
														{% if row['province'] %} - <a href="fans_list?province={{row['province']}}">{{row['province']}}</a>{% endif %}
														{% if row['city'] %} - <a href="fans_list?city={{row['city']}}">{{row['city']}}</a>{% endif %}
													</div>
												</div>
											</td>
											<td>{{row['group_name']}}</td>
											<td>OpenID: {{row['openid']}}</td>
											<td class="am-hide-sm-only">{{row['subscribetime']}}</td>
											<td>
												<div class="am-btn-toolbar li-div7">
													<div class="am-btn-group am-btn-group-xs">
														<div class="am-btn-group am-btn-group-xs ngco-TNo-paddingLR">
															<a href="message_manage_reply?fansid={{row['id']}}" title="" class="am-btn am-btn-default am-btn-xs am-text-secondary title2div" style="cursor: pointer;"><span class="am-icon-pencil-square-o"></span>&nbsp;发送消息</a>
															<a href="message_manage?fansid={{row['id']}}" title="" class="am-btn am-btn-default am-btn-xs am-publish-bright title2div" style="cursor: pointer;"><span class="am-icon-archive"></span>&nbsp;消息记录</a>
														</div>
													</div>
												</div>

											</td>
										</tr>
									{% endfor %}
									</tbody>
								</table>
								{% if not data %}<div class="no-data"><ul>没有相关数据</ul></div>{% endif %}
								{% if page_data['total_rows'] %}
								<div class="am-u-sm-12 am-u-md-6">
									<div class="am-btn-toolbar ng-xno-borderL" id="select-handle">
										<span class="am-input-group-btn add-span">
											<a class="add am-btn am-btn-default am-select am-back ngco-Ono-radiusR" href="javascript:; ">全选</a>
										</span>
										<input type="hidden" name="action" value="move">
										<input type="hidden" name="group_id" value="move" id="groupid">
										<select class="am-select-hover" data-am-selected="{btnSize: 'sm'}" style="display: none;">
											<option selected="selected" value='0'>将选中的用户移到一下分组中：</option>
											{% for row in wx_group %}
											<option value="{{row['id']}}">{{row['name']}}</option>
											{% endfor %}
										</select>
									</div>
								</div>
								{% endif %}
							</form>
							{% if page_data['total_page'] > 1 %}
							{{page_html}}
							{% endif %}
						</div>
					</div>
				</div>
				<div class="am-alert am-alert-warning">
					<ul>
						<li>1、数据同步：将用户信息与腾讯服务器上的数据进行同步，用户在关注时系统会自动同步用户信息，一般不用手动操作，通常在首次安装时需要点击&nbsp;<a target="_blank" href="fans_list?action=syn" style="color: #23527c;">数据同步</a>。</li>
						<li>2、用户搜索：可以输入用户OPENID、用户昵称、注册城市或国家名进行搜索。</li>
						<li>3、地理位置：用户最近一次与公众帐号进行互动时的地理位置信息。如果无法获取用户地理位置信息可能有以下原因：</li>
						<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;你的高级接口未开启&nbsp;“获取用户地理位置”&nbsp;功能；</li>
						<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户微信端未开启&nbsp;“提供位置信息”&nbsp;选项。</li>
						<li>4、黑名单：将用户移到黑名单组时可以屏蔽该用户消息。</li>
					</ul>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
</body>
</html>