rechargeList.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view>
  3. <u-navbar title="充值记录"></u-navbar>
  4. <view class="rechargeTime" @click="show = true">
  5. <u-picker mode="time" v-model="show" :params="params" @confirm="confirmTime" @cancel="cancelTime"></u-picker>
  6. <span>{{date.month}}月</span>
  7. <u-icon name="arrow-down-s-fill" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
  8. </view>
  9. <view class="rechargeList">
  10. <view class="rechargeList-item" @click="gotoUrl('pages/user/finance/rechargeDet?id=')">
  11. <view class="rechargeList-row"><span>充值金额</span><h4>100.00</h4></view>
  12. <view class="rechargeList-row"><p>微信支付</p><p>2021-12-31 09:00</p></view>
  13. </view>
  14. <view class="rechargeList-item">
  15. <view class="rechargeList-row"><span>充值金额</span><h4>100.00</h4></view>
  16. <view class="rechargeList-row"><p>微信支付</p><p>2021-12-31 09:00</p></view>
  17. </view>
  18. <view class="rechargeList-item">
  19. <view class="rechargeList-row"><span>充值金额</span><h4>100.00</h4></view>
  20. <view class="rechargeList-row"><p>微信支付</p><p>2021-12-31 09:00</p></view>
  21. </view>
  22. <view class="rechargeList-item">
  23. <view class="rechargeList-row"><span>充值金额</span><h4>100.00</h4></view>
  24. <view class="rechargeList-row"><p>微信支付</p><p>2021-12-31 09:00</p></view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. params: {
  34. year: true,
  35. month: true,
  36. day: false,
  37. hour: false,
  38. minute: false,
  39. second: false,
  40. timestamp: true,
  41. },
  42. show: false,
  43. date: {
  44. year: '',
  45. month: '',
  46. },
  47. }
  48. },
  49. onReady() {
  50. var date = new Date();
  51. this.date.year = date.getFullYear();
  52. this.date.month = date.getMonth() + 1;
  53. console.log(this.date)
  54. },
  55. methods: {
  56. confirmTime(params) {
  57. var m = params.month.slice(0,1)
  58. if(m == '0') {
  59. this.date.month = params.month.slice(1,2);
  60. } else {
  61. this.date.month = params.month;
  62. }
  63. this.date.year = params.year;
  64. this.show = false;
  65. },
  66. cancelTime() {
  67. this.show = false;
  68. }
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .rechargeTime{
  74. background-color: #fff;
  75. height: 44px;
  76. display: flex;
  77. align-items: center;
  78. padding: 12px 16px;
  79. border-bottom: 1px solid #f7f7f7;
  80. span{
  81. margin-right: 4px;
  82. }
  83. }
  84. .rechargeList{
  85. background-color: #fff;
  86. padding-left: 16px;
  87. .rechargeList-item{
  88. padding: 12px 16px 12px 0;
  89. border-bottom: 1px solid #f7f7f7;
  90. &:last-child{
  91. border-bottom: none;
  92. }
  93. }
  94. .rechargeList-row{
  95. display: flex;
  96. align-items: center;
  97. justify-content: space-between;
  98. h4{
  99. font-size: 16px;
  100. }
  101. p{
  102. font-size: 12px;
  103. margin-top: 4px;
  104. color:#888;
  105. }
  106. }
  107. }
  108. </style>