bybusList.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view>
  3. <car-common mytitle="乘车记录" ref="common"></car-common>
  4. <scroll-view v-show="recordList.length" :style="'height: '+clientHeight+'px;'" scroll-y="true" @scrolltolower="lower">
  5. <view class="ticket-item" v-for="item,i in recordList" :key="i" @click="gotoUrl(item.id)">
  6. <view class="ticket-item-left">
  7. <view class="ticket-head">
  8. <u-avatar :src="item.imageUrl" size="mini"></u-avatar>
  9. <h3>{{item.startStation}} - {{item.endStation}}</h3>
  10. </view>
  11. <view class="ticket-text">
  12. <view class="ticket-text-row">
  13. <view class="ticket-text-row-item">
  14. <p>票种:</p><span>{{item.ticketTypeName}}</span>
  15. </view>
  16. <view class="ticket-text-row-item">
  17. <p>货票:</p><span>¥{{item.goodTicket}}</span>
  18. </view>
  19. </view>
  20. <view class="ticket-text-row ">
  21. <p>购票时间:</p><h4>{{item.payTime}}</h4>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="ticket-item-right " :class="item.status==2?'overdue':''">
  26. <h3>{{item.totalFee}}</h3>
  27. <p>票价</p>
  28. </view>
  29. </view>
  30. <view style="text-align: center;">{{listForm.pageIndex>listForm.totalPage?'没有更多记录了':'下拉刷新'}}</view>
  31. </scroll-view>
  32. <view v-show="isLoading&&recordList.length==0" style="text-align:center;margin-top: 80px;" >
  33. <img src="static/img/blankpage.png" style="width: 50%;" alt="" >
  34. <view>暂无信息</view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import api from './bybusList.js'
  40. export default api;
  41. </script>
  42. <style>
  43. page{
  44. background-color: #f7f7f7;
  45. }
  46. </style>
  47. <style scoped lang="scss">
  48. .ticket-item{
  49. background-color: #fff;
  50. margin:20rpx;
  51. border-radius: 10px;
  52. display: flex;
  53. justify-content: space-between;
  54. .ticket-text-row-item{
  55. display: flex;
  56. align-items: center;
  57. margin-right: 10px;
  58. }
  59. .ticket-item-left{
  60. padding: 20rpx;
  61. .ticket-head{
  62. display: flex;
  63. align-items: center;
  64. h3{
  65. margin-left: 10rpx;
  66. }
  67. }
  68. .ticket-text{
  69. margin-top: 20rpx;
  70. .ticket-text-row{
  71. display: flex;
  72. align-items: center;
  73. margin-bottom: 10rpx;
  74. &:last-child{
  75. margin-bottom: 0;
  76. }
  77. span{
  78. color:#007AFF
  79. }
  80. h4{
  81. color:#999;
  82. font-weight: normal;
  83. }
  84. }
  85. }
  86. }
  87. .ticket-item-right{
  88. width: 120px;
  89. display: flex;
  90. flex-direction: column;
  91. justify-content: center;
  92. align-items: center;
  93. border-left: 1px dashed #eee;
  94. position: relative;
  95. &:before{
  96. content: '';
  97. position: absolute;
  98. height: 30rpx;
  99. width: 30rpx;
  100. background-color: #f7f7f7;
  101. border-radius: 50%;
  102. left: -15rpx;
  103. top:-15rpx;
  104. }
  105. &:after{
  106. content: '';
  107. position: absolute;
  108. height: 30rpx;
  109. width: 30rpx;
  110. background-color: #f7f7f7;
  111. border-radius: 50%;
  112. left: -15rpx;
  113. bottom:-15rpx;
  114. }
  115. h3{
  116. color:#007AFF;
  117. font-size:24px;
  118. }
  119. &.overdue{
  120. background:url(/static/img/overdue.png) no-repeat center center;
  121. background-size:75%;
  122. }
  123. }
  124. }
  125. </style>