examineMy_win.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. funIniGroup(token);
  57. }
  58. var eHeaderLis;
  59. function funIniGroup(token){
  60. var systemType = api.systemType,heightH;
  61. if (systemType == 'ios') {
  62. heightH = $api.dom('.api_nav').offsetHeight + 70;
  63. }else if (systemType == 'android') {
  64. heightH = $api.dom('.api_nav').offsetHeight + 74.5;
  65. }
  66. var frame1= {
  67. name: 'stayExamine_frm',
  68. url: 'stayExamine_frm.html',
  69. bgColor: '#f2f2f2',
  70. bounces: false,
  71. pageParam: {
  72. data: token
  73. }
  74. },
  75. frame2={
  76. name: 'alreadyExamine_frm',
  77. url: 'alreadyExamine_frm.html',
  78. bgColor: '#f2f2f2',
  79. bounces: false,
  80. pageParam: {
  81. data: token
  82. }
  83. };
  84. frames = [frame1,frame2];
  85. api.openFrameGroup({
  86. name: 'group',
  87. scrollEnabled: false,
  88. rect: {
  89. x: 0,
  90. y: $api.dom('.api_nav').offsetHeight+$api.dom('header').offsetHeight,
  91. w: api.winWidth,
  92. h: $api.winHeight
  93. },
  94. index: 0,
  95. frames: frames
  96. }, function (ret, err) {
  97. menuSelected(ret.index);
  98. });
  99. };
  100. function menuSelected(index) {
  101. eHeaderLis = $api.domAll('.header-nav-items li');
  102. for (var i = 0; i < eHeaderLis.length; i++) {
  103. if(index == i ){
  104. $api.addCls(eHeaderLis[i], 'active');
  105. }else {
  106. $api.removeCls(eHeaderLis[i], 'active');
  107. }
  108. }
  109. }
  110. function randomSwitchBtn( tag ) {
  111. if( tag == $api.dom('.header-nav-items li.active') )return;
  112. var eFootLis = $api.domAll('.header-nav-items li');
  113. index = 0;
  114. for (var i = 0,len = eFootLis.length; i < len; i++) {
  115. if( tag == eFootLis[i] ){
  116. index = i;
  117. }else{
  118. $api.removeCls(eFootLis[i], 'active');
  119. }
  120. }
  121. $api.addCls( eFootLis[index], 'active');
  122. api.setFrameGroupIndex({
  123. name: 'group',
  124. index: index
  125. });
  126. }
  127. function backIndex() {
  128. api.closeWin();
  129. }
  130. </script>