12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- {extend name="public/layout" /} {block name="title"}活动编辑{/block}
- {block name="body"}
- <style>
- a{
- color:#249efb
- }
- </style>
- <body>
- <div class="layui-form">
- <table class="layui-table">
- <thead>
- <tr>
- <th>时间</th>
- <th>操作人</th>
- <th>条件</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody id="data-list">
- </tbody>
- </table>
- </div>
- </body>
- {/block}
- {block name="js"}
- <script>
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['flow'], function () {
- let flow = layui.flow;
- let $ = layui.jquery;
- flow.load({
- elem: '#data-list' //流加载容器
- , done: function (page, next) {
- var row = [];
- $.get("{:url('activity/exportlog', ['id'=>$id])}&page=" + page, function (res) {
- if (res.code == 1) {
- layer.msg(res.msg, { anim: 6 });
- return;
- }
- layui.each(res.data, function(index, i){
- row.push('<tr>');
- row.push('<td>' + i['addtime'] + '</td>');
- row.push('<td>' + i['op'] + '</td>');
- row.push('<td>' + i['s'] + '</td>');
- if (i['state'] == 2)
- row.push('<td><a href="' + i['file'] + '">下载</a></td>');
- else if (i['state'] == -1)
- row.push('<td>导出失败</td>');
- else if (i['state'] == 1)
- row.push('<td>导出中</td>');
- else if (i['state'] == 0)
- row.push('<td>未导出</td>');
- row.push('</tr>');
-
- });
- next(row.join(''), page < res.pages);
- })
- }
- });
- });
- </script>
- {/block}
|