certificateshow.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {include file="common/header"/}
  2. <style>
  3. .yourclass {
  4. display: block;
  5. }
  6. .canel {
  7. display: none;
  8. }
  9. </style>
  10. <div class="LM-container">
  11. <div class="LM-main">
  12. <fieldset class="layui-elem-field layui-field-title">
  13. <legend>通证记录</legend>
  14. <blockquote class="layui-elem-quote">
  15. <a href="{:url('index')}" class="layui-btn layui-btn-xs" lay-event="tzlg">返回</a>
  16. </blockquote>
  17. </fieldset>
  18. <table class="layui-table" id="list" lay-filter="list"></table>
  19. </div>
  20. </div>
  21. {include file="common/footer"/}
  22. <script>
  23. layui.use(['form', 'table'], function () {
  24. var $ = layui.jquery,
  25. form = layui.form,
  26. table = layui.table;
  27. let user_id= {:$user_id};
  28. console.log("user_id",user_id)
  29. var tableIn = table.render({
  30. elem: '#list',
  31. url: '{:url("certificateshow")}',
  32. method: 'post',
  33. where:{user_id:user_id},
  34. title: '用户数据表',
  35. // toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
  36. defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可
  37. title: '提示'
  38. , layEvent: 'LAYTABLE_TIPS'
  39. , icon: 'layui-icon-tips'
  40. }],
  41. cols: [[
  42. // {checkbox: true, fixed: true},
  43. {field: 'id', title: 'ID', width: 80, sort: true},
  44. {field: 'user_id', title: '用户id', width: 200},
  45. {field: 'user_name', title: '用户名称', width: 200},
  46. {field: 'name', title: '说明', width: 200},
  47. {field: 'money', title: '金额', width: 200},
  48. {field: 'status', title: '0增加1减少', width: 200},
  49. {field: 'add_time', title: '添加时间', width: 200},
  50. // {title: '操作', width: 150, toolbar: '#barDemo', align: "center"},
  51. ]],
  52. limits: [10, 15, 20, 25, 50, 100],
  53. limit: 15,
  54. page: true
  55. });
  56. });
  57. </script>