index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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="tabIndex"></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. currentTab: 0,
  82. currentServiceTab: 'orderTab1',
  83. tabList: [{
  84. name: '全部'
  85. }, {
  86. name: '当前订单'
  87. }, {
  88. name: '待付款'
  89. }, {
  90. name: '已完成'
  91. }],
  92. windowHeight: ''
  93. }
  94. },
  95. onLoad() {
  96. uni.hideTabBar({
  97. animation: false
  98. })
  99. let sysInfo = uni.getSystemInfoSync()
  100. this.windowHeight = sysInfo.windowHeight - 44 + 'px' //除标题栏栏外的屏幕可用高度
  101. },
  102. methods: {
  103. clickTab(e) {
  104. this.tabIndex = e.index
  105. },
  106. swiperChange(e) {
  107. this.tabIndex = e.detail.current
  108. // if (this.$refs.MescrollItem[e.detail.current].orderList.length>0){
  109. // this.$refs.MescrollItem[e.detail.current].downCallback()
  110. // }
  111. },
  112. changeTab(currentTab) {
  113. this.currentTab = currentTab
  114. },
  115. }
  116. }
  117. </script>
  118. <style scoped lang="scss">
  119. @import '/common/css/common.css';
  120. @import './index.rpx.scss';
  121. </style>