<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/layui/2.8.1/css/layui.min.css">
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f5f5f5;
        }
<pre><code>    .container {
        width: 95%;
        max-width: 1200px;
        margin: 20px auto;
        background-color: #fff;
        padding: 20px;
        border: 1px solid #ddd;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    h1 {
        text-align: center;
        margin-bottom: 20px;
        color: #337ab7;
    }

    .layui-table {
        font-size: 16px;
        text-align: center;
    }

    .layui-table th {
        background-color: #f5f5f5;
        font-size: 18px;
        font-weight: bold;
        text-align: center;
    }

    .operation-btns {
        text-align: center;
        white-space: nowrap;
    }

    .layui-btn {
        margin: 5px;
        font-size: 14px;
        min-width: 80px;
    }

    .layui-btn-primary {
        background-color: #337ab7;
        border-color: #337ab7;
    }

    .layui-btn-primary:hover,
    .layui-btn-primary:focus,
    .layui-btn-primary:active {
        background-color: #286090;
        border-color: #286090;
    }

    .layui-btn-danger {
        background-color: #d9534f;
        border-color: #d43f3a;
    }

    .layui-btn-danger:hover,
    .layui-btn-danger:focus,
    .layui-btn-danger:active {
        background-color: #c9302c;
        border-color: #ac2925;
    }

    .layui-btn-warning {
        background-color: #f0ad4e;
        border-color: #eea236;
    }

    .layui-btn-warning:hover,
    .layui-btn-warning:focus,
    .layui-btn-warning:active {
        background-color: #ec971f;
        border-color: #d58512;
    }
&lt;/style&gt;
</code></pre>
</head>
<body>
<div class="container">
    <div class="row">
        <a class="layui-btn layui-btn-primary" href="{:url('users/add')}" role="button">添加用户</a>
    </div>
    <h1>用户列表</h1>
    <table class="layui-table" lay-even="" lay-skin="nob">
        <colgroup>
            <col width="80">
            <col width="120">
            <col width="120">
            <col width="150">
            <col width="150">
            <col width="80">
            <col width="100">
            <col width="200">
        </colgroup>
        <thead>
        <tr>
            <th>ID</th>
            <th>账号</th>
            <th>用户名</th>
            <th>管理动态ID</th>
            <th>管理诊疗ID</th>
            <th>状态</th>
            <th>是否管理员</th>
            <th>开通时间</th>
            <th>到期时间</th>
            <th>联系电话</th>
            <th>公司名称</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="userList" id="user"}
        <tr>
            <td>{$user.id}</td>
            <td>{$user.username}</td>
            <td>{$user.author}</td>
            <td>{$user.yydt_id}</td>
            <td>{$user.jkzl_id}</td>
            <td>{if $user.status eq 1}正常{else}暂停{/if}</td>
            <td>{if $user.admin eq 1}是{else}否{/if}</td>
            <td>{$user.start_time|date="Y-m-d",###}</td>
            <td>{$user.end_time|date="Y-m-d",###}</td>
            <td>{$user.tel}</td>
            <td>{$user.corporate_name}</td>
            <td class="operation-btns">
                <a href="{:url('users/edit', ['id'=>$user.id])}" class="layui-btn layui-btn-primary">编辑</a>
                <a href="{:url('users/delete', ['id'=>$user.id])}" class="layui-btn layui-btn-danger" onclick="return confirm('确定删除该用户吗?')">删除</a>
                <a href="{:url('users/pause', ['id'=>$user.id])}" class="layui-btn layui-btn-warning">{if $user.status eq 1}暂停{else}恢复{/if}</a>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div>
<!-- 在页面底部引入 layui -->
<script src="https://cdn.staticfile.org/layui/2.8.1/layui.min.js"></script>
</body>
</html
!DOCTYPE htmlhtml lang=enhead meta charset=UTF-8 title用户列表title link rel=stylesheet href=httpscdnstaticfileorglayui281csslayuimincss style body font-family Arial sans-se

原文地址: https://www.cveoy.top/t/topic/iufx 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录