12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- {extend name='admin@main'}
- {block name="button"}
- <button data-open='{:url("add")}' data-title="添加轮播图" class='layui-btn layui-btn-sm layui-btn-primary'>添加轮播图</button>
- {/block}
- {block name="content"}
- <div class="think-box-shadow">
- <table class="layui-table margin-top-20" lay-skin="line">
- <thead>
- <tr>
- <th class='list-table-check-td think-checkbox'><input data-auto-none data-check-target='.list-check-box' type='checkbox'></th>
- <th class='list-table-sort-td'><button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button></th>
- <th class='text-left nowrap'>名称</th>
- <th class='text-left nowrap'>轮播图</th>
- <!-- <th class='text-left nowrap' style="width: 30%;">链接</th>-->
- <th class="text-left" style="width: 20%">操作</th>
- </tr>
- </thead>
- <tbody>
- {foreach $list as $key=>$vo}
- <tr>
- <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
- <td class='list-table-sort-td'><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></td>
- <td class='text-left nowrap'>{$vo.name|default=''}</td>
- <td class='text-left nowrap'><img data-tips-image="{$vo.cover|default=''}" src="{$vo.cover|default=''}" height="50" width="110px"></td>
- <!-- <td class='text-left nowrap'>{$vo.link|default=''}</td>-->
- <td class='text-left' style="width: 20%">
- <a data-title="编辑轮播图" class="layui-btn layui-btn-sm" data-open='{:url("edit")}?id={$vo.id}'>编 辑</a>
- <span class="layui-btn layui-btn-sm layui-btn-danger" onclick="btn_confirm('删除','del','{$vo.id}');">删 除</span>
- </td>
- </tr>
- {/foreach}
- </tbody>
- </table>
- {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
- </div>
- <script>
- function btn_confirm(msg,fun,id) {
- layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
- var url = "/store/banner/"+fun;
- layer.closeAll();
- $.ajax({
- type: "post",
- url: url,
- data: {id:id},
- dataType: "json",
- async: false,
- success: function (data) {
- layer.msg(data.info);
- setTimeout(function () {
- window.location.reload();
- },1000)
- }
- });
- });
- }
- </script>
- {/block}
|