返回哈哈哈抠脚大汉......登陆

哈哈哈抠脚大汉我开始就

笑颜常开2019-05-24 00:30:33233

<!doctype html>
<html lang="en">
{include file="/public/header"}
<body>
<div class="x-nav">
     <span class="layui-breadcrumb">
       <a href="">首页</a>
       <a href="">演示</a>
       <a>
         <cite>导航元素</cite></a>
     </span>
   <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
      href="javascript:location.replace(location.href);" title="刷新">
       <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
   <xblock>
       <button class="layui-btn" onclick="x_admin_show('添加用户','{:url(\'Product/add\')}')"><i class="layui-icon"></i>添加
       </button>
       <span class="x-right" style="line-height:40px">共有数据:88 条</span>
   </xblock>
   <table class="layui-table">
       <thead>
       <tr>
           <th>产品ID</th>
           <th>产品标题</th>
           <th>产品分类</th>
           <th>产品图片</th>
           <th>产品简介</th>
           <th>发布管理员</th>
           <th>发布日期</th>
           <th>操作</th>
       </tr>
       </thead>
       <tbody>
       {volist name="products" id="product"}
       <tr>
           <td>{$product.id}</td>
           <td>{$product.title}</td>
           <td>{$product.sort}</td>
           <td><img src="#"></td>
           <td>{$product.desc}</td>
           <td>{$product.username}</td>
           <td>{$product.time|date="Y-m-d"}</td>
           <td class="td-manage">
               <a title="查看" onclick="x_admin_show('编辑','{:url(\'Product/edit\')}?id=1')" href="javascript:;">
                   <i class="layui-icon">&#xe63c;</i>
               </a>
               <a title="删除" onclick="member_del(this,'1')" href="javascript:;">
                   <i class="layui-icon">&#xe640;</i>
               </a>
           </td>
       </tr>
       {/volist}
       </tbody>
   </table>
   <div class="page">
       <div>
           {$products|raw}
       </div>
   </div>

</div>
<script>
   layui.use('laydate', function () {
       var laydate = layui.laydate;

       //执行一个laydate实例
       laydate.render({
           elem: '#start' //指定元素
       });

       //执行一个laydate实例
       laydate.render({
           elem: '#end' //指定元素
       });
   });


   /*用户-删除*/
   function member_del(obj, id) {
       layer.confirm('确认要删除吗?', function (index) {
           //发异步删除数据
           $.get('{:url(\'del\')}', 'id=' + id, function (data) {
               if (data.res == 1) {
                   $(obj).parents("tr").remove();
                   layer.msg('已删除!', {icon: 1, time: 1000});
               }
           })

       });
   }

</script>
</body>

</html>

最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送