myWordeOrder_win.html 4.2 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. <li class="flex-con" tapmode="active" onclick="randomSwitchBtn(this)">
  44. 被驳回
  45. </li>
  46. <li class="flex-con" tapmode="active" onclick="randomSwitchBtn(this)">
  47. 已通过
  48. </li>
  49. </ul>
  50. </div>
  51. </div>
  52. </div>
  53. </body>
  54. </html>
  55. <script type="text/javascript" src="../../script/api.js"></script>
  56. <script type="text/javascript">
  57. apiready = function () {
  58. $api.fixStatusBar($api.dom('header') );
  59. api.parseTapmode();
  60. var info = $api.getStorage('data'),
  61. token = JSON.parse(info).data.access_token;
  62. funIniGroup(token);
  63. }
  64. var eHeaderLis,frames;
  65. function funIniGroup(token){
  66. var systemType = api.systemType,heightH;
  67. if (systemType == 'ios') {
  68. heightH = $api.dom('.api_nav').offsetHeight + 70;
  69. }else if (systemType == 'android') {
  70. heightH = $api.dom('.api_nav').offsetHeight + 74.5;
  71. }
  72. eHeaderLis = $api.domAll('.header-nav-items li'),
  73. frames = [];
  74. for (var i = 0,len = eHeaderLis.length; i < len; i++) {
  75. frames.push( {
  76. name: 'myWord_frm'+i,
  77. url: 'myWord_frm'+i+'.html',
  78. bgColor : '#f2f2f2',
  79. bounces:true,
  80. pageParam:{
  81. data:token
  82. },
  83. })
  84. }
  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>