index.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <script type="text/javascript" src="__static__/js/jquery-1.10.2.min.js"></script>
  6. <link rel="stylesheet" href="__static__/css/bootstrap.min.css">
  7. <script type="text/javascript" src="__static__/js/bootstrap.min.js"></script>
  8. <title></title>
  9. </head>
  10. <body>
  11. <!-- <div class="mainbox" style="padding: 20px;">
  12. <div class="page-toolbar">
  13. <div class="btn">
  14. <a href="{:url('add')}" class="btn btn-primary"><i class="aicon ai-tianjia"></i>注册设备</a>
  15. </div>
  16. </div> -->
  17. <form id="pageListForm">
  18. <div class="layui-form">
  19. <table class="table table-bordered table-striped " lay-even="" lay-skin="row">
  20. <thead>
  21. <th>推送类型</th>
  22. <th>设备id</th>
  23. <th>设备名称</th>
  24. <th>推送数据</th>
  25. <th>添加时间</th>
  26. <!-- <th>操作</th> -->
  27. </tr>
  28. </thead>
  29. <tbody>
  30. {volist name="data_list" id="vo"}
  31. <tr>
  32. <td class="font12">{$vo['notifyType']}</td>
  33. <td>{$vo['device_id']}</td>
  34. <td>{$vo['name']}</td>
  35. <td>{$vo['data']}</td>
  36. <td>{$vo['addtime']}</td>
  37. <!-- <td>
  38. <a onclick="del({$vo['id']})" style="cursor: pointer;">删除</a>
  39. </td> -->
  40. </tr>
  41. {/volist}
  42. </tbody>
  43. </table>
  44. {$pages}
  45. </div>
  46. </form>
  47. </div>
  48. <script>
  49. function del(id){
  50. var msg = "确定要删除该设备吗";
  51. if (confirm(msg)==true){
  52. window.location.href='{:url("delete")}?id='+id;
  53. return true;
  54. }else{
  55. return false;
  56. }
  57. }
  58. function status(iot_id){
  59. /* $.post('{:url("status")}',{iot_id:iot_id},function(res){
  60. alert(res);
  61. });
  62. */
  63. alert(iot_id);
  64. }
  65. </script>
  66. </body>
  67. </html>