猫妈狗爸伴宠师小程序前端代码
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.

170 lines
3.1 KiB

3 months ago
3 months ago
3 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
2 months ago
2 months ago
2 months ago
2 months ago
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',backgroundColor: currentTab === 1 ? '#FFBF60' : '#F3F3F3',
  6. color: currentTab === 1 ? 'white' : 'black' }" @click="tabClick(1)">
  7. 收入明细
  8. </view>
  9. <view class="income flex element" :style="{ borderRadius: '31.5rpx',backgroundColor: currentTab === 2 ? '#FFBF60' : '#F3F3F3',
  10. color: currentTab === 2 ? 'white' : 'black'}" @click="tabClick(2)">
  11. 支出明细
  12. </view>
  13. </view>
  14. <view class="mt20" v-for="(item,index) in detaliList" :key="index">
  15. <view class="Recharge flex mb28">
  16. <view class="flex">
  17. <!-- <image src="https://img1.baidu.com/it/u=3034232350,1041791648&fm=253&fmt=auto&app=138&f=PNG?w=500&h=500"
  18. mode=""></image> -->
  19. <image :src="icon" mode=""></image>
  20. <view class="text1">
  21. <view class="text2">
  22. {{item.title}}
  23. </view>
  24. <view>
  25. {{item.time}}
  26. </view>
  27. </view>
  28. </view>
  29. <view class="text3">
  30. ¥ {{item.amont}}
  31. </view>
  32. </view>
  33. <up-line color="#C7C7C7"></up-line>
  34. </view>
  35. </view>
  36. </template>
  37. <script setup>
  38. import {
  39. ref,
  40. reactive,
  41. onMounted
  42. } from 'vue';
  43. import {
  44. getTransactionDetailsList
  45. } from "@/api/home.js"
  46. const icon = ref('/static/images/levelImage/money.png')
  47. const detaliList = reactive([{
  48. title: "合伙人推广佣金",
  49. time: "2020-12-29 12:54:54",
  50. amont: "168.00"
  51. },
  52. {
  53. title: "合伙人推广佣金",
  54. time: "2020-12-29 12:54:54",
  55. amont: "168.00"
  56. },
  57. ])
  58. const state = reactive({
  59. transactionType: 0
  60. })
  61. onMounted(() => {
  62. getList()
  63. })
  64. const getList = () => {
  65. getTransactionDetailsList({
  66. transactionType: state.transactionType
  67. })
  68. }
  69. const currentTab = ref(1);
  70. const tabClick = (val) => {
  71. detaliList.splice(0, detaliList.length)
  72. switch (val) {
  73. case 1:
  74. detaliList.push({
  75. title: "合伙人推广佣金",
  76. time: "2020-12-29 12:54:54",
  77. amont: "168.00"
  78. }, {
  79. title: "合伙人推广佣金",
  80. time: "2020-12-29 12:54:54",
  81. amont: "168.00"
  82. }, )
  83. currentTab.value = val;
  84. break;
  85. case 2:
  86. detaliList.push({
  87. title: "提现",
  88. time: "2020-12-29 12:54:54",
  89. amont: "168.00"
  90. }, )
  91. currentTab.value = val;
  92. break;
  93. }
  94. }
  95. </script>
  96. <style scoped lang="scss">
  97. .box {
  98. width: 750rpx;
  99. height: 100vh;
  100. background-color: #FFFFFF;
  101. padding: 2% 2% 0 2%;
  102. box-sizing: border-box;
  103. }
  104. .top {
  105. width: 722rpx;
  106. height: 63rpx;
  107. background-color: #F3F3F3;
  108. }
  109. // .element:hover {
  110. // background-color: #FFBF60;
  111. // color: white;
  112. // }
  113. .income {
  114. width: 361rpx;
  115. height: 63rpx;
  116. line-height: 63rpx;
  117. font-size: 30rpx;
  118. justify-content: center;
  119. }
  120. .Recharge {
  121. padding: 3% 3% 0 2%;
  122. box-sizing: border-box;
  123. justify-content: space-between;
  124. // background-color: red;
  125. }
  126. .flex {
  127. display: flex;
  128. }
  129. .text1 {
  130. font-size: 30rpx;
  131. color: #949494;
  132. }
  133. .Recharge image {
  134. width: 56rpx;
  135. height: 56rpx;
  136. margin-top: 0.5%;
  137. }
  138. .text2 {
  139. font-weight: 700;
  140. color: #333333;
  141. }
  142. .text3 {
  143. color: #FF2A2A;
  144. }
  145. </style>