orderList_win.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. <title>Hello APP</title>
  7. <link rel="stylesheet" type="text/css" href="../../css/api.css" />
  8. <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
  9. <link rel="stylesheet" type="text/css" href="../../css/aui-win.css" />
  10. </head>
  11. <style>
  12. </style>
  13. <body>
  14. <header class="aui-bar aui-bar-nav aui-bar-info" id="aui-header">
  15. <a class="aui-btn aui-btn-info aui-pull-left" tapmode onclick="closeWin()"> <span class="aui-iconfont aui-icon-left"></span> </a>
  16. <div class="aui-title" id="aui-title">
  17. 订单列表
  18. </div>
  19. <div class="aui-tab" id="tab">
  20. <div class="aui-tab-item" v-for="(b,i) in stateArr" v-bind:class="i == chooseIndex ? 'aui-active' : ''" v-on:click="chooseStatus(i)">
  21. {{b.name}}
  22. </div>
  23. </div>
  24. </header>
  25. </body>
  26. <script type="text/javascript" src="../../script/api.js"></script>
  27. <script type="text/javascript" src="../../script/vue.js"></script>
  28. <script type="text/javascript">
  29. function closeWin() {
  30. api.closeWin({
  31. });
  32. }
  33. apiready = function() {
  34. new Vue({
  35. el : '#aui-header',
  36. data : {
  37. chooseIndex : 0,
  38. stateArr : [{
  39. name : "全部订单",
  40. id : '',
  41. }, {
  42. name : "待接单",
  43. id : 0
  44. }, {
  45. name : "已接单",
  46. id : 1
  47. }, {
  48. name : "已驳回",
  49. id : 2
  50. }],
  51. },
  52. methods : {
  53. chooseStatus : function(index) {
  54. this.chooseIndex = index;
  55. api.execScript({
  56. frameName : 'orderList_body',
  57. script: 'chooseIndex("' + index + '");'
  58. });
  59. }
  60. },
  61. mounted : function() {
  62. api.parseTapmode();
  63. var header = $api.byId('aui-header');
  64. $api.fixStatusBar(header);
  65. var headerPos = $api.offset(header);
  66. var body_h = $api.offset($api.dom('body')).h;
  67. api.openFrame({
  68. name : 'orderList_body',
  69. url : 'orderList_body.html',
  70. bounces : false,
  71. vScrollBarEnabled : false,
  72. hScrollBarEnabled : false,
  73. rect : {
  74. x : 0,
  75. y : headerPos.h,
  76. w : 'auto',
  77. h : 'auto'
  78. },
  79. bgColor : '#f5f5f5',
  80. })
  81. }
  82. })
  83. };
  84. </script>
  85. </html>