index.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {extend name='admin@main'}
  2. {block name="button"}
  3. <button data-modal='{:url("add")}' data-title="添加" class='layui-btn layui-btn-sm layui-btn-primary'>添加</button>
  4. {/block}
  5. {block name="content"}
  6. <div class="think-box-shadow">
  7. {include file='user_datum/index_search'}
  8. <table class="layui-table margin-top-20" lay-skin="line">
  9. <thead>
  10. <tr>
  11. <th class='text-left nowrap' >用户</th>
  12. <th class='text-left nowrap' >标题</th>
  13. <th class='text-left nowrap' >文件</th>
  14. <th class='text-left nowrap'>状态</th>
  15. <th class="text-left nowrap">操作</th>
  16. </tr>
  17. </thead>
  18. <tbody>
  19. {foreach $list as $key=>$vo}
  20. <tr>
  21. <td class='text-left nowrap'>
  22. <img data-tips-image style="width:50px;height:50px" src="{$vo.headimg|default=''}" class="margin-right-5 text-top">
  23. <div class="inline-block">
  24. 用户ID:{$vo.user_id|default='--'}<br>
  25. 手机号:{$vo.phone|default='--'}<br>
  26. 用户昵称:{$vo.user_name|default='--'}
  27. </div>
  28. </td>
  29. <td class='text-left nowrap'>{$vo.title|default=''}</td>
  30. <td class='text-left nowrap'>{$vo.datum_url|default=''}</td>
  31. <td class='text-left nowrap'>{$vo.status == 0 ?'待审核' : ($vo.status == 1?'审核通过':'审核拒绝')}</td>
  32. <td class='text-left nowrap' >
  33. {if $vo.status == 0}
  34. <a data-title="审核" class="layui-btn layui-btn-sm layui-btn-warm" data-modal='{:url("edit")}?id={$vo.id}'>审 核</a>
  35. {else}
  36. <a data-title="查看" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>查 看</a>
  37. {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>{/eq}
  38. {/if}
  39. <span class="layui-btn layui-btn-sm layui-btn-danger" onclick="btn_confirm('删除','del','{$vo.id}');">删 除</span>
  40. </td>
  41. </tr>
  42. {/foreach}
  43. </tbody>
  44. </table>
  45. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  46. </div>
  47. <script>
  48. function btn_confirm(msg,fun,id) {
  49. layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
  50. var url = "/nutrition/user_datum/"+fun;
  51. layer.closeAll();
  52. $.ajax({
  53. type: "post",
  54. url: url,
  55. data: {id:id},
  56. dataType: "json",
  57. async: false,
  58. success: function (data) {
  59. layer.msg(data.info);
  60. setTimeout(function () {
  61. window.location.reload();
  62. },1000)
  63. }
  64. });
  65. });
  66. }
  67. </script>
  68. {/block}