160 lines
4.8 KiB
HTML
160 lines
4.8 KiB
HTML
{extend name="public/base" /}
|
||
{block name="body"}
|
||
<style>
|
||
.clinhei{width:100%;height:20px;}
|
||
.inp{width:200px;}
|
||
.md-list{
|
||
width: 100%;
|
||
height: 120px;
|
||
background: #fff;
|
||
border-radius:5px;
|
||
}
|
||
.md-list p{
|
||
float: left;
|
||
margin-top: 42px;
|
||
font-size: 18px;
|
||
color: #000;
|
||
margin-left: 50px;
|
||
letter-spacing: 1px;
|
||
}
|
||
.md-list .ttt{
|
||
width:30%;
|
||
}
|
||
.md-list img{
|
||
float: left;
|
||
width: 165px;
|
||
height: 100px;
|
||
margin-top: 9px;
|
||
margin-left: 40px;
|
||
}
|
||
.bot{
|
||
float:right;
|
||
margin-right: 70px;
|
||
margin-top: 40px;
|
||
}
|
||
.bot a{
|
||
margin-left:5px;
|
||
}
|
||
#checkboxwa{
|
||
width: 34px;
|
||
height: 34px;
|
||
float: right;
|
||
margin-left: 10px;
|
||
margin-top:-0px;
|
||
}
|
||
</style>
|
||
<a href="{:url('Wxpushall/addreply',array('wxid'=>$wxid))}" class="btn btn-danger">添加素材</a>
|
||
<a href="javascript:history.back(-1)" class="btn btn-success">返回</a>
|
||
<a href="#" class="btn btn-success">最多只能添加10个栏目</a>
|
||
<div class="clinhei"></div>
|
||
{volist name="list" id="v"}
|
||
<div class="md-list">
|
||
<!-- <p>ID:<font color="red">{$v.id}</font></p> -->
|
||
<p class="ttt">标题:<font color="red">{$v.Title|mb_substr=0,15,'utf-8'}</font></p>
|
||
<p>图片:</p>
|
||
<img src="{$v.PicUrl}" alt="">
|
||
<div class="bot">
|
||
<a href="{:url('Wxpushall/replyedit',array('id'=>$v.id))}" class="btn btn-primary">编辑</a>
|
||
<a href="#" class="btn btn-danger" onclick="del('{$v.id}')">删除</a>
|
||
<input type="checkbox" value="{$v.id}" id="checkboxwa" {if $v.status==1}checked{/if}>
|
||
</div>
|
||
</div>
|
||
<div class="clinhei"></div>
|
||
{/volist}
|
||
<div class="btn btn-primary" onclick="setreplist()">设置</div>
|
||
{/block}
|
||
{block name="script"}
|
||
<script>
|
||
function setreplist(){
|
||
swal({
|
||
title: '确定?',
|
||
text: "选择关注回复图文",
|
||
type: 'warning',
|
||
buttons:{
|
||
confirm: {
|
||
text : '确认',
|
||
className : 'btn btn-success'
|
||
},
|
||
cancel: {
|
||
text : '关闭',
|
||
visible: true,
|
||
className: 'btn btn-danger'
|
||
}
|
||
}
|
||
}).then((Delete) => {
|
||
if (Delete) {
|
||
var r_array=new Array();
|
||
var n_array=new Array();
|
||
$('input[id="checkboxwa"]').each(function(){
|
||
if($(this).is(':checked')){
|
||
r_array.push($(this).val());
|
||
}else{
|
||
n_array.push($(this).val());
|
||
}
|
||
});
|
||
var rlist = r_array.join(',');
|
||
var nlist = n_array.join(',');
|
||
$.ajax({
|
||
type: "POST",
|
||
url:"{:url('Wxpushall/setreplist')}",
|
||
data: {rlist:rlist,nlist:nlist},
|
||
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();
|
||
}
|
||
});
|
||
}
|
||
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/delreply')}",
|
||
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}
|