1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- {extend name='admin@main'}
- {block name="button"}
- <button data-action='{:url("del")}' data-confirm="确定要删除吗?" data-csrf="{:systoken('del')}" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</button>
- <a href="javascript:history.go(-1);" data-title="返 回" class='layui-btn layui-btn-sm layui-btn-primary'>返 回</a>
- {/block}
- {block name="content"}
- <div class="think-box-shadow">
- {include file='user_datum/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='text-left nowrap' >ID</th>
- <th class='text-left nowrap' >用户</th>
- <th class='text-left ' style="max-width: 20%">标题</th>
- <th class='text-left nowrap' >文件</th>
- <th class='text-left nowrap'>状态</th>
- <th class="text-left nowrap">操作</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='text-left'>{$vo.id|default=''}</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.phone|default='--'}<br>
- 用户昵称:{$vo.user_name|default='--'}
- </div>
- </td>
- <td class='text-left'>{$vo.title|default=''}</td>
- <td class='text-left nowrap'>{$vo.datum_url|default=''}</td>
- <td class='text-left nowrap'>{$vo.status == 0 ?'待审核' : ($vo.status == 1?'审核通过':'审核拒绝')}</td>
- <td class='text-left nowrap' >
- {if $vo.status == 0}
- <a data-title="审核" class="layui-btn layui-btn-sm layui-btn-warm" data-modal='{:url("edit")}?id={$vo.id}'>审 核</a>
- {else}
- <a data-title="查看" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>查 看</a>
- {eq name='vo.status' value='1'}
- <!-- <a data-title="加入系列" class="layui-btn layui-btn-sm layui-btn-warm" data-modal='{:url("series")}?id={$vo.id}'>加入系列</a>-->
- <!-- <span class="layui-btn layui-btn-sm layui-btn-warm" onclick="btn_confirm('新建资料','new_datum','{$vo.id}');">新建资料</span>-->
- {/eq}
- {/if}
- <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 = "/nutrition/user_datum/"+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}
|