index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <view>
  3. <u-sticky>
  4. <View>
  5. <u-tabs :list="tabList" :current="tabIndex" @click="clickTab"></u-tabs>
  6. </View>
  7. </u-sticky>
  8. <!-- 订单列表 -->
  9. <view :style="{'height':windowHeight}" >
  10. <swiper :style="{'height':windowHeight}" :current="tabIndex" @change="swiperChange">
  11. <swiper-item class="swiperItem" v-for="(item,index) in tabList" :key="index" >
  12. <scroll-view :style="{'height':windowHeight}" :scroll-y="true" @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower">
  13. <view class="orderView flex-col" v-for="i in 20" :key="i">
  14. <view class="flex-row justify-between">
  15. <view class="orderImgView">
  16. <image class="orderImg" src="/static/0e733b67a401b9b5776b5196cd5b38e0.jpg"></image>
  17. </view>
  18. <view class="orderTitle flex-col">
  19. <view class="goodsName flex-col">
  20. <text>商品名称商品名称商品名称商品名称商品名称商品名称商品名称</text>
  21. </view>
  22. <view class="specification flex-col">
  23. <text>商品规格商品规格商品规格商品规格商品规格商品规格商品规格商品规格商品规格</text>
  24. </view>
  25. <view>
  26. <text class="label">7天无理由退货</text>
  27. </view>
  28. </view>
  29. <view class="priceAndNumber flex-col">
  30. <view class="price flex-col">
  31. <text>¥81.44</text>
  32. </view>
  33. <view class="number flex-col">
  34. <text>x1</text>
  35. </view>
  36. </view>
  37. </view>
  38. <view class=" buttonView flex-row justify-end">
  39. <button class="button">申请售后</button>
  40. <button class="button">申请售后</button>
  41. <button class="button">申请售后</button>
  42. <button class="button">申请售后</button>
  43. </view>
  44. </view>
  45. </scroll-view>
  46. </swiper-item>
  47. </swiper>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. components: {
  54. },
  55. data() {
  56. return {
  57. windowHeight:'',//屏幕的可用高度
  58. tabIndex:0,
  59. tabList: [{
  60. name: '全部',
  61. }, {
  62. name: '待付款',
  63. }, {
  64. name: '待发货'
  65. }, {
  66. name: '待收货'
  67. }, {
  68. name: '待评价'
  69. }, {
  70. name: '退款/售后'
  71. }],
  72. }
  73. },
  74. onLoad() {
  75. let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
  76. console.log('+++++menuButtonInfo+++++++',menuButtonInfo)
  77. this.menuButtonTop =menuButtonInfo.top+'px'; //胶囊按钮距离屏幕上边的距离
  78. this.menuButtonLeft =menuButtonInfo.left +'px'; //胶囊按钮距离屏幕左边的距离
  79. this.searchHeight=menuButtonInfo.bottom-menuButtonInfo.top +'px' //搜索框的高度
  80. let sysInfo = uni.getSystemInfoSync()
  81. this.windowHeight =sysInfo.windowHeight-44+'px'//除标题栏栏外的屏幕可用高度
  82. },
  83. methods: {
  84. clickTab(e){
  85. this.tabIndex = e.index
  86. },
  87. swiperChange(e){
  88. this.tabIndex = e.detail.current
  89. },
  90. scrolltoupper(){
  91. },
  92. scrolltolower(){
  93. }
  94. }
  95. }
  96. </script>
  97. <style>
  98. @import '/common/css/common.css';
  99. @import './index.rpx.css';
  100. </style>