You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
4.8 KiB
HTML

<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/font-awesome/4.6.0/css/font-awesome.min.css">
<link href="__CSS__/transfer.css" rel="stylesheet" >
</block>
<block name="body">
<div class="page-list normal_list promote-mychlid-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>管理中心></span><span>{$promoteTypeName}管理</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_ziqudao.png">
<span class="title_main"><a href="{:U('QrCodePromotion/linkAdd', ['id' => $qp_id])}">新增</a></span>
</div>
<div class="trunk-content article">
<div class="trunk-list list_normal">
<table class="table normal_table">
<tr class="odd">
<th>ID</th>
<th>推广链接地址</th>
<th>推广链接短地址</th>
<th>添加人员</th>
<th>添加时间</th>
<!-- <th>二维码</th>-->
<th>操作</th>
</tr>
<empty name="records">
<tr><td colspan="10" style="text-align: center;height: 45vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
<else />
<volist name="records" id="record" mod="2">
<tr data-id="{$record.id}">
<td>{$record.id}</td>
<td>{$record.h5_link}</td>
<td>{$record.short_link}</td>
<td>{$record.admin_name}</td>
<td>{$record.create_time|date='Y-m-d H:i:s', ###}</td>
<!-- <td><img src="{$record.qrcode_img}" style="height: 100px;"/></td>-->
<td>
<div class="partakebtn">
<a class="edit-btn" data-id="{$record.id}" href="{:U('QrCodePromotion/linkEdit', ['id' => $record['id']])}">编辑</a>
<a class="delete-btn" data-id="{$record.id}" href="#">删除</a>
</div>
</td>
</tr>
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
{$pagination}
</div>
</div>
</div>
<script>
setValue('row','{:I("get.row",10)}');
</script>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script src="__STATIC__/vue.js"></script>
<script src="__JS__/transfer.js"></script>
<script type="text/javascript">
$(function(){
$(".select_gallery").select2();
var promoteType = $('input[name=promote_type]').val()
var level = 0
var subLevel = 0
if (promoteType == 0) {
level = 2
subLevel = 3
} else if (promoteType == 1) {
level = 3
subLevel = 4
} else if (promoteType == 2) {
level = 3
}
$('#submit').click(function () {
var url = $(this).attr('url');
console.log(url);
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
query = query.replace(/^&/g, '');
if (url.indexOf('?') > 0) {
url += '&' + query;
} else {
url += '?' + query;
}
window.location.href = url;
});
$(".delete-btn").click(function() {
if (confirm("确认删除吗?")) {
var id = $(this).data('id');
$.ajax({
type: 'post',
dataType: 'json',
url: "{:U('QrCodePromotion/linkDel')}",
data:{
id : id
},
success: function (result) {
if (result.status == 1) {
layer.msg(result.message)
setTimeout(function() {
window.location.href = "{:U('QrCodePromotion/linkLists', ['id' => $qp_id])}";
}, 200)
} else {
layer.msg(result.message)
}
}
});
}
});
})
</script>
</block>