2023-01-29 10:26:52 +08:00

85 lines
2.9 KiB
HTML

{extend name="public/base" /}
{block name="body"}
<style>
.clinhei{width:100%;height:20px;}
</style>
<div class="main-box-body clearfix">
<table class="table">
<thead>
<tr>
<th style="text-align: center;">ID</th>
<th style="text-align: center;">创建时间</th>
<th style="text-align: center;">定时时间</th>
<th style="text-align: center;">类型</th>
<th style="text-align: center;">状态</th>
<th style="text-align: center;">操作</th>
</tr>
</thead>
<tbody>
{volist name="res" id="v"}
<tr style="background: #fff;box-shadow: 2px 2px 2px#A0A4A7;">
<td style="text-align: center;font-weight:bold;">{$v.id}</td>
<td style="text-align: center;color: seagreen;">{$v.addtime|date='Y-m-d H:i:s',###}</td>
<td style="text-align: center;color: seagreen;">{$v.tasktime|date='Y-m-d H:i:s',###}</td>
<td style="text-align: center;">小说推文</td>
{if $v.status==0}
<td style="text-align: center;color: peru;">定时中</td>
{else/}
<td style="text-align: center;color: seagreen;">已完成</td>
{/if}
<td><button type="button" class="btn btn-danger" onclick="del('{$v.id}')">删除</button></td>
</tr>
{/volist}
</tbody>
</table>
{$page}
</div>
{/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('Wxopenaccount/deltimedkefu')}",
data: {id:id},
dataType:"json",
error: function(request) {
},
success: function(data) {
if(data.status==1){
swal('成功',data.reg, {icon : "success",buttons:{confirm:{className : 'btn btn-success'}},});
window.location.href=""
}else{
swal('错误',data.reg, {icon : "error",buttons:{confirm:{className : 'btn btn-danger'}},});
}
}
});
} else {
swal.close();
}
});
}
</script>
{/block}