myMealCard.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view>
  3. <u-navbar title="我的饭卡"></u-navbar>
  4. <view class="background">
  5. <view class="head">
  6. <view class="balance">
  7. 饭卡余额(元)
  8. </view>
  9. <view class="time">
  10. <text class="icon"><img src="../../assets/img/riLine-information-line@1x.png" alt=""></text>
  11. <text>下次清零 2023月6月1日 0点</text>
  12. </view>
  13. </view>
  14. <view class="main">
  15. <view class="number">
  16. 330
  17. </view>
  18. <view class="img">
  19. <img src="../../assets/img/ze-card@1x.png" alt="">
  20. </view>
  21. </view>
  22. </view>
  23. <view class="content">
  24. <view class="tabs">
  25. <u-tabs bar-width="100" inactive-color="#bbbbbb" active-color="#101010" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
  26. </view>
  27. <!-- 消费 -->
  28. <view class="consumption" v-if="this.current==0">
  29. <view class="total">
  30. 6月消费105元
  31. </view>
  32. <view class="each" v-for="item in 7">
  33. <view class="place-date">
  34. <view class="place">
  35. 地方铁路食堂
  36. </view>
  37. <view class="date">
  38. 2023-04-07 12:00
  39. </view>
  40. </view>
  41. <view class="number">
  42. -15
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 餐费存入 -->
  47. <view class="deposit" v-if="this.current==1">
  48. <view class="each" v-for="item in 5">
  49. <view class="place-date">
  50. <view class="place">
  51. 2023年4月餐费存入
  52. </view>
  53. <view class="date">
  54. 2023-04-07 12:00
  55. </view>
  56. </view>
  57. <view class="number">
  58. +330
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <u-divider bg-color="#F2F4F4" border-color="#CFD2D5">已经到底了</u-divider>
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. data() {
  69. return {
  70. list: [{
  71. name: '余额消费'
  72. }, {
  73. name: '餐费存入'
  74. }],
  75. current: 0
  76. }
  77. },
  78. methods: {
  79. change(index) {
  80. this.current = index;
  81. }
  82. }
  83. }
  84. </script>
  85. <style scoped lang="scss">
  86. page{
  87. padding-bottom: 100px;
  88. }
  89. .background{
  90. background: linear-gradient(-0.06deg, rgba(246,248,248,1) -0.15%,rgba(240,225,198,1) 48.47%,rgba(236,193,148,1) 101.15%);
  91. padding: 32rpx;
  92. color: #fff;
  93. height: 231px;
  94. .head{
  95. display: flex;
  96. justify-content: space-between;
  97. align-items: center;
  98. .balance{
  99. color: rgba(51, 51, 51, 1);
  100. font-family: 'Regular';
  101. }
  102. .time{
  103. opacity: 0.7;
  104. color: rgba(49, 54, 66, 1);
  105. font-size: 24rpx;
  106. font-family: 'PingFang Regular';
  107. .icon{
  108. vertical-align: middle;
  109. margin-right: 4rpx;
  110. }
  111. }
  112. }
  113. .main{
  114. display: flex;
  115. justify-content: space-between;
  116. .number{
  117. color: rgba(16, 16, 16, 1);
  118. font-size: 80rpx;
  119. font-weight: bold;
  120. }
  121. .img{
  122. margin-top:-20rpx
  123. }
  124. }
  125. }
  126. .content{
  127. margin: -260rpx 32rpx 24rpx;
  128. background-color: #fff;
  129. border-radius: 8px 8px 0px 0px;
  130. overflow: hidden;
  131. min-height: 800rpx;
  132. /deep/.u-tab-bar{
  133. background-color: #0076FF !important ;
  134. }
  135. // 消费
  136. .consumption,.deposit{
  137. padding: 0 36rpx;
  138. .total{
  139. line-height: 88rpx;
  140. color: rgba(16, 16, 16, 1);
  141. font-size: 36rpx;
  142. border-top: 1px solid #E6E6E6;
  143. font-family: 'Alibaba-PuHuiTi-Regular';
  144. }
  145. .each{
  146. display: flex;
  147. justify-content: space-between;
  148. align-items: center;
  149. padding: 28rpx 0;
  150. border-top: 1px solid #E6E6E6;
  151. .place-date{
  152. .place{
  153. color: #101010;
  154. font-size: 32rpx;
  155. font-weight: bold;
  156. font-family: 'Alibaba-PuHuiTi-Regular';
  157. }
  158. .date{
  159. color: rgba(119, 119, 119, 1);
  160. margin-top: 16rpx;
  161. }
  162. }
  163. .number{
  164. color: rgba(31, 74, 153, 1);
  165. font-size: 48rpx;
  166. font-weight: bold;
  167. }
  168. }
  169. }
  170. }
  171. </style>