super_sign.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. namespace app\admin;
  3. class super_sign extends Base
  4. {
  5. public $statusText = [-2 => "签名失败", -1 => "解析失败", "未签名", "准备中", "正在解析", "正在签名", "正在打包", "签名完成"];
  6. public function initialize()
  7. {
  8. parent::initialize();
  9. $this->Administrator(6);
  10. $this->header();
  11. }
  12. public function __destruct()
  13. {
  14. ?> <script>
  15. $('input[name=sort]').on('input', function () {
  16. var sort = $(this).val();
  17. if (sort != $(this).attr('data-sort'))
  18. $.ajax({
  19. url: '?c=ajax&a=ios_device_sort',
  20. data: {id: $(this).attr('data-id'), sort: sort},
  21. type: 'post',
  22. success: function (ret) {
  23. console.log(ret)
  24. }
  25. });
  26. });
  27. </script>
  28. <?php
  29. $this->footer();
  30. }
  31. function index($map = [])
  32. {
  33. $this->search = SafeRequest("search", "get");
  34. $this->search && ($map[] = ["user_id|app_id|app_name|udid|cert_iss", "like", "%" . $this->search . "%"]);
  35. $_var_0 = SafeRequest("app_id", "get");
  36. $_var_0 && ($map[] = ["app_id", "=", $_var_0]);
  37. $this->type = SafeRequest("type", "get");
  38. is_numeric($this->type) && ($map[] = ["type", "=", $this->type]);
  39. $_var_1 = SafeRequest("udid", "get");
  40. $_var_1 && ($map[] = ["udid", "=", $_var_1]);
  41. $_var_2 = SafeRequest("page", "get");
  42. $this->mapTime("sign_time", true, $map);
  43. $_var_3 = db("super_sign")->where($map)->order("sign_time desc")->paginate(["page" => $_var_2]);
  44. $_var_4 = $_var_3->items();
  45. $_var_5 = getRender($_var_3, $_var_2);
  46. $_var_6 = $_var_3->total();
  47. ?><div class="container"><?php
  48. $this->nav3();
  49. $this->searchForm("", "", function () {
  50. ?> <select name="type" onchange="document.btnsearch.submit();">
  51. <option value="">全部类型</option>
  52. <option value="1" <?php echo $this->type == "1" ? "selected=\"selected\"" : "";?>>首次</option>
  53. <option value="0" <?php echo $this->type == "0" ? "selected=\"selected\"" : "";?>>重复</option>
  54. </select>
  55. <?php
  56. });
  57. ?>
  58. <style type="text/css">
  59. a{
  60. text-decoration: none;
  61. }
  62. a:hover{ text-decoration:none}
  63. </style>
  64. <table class="tb tb2">
  65. <tr><th class="partition">签名记录列表</th></tr>
  66. </table>
  67. <table class="layui-table">
  68. <thead>
  69. <tr>
  70. <th>ID</th>
  71. <th>应用名称</th>
  72. <th>应用版本</th>
  73. <th>设备UDID</th>
  74. <th>所用证书</th>
  75. <th>类型</th>
  76. <th>签名时间</th>
  77. <th>状态</th>
  78. </tr>
  79. </thead>
  80. <?php
  81. if ($_var_6 == 0) {
  82. ?><tr><td colspan="22" style="margin:auto;text-align:center" >暂无数据</td></tr>
  83. <?php
  84. }
  85. if ($_var_4) {
  86. foreach ($_var_4 as $_var_7) {
  87. ?><tr class="hover">
  88. <td class="td25"><?php echo $_var_7["id"];?></td>
  89. <td><?php echo $_var_7["app_name"];?></td>
  90. <td><?php echo $_var_7["app_version"];?></td>
  91. <td><?php echo $_var_7["udid"];?></td>
  92. <td><?php echo $_var_7["cert_iss"];?></td>
  93. <td><?php echo $_var_7["type"] ? "首次" : "重复";?></td>
  94. <td><?php echo date("Y-m-d H:i:s", $_var_7["sign_time"]);?></td>
  95. <td><a class="layui-btn layui-btn-normal layui-btn-xs"><?php echo $this->statusText[$_var_7["status"]];?></td></tr><?php
  96. }
  97. }
  98. ?></table></div><?php echo $_var_5;?><?php
  99. }
  100. }