猫妈狗爸伴宠师小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
2.0 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <!-- <div>交易明细</div> -->
  3. <view class="box">
  4. <view class="top flex" :style="{ borderRadius: '31.5rpx' }">
  5. <view class="income flex element" :style="{ borderRadius: '31.5rpx' }">
  6. 收入明细
  7. </view>
  8. <view class="income flex element" :style="{ borderRadius: '31.5rpx' }">
  9. 支出明细
  10. </view>
  11. </view>
  12. <view v-for="(item,index) in list" :key="index" class="Recharge flex">
  13. <view class="flex">
  14. <image src="https://img1.baidu.com/it/u=3034232350,1041791648&fm=253&fmt=auto&app=138&f=PNG?w=500&h=500"
  15. mode=""></image>
  16. <view class="text1">
  17. <view class="text2">
  18. {{ item.title }}
  19. </view>
  20. <view>
  21. 2020-12-29 12:54:54
  22. </view>
  23. </view>
  24. </view>
  25. <view class="text3">
  26. {{ item.type == '收入' ? '+' : '-' }}{{ item.amount }}
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script setup>
  32. import { ref } from "vue"
  33. import { amountLogList } from "@/api/amount/index.js"
  34. import {
  35. onShow
  36. } from "@dcloudio/uni-app"
  37. onShow(() => {
  38. getRunningWater()
  39. })
  40. const list = ref([]);
  41. // 获取流水
  42. const getRunningWater = async () => {
  43. let response = await amountLogList({
  44. type : 1
  45. });
  46. if(response.code == 200) {
  47. list.value = response.data
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .box {
  53. width: 750rpx;
  54. height: 1452rpx;
  55. background-color: #FFFFFF;
  56. padding: 2% 2% 0 2%;
  57. box-sizing: border-box;
  58. }
  59. .top {
  60. width: 722rpx;
  61. height: 63rpx;
  62. background-color: #F3F3F3;
  63. }
  64. .element:hover {
  65. background-color: #FFBF60;
  66. color: white;
  67. }
  68. .income {
  69. width: 361rpx;
  70. height: 63rpx;
  71. line-height: 63rpx;
  72. font-size: 30rpx;
  73. justify-content: center;
  74. }
  75. .Recharge {
  76. padding: 3% 3% 0 2%;
  77. box-sizing: border-box;
  78. justify-content: space-between;
  79. }
  80. .flex {
  81. display: flex;
  82. }
  83. .text1 {
  84. font-size: 30rpx;
  85. color: #949494;
  86. }
  87. .Recharge image {
  88. width: 56rpx;
  89. height: 56rpx;
  90. margin-top: 0.5%;
  91. }
  92. .text2 {
  93. font-weight: 700;
  94. color: #333333;
  95. }
  96. .text3 {
  97. color: #FF2A2A;
  98. }
  99. </style>