withdrawalLog.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <template>
  2. <!-- 提现记录 -->
  3. <s-layout class="wallet-wrap" :bgStyle="{'backgroundColor':'#ffffff'}" title="提现记录" navbar="normal">
  4. <view class="model-box ss-flex-col">
  5. <scroll-view class="list-box" scroll-y="true" @touchmove.stop>
  6. <view v-if="state.pagination.total > 0" style="padding: 20rpx;">
  7. <view class="list-item ss-flex ss-col-center ss-row-between "
  8. v-for="(item,index) in state.pagination.list" :key="item.id"
  9. style="padding:0;padding: 20rpx 0;border-bottom: 1px solid #c4c4c4;">
  10. <view class="ss-flex ss-col-center" style="width: 100%;">
  11. <view class="ss-flex ss-m-t-10"
  12. style="flex-direction: column;align-items: flex-start;width: 100%;">
  13. <view class="name" style="width: 100%;">
  14. {{item.withdrawalType === 1 ? '微信' : item.withdrawalType === 2 ? '支付宝' : '银行卡'}}
  15. ({{item.withdrawalAccount}})
  16. <text style="float: right;" class="color-red">
  17. ¥{{fen2yuan(item.amount) }} (消费分{{points2point(item.withdrawConsumption)}})
  18. </text>
  19. </view>
  20. <view class="time " style="width: 100%;">
  21. {{sheep.$helper.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM')}}
  22. <text style="float: right;" >{{item.status ? item.status === 1 ? '已到账' : '提现失败' : '提现中'}}</text>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. <s-empty v-else text="暂无数据" paddingTop="200" icon="/static/data-empty.png" />
  29. <uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
  30. contentdown: '点击加载更多',
  31. }" @tap="onLoadMore(true)" @scrolltolower="onLoadMore(true)" />
  32. </scroll-view>
  33. </view>
  34. </s-layout>
  35. </template>
  36. <script setup>
  37. import sheep from '@/sheep';
  38. import {
  39. onLoad,
  40. onReachBottom
  41. } from '@dcloudio/uni-app';
  42. import {
  43. computed,
  44. reactive
  45. } from 'vue';
  46. import {
  47. points2point,
  48. fen2yuan
  49. } from '@/sheep/hooks/useGoods';
  50. import _ from 'lodash';
  51. import dayjs from 'dayjs';
  52. import PointApi from '@/sheep/api/member/point';
  53. import {
  54. resetPagination
  55. } from '@/sheep/util';
  56. import WithdrawalApi from '@/sheep/api/distri/withdrawal';
  57. const userWallet = computed(() => sheep.$store('user').userWallet);
  58. const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
  59. const userInfo = computed(() => sheep.$store('user').userInfo);
  60. const sys_navBar = sheep.$platform.navbar;
  61. const state = reactive({
  62. currentTab: 0,
  63. pagination: {
  64. list: [],
  65. total: 0,
  66. pageSize: 10,
  67. pageNo: 1,
  68. },
  69. loadStatus: '',
  70. });
  71. async function getLogList() {
  72. state.loadStatus = 'loading';
  73. // isFreeze为true是冻结佣金 isFreeze为false是已拿到的佣金
  74. let {
  75. code,
  76. data
  77. } = await WithdrawalApi.getWithdrawalPage({
  78. pageNo: state.pagination.pageNo,
  79. pageSize: state.pagination.pageSize,
  80. });
  81. if (code !== 0) {
  82. return;
  83. }
  84. let list = _.concat(state.pagination.list, data.list);
  85. state.pagination.list = list;
  86. state.pagination.total = data.total;
  87. state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
  88. }
  89. onLoad(() => {
  90. getLogList();
  91. });
  92. function onLoadMore() {
  93. if (state.loadStatus === 'noMore') {
  94. return;
  95. }
  96. state.pagination.pageNo++;
  97. getLogList();
  98. }
  99. onReachBottom(() => {
  100. onLoadMore();
  101. });
  102. </script>
  103. <style lang="scss" scoped>
  104. .color-red {
  105. color: red;
  106. }
  107. .color-green {
  108. color: green;
  109. }
  110. .score-box {
  111. margin: 20rpx;
  112. border-radius: 20rpx;
  113. padding-top: 100rpx;
  114. }
  115. .avatar-box {
  116. width: 100rpx;
  117. height: 100rpx;
  118. border-radius: 50%;
  119. overflow: hidden;
  120. .avatar-img {
  121. width: 100%;
  122. height: 100%;
  123. }
  124. }
  125. .value-box {
  126. width: 100rpx;
  127. height: 100rpx;
  128. line-height: 100rpx;
  129. text-align: center;
  130. border-radius: 50%;
  131. border: 2px solid #f6f6f6;
  132. }
  133. .btn {
  134. width: 300rpx;
  135. background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
  136. border-radius: 20rpx;
  137. font-size: 30rpx;
  138. font-weight: 500;
  139. line-height: 80rpx;
  140. color: $white;
  141. position: relative;
  142. z-index: 1;
  143. }
  144. .header-box {
  145. width: 100%;
  146. background: linear-gradient(180deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%) no-repeat;
  147. background-size: 750rpx 100%;
  148. padding: 0 0 120rpx 0;
  149. box-sizing: border-box;
  150. .score-box {
  151. height: 100%;
  152. .all-num {
  153. font-size: 50rpx;
  154. font-weight: bold;
  155. color: #fff;
  156. font-family: OPPOSANS;
  157. }
  158. .all-title {
  159. font-size: 26rpx;
  160. font-weight: 500;
  161. color: #fff;
  162. }
  163. .cicon-help-o {
  164. color: #fff;
  165. font-size: 28rpx;
  166. }
  167. }
  168. }
  169. // 筛选
  170. .filter-box {
  171. height: 114rpx;
  172. background-color: $bg-page;
  173. .total-box {
  174. font-size: 24rpx;
  175. font-weight: 500;
  176. color: $dark-9;
  177. }
  178. .date-btn {
  179. background-color: $white;
  180. line-height: 54rpx;
  181. border-radius: 27rpx;
  182. padding: 0 20rpx;
  183. font-size: 24rpx;
  184. font-weight: 500;
  185. color: $dark-6;
  186. .ss-seldate-icon {
  187. font-size: 50rpx;
  188. color: $dark-9;
  189. }
  190. }
  191. }
  192. .list-box {
  193. // width: 600rpx;
  194. // padding: 0 30rpx;
  195. overflow-y: auto;
  196. height: 100vh;
  197. .list-item {
  198. background: #fff;
  199. // border-bottom: 1rpx solid #dfdfdf;
  200. padding: 30rpx;
  201. .name {
  202. font-size: 28rpx;
  203. font-weight: 500;
  204. color: rgba(102, 102, 102, 1);
  205. line-height: 28rpx;
  206. // margin-bottom: 20rpx;
  207. }
  208. .time {
  209. font-size: 24rpx;
  210. font-weight: 500;
  211. color: rgba(196, 196, 196, 1);
  212. line-height: 24px;
  213. }
  214. .add {
  215. font-size: 30rpx;
  216. font-weight: 500;
  217. color: #e6b873;
  218. }
  219. .minus {
  220. font-size: 30rpx;
  221. font-weight: 500;
  222. color: $dark-3;
  223. }
  224. }
  225. }
  226. </style>