examineMy_win.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. .header-nav-items li{
  18. color: #bdc3c7;
  19. }
  20. .header-nav-items .active{
  21. color: #16a085;
  22. }
  23. .header-nav-items .active::after{
  24. background: #16a085;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <div class="api_layout">
  30. <header class="header-login">
  31. <img class="backBtn" src="../../image/btn_back.png" alt="" tapmode onclick="backIndex()">
  32. <p class="api_text">我的审核</p>
  33. </header>
  34. <div class="api_nav">
  35. <div class="header-nav scroller nav-haohuo" id="navScroll">
  36. <ul class="header-nav-items flex-wrap">
  37. <li class="active flex-con" tapmode="active" onclick="randomSwitchBtn(this)">
  38. 待审核
  39. </li>
  40. <li class="flex-con" tapmode="active" onclick="randomSwitchBtn(this)">
  41. 已审核
  42. </li>
  43. </ul>
  44. </div>
  45. </div>
  46. </div>
  47. </body>
  48. </html>
  49. <script type="text/javascript" src="../../script/api.js"></script>
  50. <script type="text/javascript">
  51. apiready = function () {
  52. $api.fixStatusBar($api.dom('header') );
  53. api.parseTapmode();
  54. var info = $api.getStorage('data'),
  55. token = JSON.parse(info).data.access_token;
  56. api.addEventListener({
  57. name: 'eventWord'
  58. }, function(ret, err) {
  59. api.setFrameGroupIndex({
  60. name: 'examineGroup',
  61. index: 1,
  62. reload:true
  63. });
  64. });
  65. funIniGroup(token);
  66. }
  67. var eHeaderLis;
  68. function funIniGroup(token){
  69. var systemType = api.systemType,heightH;
  70. if (systemType == 'ios') {
  71. heightH = $api.dom('.api_nav').offsetHeight + 70;
  72. }else if (systemType == 'android') {
  73. heightH = $api.dom('.api_nav').offsetHeight + 74.5;
  74. }
  75. var frame1= {
  76. name: 'stayExamine_frm',
  77. url: 'stayExamine_frm.html',
  78. bgColor: '#f2f2f2',
  79. bounces: false,
  80. pageParam: {
  81. data: token
  82. }
  83. },
  84. frame2={
  85. name: 'alreadyExamine_frm',
  86. url: 'alreadyExamine_frm.html',
  87. bgColor: '#f2f2f2',
  88. bounces: false,
  89. pageParam: {
  90. data: token
  91. }
  92. };
  93. frames = [frame1,frame2];
  94. api.openFrameGroup({
  95. name: 'examineGroup',
  96. scrollEnabled: false,
  97. rect: {
  98. x: 0,
  99. y: $api.dom('.api_nav').offsetHeight+$api.dom('header').offsetHeight,
  100. w: api.winWidth,
  101. h: $api.winHeight
  102. },
  103. index: 0,
  104. preload:0,
  105. frames: frames
  106. }, function (ret, err) {
  107. menuSelected(ret.index);
  108. });
  109. };
  110. function menuSelected(index) {
  111. eHeaderLis = $api.domAll('.header-nav-items li');
  112. for (var i = 0; i < eHeaderLis.length; i++) {
  113. if(index == i ){
  114. $api.addCls(eHeaderLis[i], 'active');
  115. }else {
  116. $api.removeCls(eHeaderLis[i], 'active');
  117. }
  118. }
  119. }
  120. function randomSwitchBtn( tag ) {
  121. if( tag == $api.dom('.header-nav-items li.active') )return;
  122. var eFootLis = $api.domAll('.header-nav-items li');
  123. index = 0;
  124. for (var i = 0,len = eFootLis.length; i < len; i++) {
  125. if( tag == eFootLis[i] ){
  126. index = i;
  127. }else{
  128. $api.removeCls(eFootLis[i], 'active');
  129. }
  130. }
  131. $api.addCls( eFootLis[index], 'active');
  132. api.setFrameGroupIndex({
  133. name: 'examineGroup',
  134. index: index,
  135. reload:true
  136. });
  137. }
  138. function backIndex() {
  139. api.closeWin();
  140. }
  141. </script>