index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <view class="content">
  3. <u-sticky>
  4. <view ref="hContentWrap" class="hContentWrap h-content-wrap">
  5. <view class="tab-bar">
  6. <view class="tab-item" :class="{ active: currentTab === 0 }" @click="changeTab(0)">
  7. 服务订单
  8. </view>
  9. <view class="tab-item" :class="{ active: currentTab === 1 }" @click="changeTab(1)">
  10. 产品订单
  11. </view>
  12. </view>
  13. </view>
  14. <View class=" tabs" v-if="currentTab === 0">
  15. <u-tabs :list="tabList" :scrollable="false" lineWidth="30" lineColor="#FFE05C" :activeStyle="{
  16. color: '#333333',
  17. fontWeight: 'bold',
  18. transform: 'scale(1.05)'
  19. }" :current="tabIndex" @click="clickTab"></u-tabs>
  20. </View>
  21. </u-sticky>
  22. <!-- 订单列表 -->
  23. <view :style="{'height':windowHeight}" v-if="currentTab === 0">
  24. <swiper :style="{'height':windowHeight}" :current="tabIndex" @change="swiperChange">
  25. <swiper-item class="swiperItem" v-for="(item,index) in tabList" :key="index">
  26. <view>
  27. <mescroll-item ref="MescrollItem" :i="index" :index="tabIndex" :tabs="tabList"
  28. :height="windowHeight">
  29. </mescroll-item>
  30. </view>
  31. </swiper-item>
  32. </swiper>
  33. </view>
  34. <view class="product-order" v-if="currentTab === 1">
  35. <!-- Tab 2 内容 -->
  36. <view class="developing">
  37. <text>敬请期待...</text>
  38. </view>
  39. </view>
  40. <uni-popup ref="serialNumber">
  41. <view class="serial-number">
  42. <view class="text">
  43. <text>您的排队号</text>
  44. </view>
  45. <view class="number">
  46. <text>{{ orderNumberData.schedulingNo }}</text>
  47. </view>
  48. <view v-if="orderNumberData.isOverNo !== '否'" class="text1">
  49. <text>已过号,请重新取号</text>
  50. </view>
  51. <view v-else class="text">
  52. <text>前面还有{{ orderNumberData.waitNoNum }}人在等待</text>
  53. </view>
  54. <view class="text">
  55. <text>随时关注小程序的排队进程,过号作废</text>
  56. </view>
  57. <view class="text">
  58. <text>0851—85833828</text>
  59. </view>
  60. </view>
  61. </uni-popup>
  62. <view class="tabBarLineHeight"></view>
  63. <view class="tabBarView">
  64. <tab-bar :tabIndex="tabBarIndex"></tab-bar>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. import MescrollItem from "./module/mescrollUni-item.vue";
  70. import tabBar from "../../components/tabBar/tabBar";
  71. export default {
  72. components: {
  73. tabBar,
  74. MescrollItem
  75. },
  76. data() {
  77. return {
  78. num: 0,
  79. title: 'Hello',
  80. tabIndex: 0,
  81. tabBarIndex:3,
  82. currentTab: 0,
  83. currentServiceTab: 'orderTab1',
  84. tabList: [{
  85. name: '全部'
  86. }, {
  87. name: '当前订单'
  88. }, {
  89. name: '待付款'
  90. }, {
  91. name: '已完成'
  92. }],
  93. windowHeight: ''
  94. }
  95. },
  96. onLoad() {
  97. uni.hideTabBar({
  98. animation: false
  99. })
  100. let sysInfo = uni.getSystemInfoSync()
  101. this.windowHeight = sysInfo.windowHeight - 44 + 'px' //除标题栏栏外的屏幕可用高度
  102. },
  103. methods: {
  104. clickTab(e) {
  105. this.tabIndex = e.index
  106. },
  107. swiperChange(e) {
  108. this.tabIndex = e.detail.current
  109. },
  110. changeTab(currentTab) {
  111. this.currentTab = currentTab
  112. },
  113. }
  114. }
  115. </script>
  116. <style scoped lang="scss">
  117. //@import '/common/css/common.css';
  118. @import './index.rpx.scss';
  119. </style>