QrcodeDetaile.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <meta name="format-detection"content="telephone=no">
  8. <title>index</title>
  9. <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
  10. <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
  11. <link rel="stylesheet" href="../../css/projeck.css">
  12. <style media="screen">
  13. body,html{
  14. margin: 0;
  15. background: #fff;
  16. }
  17. </style>
  18. </head>
  19. <body>
  20. <div class="api_layout">
  21. <header class="header-login">
  22. <img class="backBtn" src="../../image/btn_back.png" alt="" onclick="backIndex()">
  23. <p class="api_text"></p>
  24. </header>
  25. </div>
  26. </body>
  27. </html>
  28. <script type="text/javascript" src="../../script/api.js"></script>
  29. <!-- <script src="../../script/fastclick.min.js"></script> -->
  30. <!-- <script src="../../script/aui-toast.js" charset="utf-8"></script> -->
  31. <script src="../../script/config.js" charset="utf-8"></script>
  32. <script type="text/javascript">
  33. var toast = new auiToast();
  34. apiready = function () {
  35. $api.fixStatusBar($api.dom('header') );
  36. var info = $api.getStorage('data'),
  37. name = JSON.parse(info).data.user.name,
  38. uuid = JSON.parse(info).data.user.staff_num,
  39. departmentID = JSON.parse(info).data.user.section_id,
  40. id = api.pageParam.id,
  41. departmentId = api.pageParam.departmentId,
  42. flag = api.pageParam.flag,
  43. title = api.pageParam.title,
  44. pageId =api.pageParam.pageId;
  45. detaile(name,uuid,pageId,departmentID,title,flag);
  46. keybackFun();
  47. };
  48. // 详情
  49. function detaile(uname,uuid,pageId,departmentID,title,flag) {
  50. var browser = api.require('webBrowser');
  51. browser.openView({
  52. url: urlphp+"assets/html/QRcoddetails/index.html?name="+uname+"&uuid="+uuid+"&pageId="+pageId+"&departmentID="+departmentID,
  53. rect: {
  54. x: 0,
  55. x: 0,
  56. y: $api.dom('header').offsetHeight,
  57. w: api.winWidth,
  58. h: $api.winHeight
  59. }
  60. }, function(ret, err) {
  61. switch (ret.state) {
  62. case 0:
  63. break;
  64. case 1:
  65. break;
  66. case 2:
  67. break;
  68. case 3:
  69. if (flag) {
  70. var api_text = $api.dom('.api_text');
  71. $api.html(api_text, ret.title);
  72. }else {
  73. var api_text = $api.dom('.api_text');
  74. $api.html(api_text, title);
  75. }
  76. break;
  77. case 4:
  78. break;
  79. default:
  80. break;
  81. }
  82. });
  83. }
  84. function backIndex() {
  85. var browser = api.require('webBrowser');
  86. browser.historyBack(
  87. function(ret, err) {
  88. if (!ret.status) {
  89. api.closeWin();
  90. }
  91. }
  92. );
  93. }
  94. // 监听物理返回键
  95. function keybackFun() {
  96. api.addEventListener({
  97. name: 'keyback'
  98. }, function(ret, err){
  99. var browser = api.require('webBrowser');
  100. browser.historyBack(
  101. function(ret, err) {
  102. if (!ret.status) {
  103. api.closeWin();
  104. }
  105. }
  106. );
  107. });
  108. }
  109. </script>