1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- {extend name='admin@main'}
- {block name="button"}
- <button data-modal='{:url("add")}' data-title="添加" class='layui-btn layui-btn-sm layui-btn-primary'>添加</button>
- {/block}
- {block name="content"}
- <div class="think-box-shadow">
- {include file='banner/index_search'}
- <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'>Logo</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'>
- <img data-tips-image style="width:50px;height:50px" src="{$vo.headimg|default=''}" class="margin-right-5 text-top">
- <div class="inline-block">
- 用户ID:{$vo.user_id|default='--'}<br>
- 用户昵称:{$vo.user_name|default='--'}
- </div>
- </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" ></td>
- <td class='text-left' style="width: 20%">
- <a data-title="编辑轮播图" class="layui-btn layui-btn-sm" data-modal='{: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 = "/mall/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}
|