myWordeOrder_win.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. api.addEventListener({
  64. name: 'eventMyword'
  65. }, function(ret, err) {
  66. api.setFrameGroupIndex({
  67. name: 'myWordGroup',
  68. index: 0,
  69. reload:true
  70. });
  71. });
  72. }
  73. var eHeaderLis,frames;
  74. function funIniGroup(token){
  75. var systemType = api.systemType,heightH;
  76. if (systemType == 'ios') {
  77. heightH = $api.dom('.api_nav').offsetHeight + 70;
  78. }else if (systemType == 'android') {
  79. heightH = $api.dom('.api_nav').offsetHeight + 74.5;
  80. }
  81. eHeaderLis = $api.domAll('.header-nav-items li'),
  82. frames = [];
  83. for (var i = 0,len = eHeaderLis.length; i < len; i++) {
  84. frames.push( {
  85. name: 'myWord_frm'+i,
  86. url: 'myWord_frm'+i+'.html',
  87. bgColor : '#f2f2f2',
  88. bounces:true,
  89. pageParam:{
  90. data:token
  91. },
  92. })
  93. }
  94. api.openFrameGroup({
  95. name: 'myWordGroup',
  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. preload:0,
  104. index: 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: 'myWordGroup',
  134. index: index,
  135. reload:true
  136. });
  137. }
  138. function backIndex() {
  139. api.closeWin();
  140. }
  141. </script>