<!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/wx_material_send.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/wx_material_send.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>
					<div class="tpl-portlet-input tpl-fz-ml am-select-hover am-no-margintop">
						<div class="portlet-input input-small input-inline ngar-xiugai-width">
							<div class="input-icon right am-fr top-1">
								<div class="am-btn-group am-btn-group-xs">
									<a class="am-btn am-btn-default am-btn-success" href="wx_material_send_manage">群发记录</a>
								</div>
							</div>
							<div class="am-cf"></div>
						</div>
					</div>
				</div>
				<!-- {% if not data %}<div class="no-data">
					<ul>没有相关数据</ul>
				</div>{% endif %} -->
				<div class="tpl-block">
					<div class="am-g">
						<div class="tpl-table-images">
							{% for row in data %}
							{% if row['news_type'] == 0 %}
							<div class="am-u-sm-12 am-u-md-6 am-u-lg-4 picture-div">
								<div class="tpl-table-images-content">
									<div class="tpl-table-images-content-i-time">
										更新时间：{{row['update_time']}}
										<div class="tpl-switch" style="float:right">
											<input type="radio" name="media" value="{{row['media_id']}}" class="ios-switch bigswitch tpl-switch-btn" />
											<div class="tpl-switch-btn-view" {% if id == row['id'] %}select="1"{% endif %}><div></div></div>
										</div>
									</div>
									<div class="tpl-i-title">{{row['title']}}</div>
									<a href="{{row['news']['url']}}" target="_blank" class="tpl-table-images-content-i" style="z-index: 10;color:#fff">
										<img src="/upload/wx_material/thumb/{{row['news']['thumb_media_id']}}.jpg" alt="" style="height: 251px">
									</a>
									<div class="tpl-table-images-content-block">
										<div class="tpl-i-font">
                                            {{row['news']['digest']}}
                                        </div>
									</div>
								</div>
							</div>

							{% else %}
							<div class="am-u-sm-12 am-u-md-6 am-u-lg-4 picture-div">
								<div class="tpl-table-images-content">
									<div class="tpl-table-images-content-i-time">
										更新时间：{{row['update_time']}}
										<div class="tpl-switch" style="float:right">
											<input type="radio" name="media" value="{{row['media_id']}}" class="ios-switch bigswitch tpl-switch-btn" />
											<div class="tpl-switch-btn-view" {% if id == row['id'] %}select="1"{% endif %}><div></div></div>
										</div>
									</div>
									<div class="tpl-i-title">
									</div>
									<a href="javascript:;" class="tpl-table-images-content-i" style="z-index: 10;color:#fff">
										<div class="am-slider am-slider-default" data-am-flexslider id="demo-slider-0">
										  	<ul class="am-slides">
												{% for var in row['news'] %}
												<li>
													<img src="/upload/wx_material/image/{{var['thumb_media_id']}}.jpg" style="height: 251px"/>
													<div class="tpl-table-images-content-i-info news-shadow-title">
														<span class="ico">{{var['title']}}</span>
													</div>
												</li>
												{% endfor %}
										  	</ul>
										</div>
									</a>

								</div>
							</div>
							{% endif %}
							{% endfor %}
							{% if not data %}<div class="no-data"><ul>没有相关数据</ul></div>{% endif %}
                        </div>
                        <div class="am-u-sm-12 am-u-md-12 wx_btn">
							<form action="" method="post" id="send-form">
								<select data-am-selected="{btnSize: 'sm'}" name="type" class="" style="display: none;">
									<option value="0">请选择推送对象</option>
									<option value="1">全部用户</option>
									<option value="2">分组标签</option>
								</select>
								<select data-am-selected="{btnSize: 'sm'}" name="group" class="" style="display: none;">
									{% for row in group %}
									<option value="{{row['id']}}">{{row['name']}}({{row['count']}}人)</option>
									{% endfor %}
								</select>
								<input type="hidden" name="media_id" value="" id="send_id">
								<input type="hidden" name="action" value="send">
							</form>
							<div class="portlet-input input-small">
								<form action="" method="post" id="preview-form">
									<div class="input-icon right">
										<input type="text" class="ngar-Vxiugai-radius form-control am-hover form-control-solid ngco-Alo-Noborder" placeholder="请输入微信号/OPENID" name="openid" value="">
										<input type="hidden" name="media_id" value="" id="view_id">
										<input type="hidden" name="action" value="preview">
									</div>
								</form>
							</div>
                            <div class="am-btn-toolbar ng-xno-borderL" style="text-align: center;">
                                <button type="button" id="preview" class="am-btn am-btn-primary">预览</button>
                                <button type="button" id="send" class="am-btn am-btn-danger" style="margin-left: 100px;">群发</button>
                            </div>
                        </div>
                    </div>
                    <div class="am-alert am-alert-warning">
                        <ul>
                            <li>1、消息有时会进行审核、服务器不稳定等。此外，群发任务一般需要较长的时间才能全部发送完毕，请耐心等待。</li>
                            <li>2、可通过预览功能发送消息给指定用户（关注公众号后，才能接收消息预览），在手机端查看消息的样式和排版，但该能力每日调用次数有限制（100次），请勿滥用。</li>
                            <li>3、订阅号提供了每天一条的群发权限，服务号提供每月（自然月）4条的群发权限，认证服务号虽然开发者使用高级群发接口的每日调用限制为100次</li>
                            <li>4、用户每月只能接收4条，无论在公众平台网站上，还是使用接口群发，用户每月只能接收4条群发消息，多于4条的群发将对该用户发送失败。</li>
                            <li>5、预览功能仅用于公众号查看群发效果，不适用于公众传播。图文消息和视频消息的预览链接会在短期内失效。</li>
                        </ul>
                    </div>
					<div style="clear: both;"></div>
				</div>
			</div>
		{% include 'component_footer.tpl' %}
		</div>
		
		</div><!-- /.scrollbar-wrap -->
	</div>
</body>
</html>