useDetail.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view class="container">
  3. <image class="banner" src="@/static/images/mine/back.png" mode="aspectFill" />
  4. <view class="title" :style="{ top: `${paddingTop * 2}rpx` }">
  5. <view class="title_back" @click="handleBack">
  6. <wd-icon name="thin-arrow-left" color="#001713" size="18"></wd-icon>
  7. </view>
  8. 使用明细
  9. </view>
  10. <!-- 选择时间区域 -->
  11. <view class="time">
  12. <wd-datetime-picker type="year-month" v-model="timeValue" @confirm="handleConfirm" />
  13. </view>
  14. <!-- 内容区域 -->
  15. <scroll-view scroll-y class="body" @scrolltolower="scrolltolower">
  16. <!-- 每一个明细区域 -->
  17. <view class="body_item" v-for="item in 8" :key="8">
  18. <view class="item_msg">
  19. <view class="">订单号:12345678</view>
  20. <view class="msg_detail">充值+100</view>
  21. </view>
  22. <view class="">描述:支付100,赠送补贴包100</view>
  23. <view class="item_text">主余额:100 补贴余额:100 余额:100</view>
  24. <view class="item_text">2025-10-16 14:50</view>
  25. </view>
  26. </scroll-view>
  27. </view>
  28. </template>
  29. <script setup>
  30. import { onMounted, ref } from 'vue'
  31. // 胶囊按钮距离页面顶部的距离
  32. const paddingTop = ref(0)
  33. // 当前选择的时间
  34. const timeValue = ref(Date.now())
  35. onMounted(() => {
  36. paddingTop.value = uni.getMenuButtonBoundingClientRect().top
  37. })
  38. // 选择时间回调
  39. const handleConfirm = (e) => {
  40. console.log(e)
  41. }
  42. // 页面滚动到底部触发的回调
  43. const scrolltolower = () => {
  44. console.log(111)
  45. }
  46. // 顶部返回图标回调
  47. const handleBack = () => {
  48. uni.navigateBack()
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .container {
  53. position: relative;
  54. height: 100vh;
  55. color: #001713;
  56. background-color: #fff;
  57. overflow: hidden;
  58. .banner {
  59. width: 100%;
  60. height: 482rpx;
  61. }
  62. .title {
  63. position: absolute;
  64. display: flex;
  65. align-items: center;
  66. width: 100vh;
  67. font-size: 40rpx;
  68. .title_back {
  69. margin-left: 26rpx;
  70. margin-right: 252rpx;
  71. }
  72. }
  73. .time {
  74. position: absolute;
  75. top: 130rpx;
  76. left: 32rpx;
  77. width: 220rpx;
  78. :deep(.wd-cell) {
  79. background-color: transparent;
  80. }
  81. }
  82. .body {
  83. position: absolute;
  84. top: 230rpx;
  85. box-sizing: border-box;
  86. padding: 10rpx 30rpx;
  87. height: calc(100vh - 230rpx);
  88. color: #001713;
  89. font-size: 28rpx;
  90. background-color: #fff;
  91. .body_item {
  92. padding: 20rpx 0;
  93. margin-bottom: 10rpx;
  94. border-bottom: 2rpx solid #d5d5d5;
  95. .item_msg {
  96. display: flex;
  97. align-items: center;
  98. justify-content: space-between;
  99. margin-bottom: 8rpx;
  100. .msg_detail {
  101. font-size: 36rpx;
  102. font-weight: bold;
  103. }
  104. }
  105. .item_text {
  106. margin-top: 12rpx;
  107. color: #aba6a6;
  108. font-size: 24rpx;
  109. }
  110. }
  111. }
  112. }
  113. </style>