94 lines
2.6 KiB
HTML
94 lines
2.6 KiB
HTML
{extend name="public/base" /}
|
|
{block name="body"}
|
|
<style>
|
|
.clinhei{width:100%;height:20px;}
|
|
.inp{width:200px;}
|
|
.md-list{
|
|
width: 100%;
|
|
height: 50px;
|
|
background: #fff;
|
|
border-radius:5px;
|
|
line-height: 50px;
|
|
}
|
|
.bot{
|
|
float:right;
|
|
margin-right: 20px;
|
|
}
|
|
.title{
|
|
float:left;
|
|
margin-left: 20px;
|
|
}
|
|
</style>
|
|
<div class="main-box-body clearfix">
|
|
<form method="get">
|
|
<div class="col-sm-12 col-md-3">
|
|
<h4>{$wxname}</h4>
|
|
</div>
|
|
<div class="col-sm-12 col-md-3">
|
|
<a class="btn btn-primary" href="{:url('Wxpushall/add_menu_text',array('wxid'=>$wxid))}">新增菜单回复</a>
|
|
<a href="javascript:history.back(-1)" class="btn btn-success">返回</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="clinhei"></div>
|
|
{notempty name="data"}
|
|
{volist name="data" id="v"}
|
|
<div class="md-list">
|
|
<p class="title">按钮名称:<font color="red">{$v.name}</font></p>
|
|
<p class="bot">
|
|
<a href="{:url('Wxpushall/edit_menu_text',array('id'=>$v.id))}" class="btn btn-primary" style="background: #2c76ff;">编辑</a>
|
|
<a href="#" class="btn btn-danger" onclick="del('{$v.id}')">删除</a>
|
|
</p>
|
|
</div>
|
|
<div class="clinhei"></div>
|
|
{/volist}
|
|
{/notempty}
|
|
|
|
{/block}
|
|
{block name="script"}
|
|
<script>
|
|
function del(id){
|
|
swal({
|
|
title: '确定删除?',
|
|
text: "确定删除吗",
|
|
type: 'warning',
|
|
buttons:{
|
|
confirm: {
|
|
text : '确认',
|
|
className : 'btn btn-success'
|
|
},
|
|
cancel: {
|
|
text : '关闭',
|
|
visible: true,
|
|
className: 'btn btn-danger'
|
|
}
|
|
}
|
|
}).then((Delete) => {
|
|
if (Delete) {
|
|
$.ajax({
|
|
type: "POST",
|
|
url:"{:url('Wxpushall/del_menu_text')}",
|
|
data: {id:id},
|
|
dataType:"json",
|
|
success: function(data) {
|
|
if(data.status==1){
|
|
swal('成功',data.reg, {icon : "success",buttons:{confirm:{className : 'btn btn-success'}},});
|
|
window.location = "";
|
|
}else{
|
|
swal('错误',data.reg, {icon : "error",buttons:{confirm:{className : 'btn btn-danger'}},});
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
} else {
|
|
//关闭执行
|
|
swal.close();
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
{/block}
|
|
|