108 lines
3.8 KiB
HTML
108 lines
3.8 KiB
HTML
{template '_header'}
|
|
<div class="page-heading">
|
|
<h2>微信模板管理</h2> </div>
|
|
|
|
|
|
<div class="alert alert-info">
|
|
<b>注意:</b>
|
|
<p>请将公众平台模板消息所在行业选择为:<b>IT科技/互联网|电子商务 其他/其他</b>,所选行业不一致将会导致模板消息不可用。</p>
|
|
<p>您的公众平台模板消息目前所属行业为:<b>{$industrytext}</b></p>
|
|
<p>当前列表内的模板消息为您已申请的模板消息,您可以点击查看详情或者删除处理。
|
|
</p>
|
|
</div>
|
|
|
|
<form action="" method="post">
|
|
<div class="page-toolbar row m-b-sm m-t-sm">
|
|
<div class="col-sm-4">
|
|
<div class="input-group-btn">
|
|
<button class="btn btn-default btn-sm" type="button" data-toggle='refresh'><i class='fa fa-refresh'></i></button>
|
|
{ifp 'sysset.weixintemplate.delete'}
|
|
<button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{php echo webUrl('sysset/weixintemplate/delete')}"><i class='fa fa-trash'></i> 删除</button>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-6 pull-right">
|
|
<div class="input-group">
|
|
<input type="text" class="input-sm form-control" id="tempcode" value="" placeholder="请输入模板编码"> <span class="input-group-btn">
|
|
<button class="btn btn-sm btn-primary" type="button" onclick="addtempoption()"> 添加微信模板</button> </span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{if count($list)>0}
|
|
<table class="table table-responsive table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:25px;"><input type='checkbox' /></th>
|
|
<th style="width:45px;">序号</th>
|
|
<th >模板名称</th>
|
|
<th>所属行业</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{loop $list $index $row}
|
|
<tr>
|
|
<td>
|
|
<input type='checkbox' value="{$row['template_id']}"/>
|
|
</td>
|
|
<td>
|
|
{php echo $index+1}
|
|
</td>
|
|
<td>{$row['title']}</td>
|
|
<td>{$row['primary_industry']}/{$row['deputy_industry']}</td>
|
|
<td>
|
|
<a class='btn btn-default btn-sm' href="{php echo webUrl('sysset/weixintemplate/post', array('id' => $row['template_id']))}" ><i class='fa fa-edit'></i> 查看详情</a>
|
|
{ifp 'sysset.weixintemplate.delete'}<a class='btn btn-default btn-sm' data-toggle='ajaxRemove' href="{php echo webUrl('sysset/weixintemplate/delete', array('id' => $row['template_id']))}" data-confirm="确认删除此模板吗?" ><i class='fa fa-trash'></i> 删除</a>{/if}
|
|
</tr>
|
|
{/loop}
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
{else}
|
|
<div class='panel panel-default'>
|
|
<div class='panel-body' style='text-align: center;padding:30px;'>
|
|
暂时没有任何微信模板!
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
<script language='javascript'>
|
|
|
|
function addtempoption() {
|
|
var tempcode = $("#tempcode").val();
|
|
var data = {
|
|
templateidshort: tempcode
|
|
};
|
|
$.ajax({
|
|
url: "{php echo webUrl('sysset/weixintemplate/gettemplateid')}",
|
|
data: data,
|
|
cache: false
|
|
}).done(function (result) {
|
|
|
|
var data= jQuery.parseJSON(result);
|
|
|
|
if(data.status==1) {
|
|
alert("加入成功");
|
|
location.reload();
|
|
|
|
}else
|
|
{
|
|
alert("加入失败,请检查模板数量是否达到上限(25个)以及模板编码是否输入正确!");
|
|
}
|
|
|
|
});
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
{template '_footer'}
|
|
|