裂变星小程序-25.03.04
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.

278 lines
5.8 KiB

1 week ago
  1. <template>
  2. <view>
  3. <navbar title="我的钱包" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="content">
  5. <view class="card overview">
  6. <image class="bg" src="../static/center/overview-bg.png"></image>
  7. <view class="overview-info">
  8. <view class="flex user-info">
  9. <image class="avatar" :src="userInfo.headImage"></image>
  10. <text class="nick-name">{{ userInfo.nickName }}</text>
  11. </view>
  12. <view class="account">
  13. <view class="account-count">{{ `${userInfoVip.money}` }}</view>
  14. <view class="account-desc">可提现余额</view>
  15. </view>
  16. </view>
  17. <button class="flex btn-withdraw" @click="$utils.navigateTo('/pages_order/mine/withdraw')">
  18. <text>去提现</text>
  19. <image class="btn-withdraw-arrow" src="../static/center/arrow.png"></image>
  20. </button>
  21. <view class="flex overview-summary">
  22. <view>总收益<text class="highlight">{{ `${userInfoVip.sum_money}` }}</text></view>
  23. <view>已提现<text class="highlight">{{ `${userInfoVip.get_money}` }}</text></view>
  24. </view>
  25. </view>
  26. <view class="detail">
  27. <view class="flex detail-header">
  28. <view class="detail-title">
  29. <image class="bg" src="../static/center/title-bg.png"></image>
  30. <text class="text">收支明细</text>
  31. </view>
  32. <view class="detail-tools">
  33. <uv-calendars ref="calendars" @confirm="onSelectDate" />
  34. <button plain class="flex btn-calendar" @click="openCalendars">
  35. <text>{{ queryParams.time || '日期选择' }}</text>
  36. <image class="btn-calendar-arrow" src="../static/center/down.png"></image>
  37. </button>
  38. </view>
  39. </view>
  40. <view class="detail-list">
  41. <view class="card detail-list-item"
  42. v-for="item in list"
  43. :key="item.id"
  44. >
  45. <view class="flex detail-list-item-row highlight">
  46. <text>{{ item.title }}</text>
  47. <!-- status: 0- 1- -->
  48. <template v-if="item.type === 0">
  49. <text class="count count-in">{{ `+${item.price}` }}</text>
  50. </template>
  51. <template v-else>
  52. <text class="count count-out">{{ `-${item.price}` }}</text>
  53. </template>
  54. </view>
  55. <view class="flex detail-list-item-row">
  56. <text>{{ item.createTime }}</text>
  57. <text>{{ `余额:${item.money || 0}` }}</text>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. import { mapState } from 'vuex'
  67. import mixinsList from '@/mixins/list.js'
  68. export default {
  69. mixins : [mixinsList],
  70. data() {
  71. return {
  72. mixinsListApi : 'getWalletList',
  73. }
  74. },
  75. computed: {
  76. ...mapState(['userInfo', 'userInfoVip']),
  77. },
  78. onShow() {
  79. this.$store.commit('getUserInfoVip')
  80. },
  81. methods: {
  82. openCalendars() {
  83. this.$refs.calendars.open();
  84. },
  85. onSelectDate(e) {
  86. this.queryParams.time = e.fulldate
  87. this.queryParams.pageNo = 1
  88. this.getData()
  89. }
  90. },
  91. }
  92. </script>
  93. <style scoped lang="scss">
  94. .content {
  95. padding: 20rpx;
  96. }
  97. .overview {
  98. position: relative;
  99. border-radius: 14rpx;
  100. padding: 0;
  101. height: 462rpx;
  102. width: 100%;
  103. color: #04D6A3;
  104. .bg {
  105. width: 100%;
  106. height: 374rpx;
  107. }
  108. &-info {
  109. position: absolute;
  110. width: 100%;
  111. top: 0;
  112. left: 0;
  113. padding: 43rpx 0 0 54rpx;
  114. }
  115. .user-info {
  116. justify-content: flex-start;
  117. }
  118. .avatar {
  119. width: 80rpx;
  120. height: 80rpx;
  121. border-radius: 40rpx;
  122. }
  123. .nick-name {
  124. font-size: 32rpx;
  125. font-weight: 700;
  126. margin-left: 20rpx;
  127. }
  128. .account {
  129. margin-top: 44rpx;
  130. &-count {
  131. font-size: 78rpx;
  132. font-weight: 900;
  133. margin-left: -8rpx;
  134. }
  135. &-desc {
  136. font-size: 24rpx;
  137. }
  138. }
  139. .btn-withdraw {
  140. position: absolute;
  141. top: 223rpx;
  142. right: 0;
  143. background-color: #04D6A3;
  144. line-height: 1;
  145. font-size: 32rpx;
  146. padding: 20rpx 6rpx 20rpx 30rpx;
  147. border-top-left-radius: 42rpx;
  148. border-bottom-left-radius: 42rpx;
  149. &-arrow {
  150. width: 28rpx;
  151. height: 28rpx;
  152. margin-left: 22rpx;
  153. }
  154. }
  155. &-summary {
  156. position: absolute;
  157. left: 0;
  158. bottom: 0;
  159. width: 100%;
  160. padding: 28rpx 48rpx;
  161. box-sizing: border-box;
  162. justify-content: space-between;
  163. color: #1B1B1B;
  164. font-size: 24rpx;
  165. .highlight {
  166. color: #04D6A3;
  167. }
  168. }
  169. }
  170. .detail {
  171. &-header {
  172. align-items: flex-start;
  173. justify-content: space-between;
  174. margin-top: 20rpx;
  175. }
  176. &-title {
  177. position: relative;
  178. .bg {
  179. width: 139rpx;
  180. height: 13rpx;
  181. vertical-align: text-bottom;
  182. }
  183. .text {
  184. white-space: nowrap;
  185. color: #1B1B1B;
  186. font-size: 36rpx;
  187. font-weight: 900;
  188. position: absolute;
  189. top: 0;
  190. left: 0;
  191. }
  192. }
  193. &-tools {
  194. .btn-calendar {
  195. display: inline-block;
  196. width: auto;
  197. height: auto;
  198. background-color: #FFFFFF;
  199. border: none;
  200. padding: 21rpx 19rpx;
  201. box-sizing: border-box;
  202. margin: 0;
  203. line-height: 1;
  204. font-size: 24rpx;
  205. color: #999999;
  206. border-radius: 33rpx;
  207. &-arrow {
  208. width: 26rpx;
  209. height: 12rpx;
  210. margin-left: 10rpx;
  211. }
  212. }
  213. }
  214. &-list {
  215. margin-top: 25rpx;
  216. &-item {
  217. color: #999999;
  218. font-size: 24rpx;
  219. & + & {
  220. margin-top: 11rpx;
  221. }
  222. .highlight {
  223. color: #1B1B1B;
  224. font-size: 32rpx;
  225. font-weight: 700;
  226. }
  227. &-row {
  228. justify-content: space-between;
  229. }
  230. .count {
  231. &-in {
  232. color: #FF2020;
  233. }
  234. }
  235. }
  236. }
  237. }
  238. </style>