withdraw-log.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <!-- 提现记录 -->
  2. <template>
  3. <!-- 记录卡片 -->
  4. <view>
  5. <view style="color: #000000;">
  6. <tn-nav-bar backgroundColor="#ffffff" :bottomShadow="false">提现记录</tn-nav-bar>
  7. <!-- <view :style="{height: tobheight+'px'}"></view> -->
  8. </view>
  9. <z-paging ref="paging" refresher-complete-delay="200" v-model="withdrawLog" @query="queryList">
  10. <view slot="top" class="z_tabs" :style="{marginTop: tobheight+'px'}"></view>
  11. <view class="wallet-log-box u-p-b-30">
  12. <view class="log-list" v-for="item in withdrawLog" :key="item.id">
  13. <view class="head u-flex u-col-center u-row-between">
  14. <view class="title">提现至{{ item.extract_type == 'wechat'?'微信零钱':'其他' }}</view>
  15. <view class="num">{{ item.extract_price }} 元</view>
  16. </view>
  17. <view class="status-box item u-flex u-col-center u-row-between">
  18. <view class="item-title">申请状态</view>
  19. <view class="status-text" :style="{ color: stausMap[item.status] }">{{ item.status == 0?'申请中':item.status == 1?'已通过并打款':'已拒绝'}}</view>
  20. </view>
  21. <view v-if="item.status == 2" class="time-box item u-flex u-col-center u-row-between">
  22. <text class="item-title">拒绝原因</text>
  23. <view class="time">{{ item.refuse_reason }}</view>
  24. </view>
  25. <!-- <view class="time-box item u-flex u-col-center u-row-between">
  26. <text class="item-title">账户信息</text>
  27. <view class="time u-ellipsis-1">{{ item.apply_info | applyInfoFilter }}</view>
  28. </view> -->
  29. <!-- <view class="time-box item u-flex u-col-center u-row-between">
  30. <text class="item-title">提现单号</text>
  31. <view class="time">{{ item.apply_sn }}</view>
  32. </view> -->
  33. <!-- <view class="time-box item u-flex u-col-center u-row-between">
  34. <text class="item-title">手续费</text>
  35. <view class="time">{{ item.charge_money }} 元</view>
  36. </view> -->
  37. <view class="time-box item u-flex u-col-center u-row-between">
  38. <text class="item-title">申请时间</text>
  39. <view class="time">{{ item.create_time }}</view>
  40. </view>
  41. </view>
  42. <!-- 更多 -->
  43. <!-- <u-loadmore v-show="!isEmpty" height="80rpx" :status="loadStatus" icon-type="flower" color="#ccc" /> -->
  44. <!-- 空置页 -->
  45. <!-- <shopro-empty v-if="isEmpty" marginTop="300rpx" :image="$IMG_URL + '/imgs/empty/no_data.png'" tipText="暂无数据~"></shopro-empty> -->
  46. </view>
  47. </z-paging>
  48. <wike-loading-page :isLoading="isLoading"></wike-loading-page>
  49. </view>
  50. </template>
  51. <script>
  52. import { mapMutations, mapActions, mapState, mapGetters } from 'vuex';
  53. export default {
  54. data() {
  55. return {
  56. isLoading:true,
  57. tobheight:45,
  58. platform: this.$platform.get(),
  59. withdrawLog: [
  60. // {apply_type_text:'微信零钱',money:100,status:1,status_text:'已到账',apply_info:'51455454',apply_sn:'651515',charge_money:'0.8',createtime:'1676428876'},{apply_type_text:'微信零钱',money:100,status:1,status_text:'已到账',apply_info:'51455454',apply_sn:'651515',charge_money:'0.8',createtime:'1676428876'}
  61. ],
  62. loadStatus: 'loadmore', //loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
  63. currentPage: 1,
  64. lastPage: 1,
  65. isEmpty: false,
  66. stausMap: {
  67. 0: '#999',
  68. 1: '#EFAF41',
  69. 2: '#70C140',
  70. '-1': '#ED5B56'
  71. }
  72. };
  73. },
  74. computed: {
  75. ...mapGetters(['appInfo','isLogin', 'userInfo'])
  76. },
  77. filters: {
  78. applyInfoFilter: function (value) {
  79. if (!value) return '-';
  80. return Object.values(value).join(' | ');
  81. }
  82. },
  83. onLoad() {
  84. const that = this;
  85. if(this.platform == 'wxMiniProgram'){
  86. var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight
  87. var paddingtop = uni.getSystemInfoSync().statusBarHeight + menumtop
  88. this.tobheight = (menumtop+paddingtop+uni.getMenuButtonBoundingClientRect().height)
  89. }
  90. // this.getLog();
  91. },
  92. // 触底加载更多
  93. // onReachBottom() {
  94. // if (this.currentPage < this.lastPage) {
  95. // this.currentPage += 1;
  96. // this.getLog();
  97. // }
  98. // },
  99. methods: {
  100. queryList(pageNo, pageSize) {
  101. //这里的pageNo和pageSize会自动计算好,直接传给服务器即可
  102. const params = {
  103. page: pageNo,
  104. limit: pageSize,
  105. // level: this.level,
  106. };
  107. this.$http('commission.cashoutLog', params).then(res => {
  108. if (res.code == 0) {
  109. uni.setNavigationBarTitle({
  110. title: this.appInfo.site_name
  111. });
  112. this.$refs.paging.complete(res.data.data);
  113. this.isLoading = false;
  114. }
  115. });
  116. },
  117. // 确认提交表单
  118. getLog() {
  119. let that = this;
  120. that.loadStatus = 'loading';
  121. that.$http('commission.cashoutLog', {
  122. // page: that.currentPage
  123. }).then(res => {
  124. if (res.code === 0) {
  125. that.withdrawLog = [...that.withdrawLog, ...res.data.data];
  126. that.isEmpty = !that.withdrawLog.length;
  127. that.lastPage = res.data.last_page;
  128. that.loadStatus = that.currentPage < res.data.last_page ? 'loadmore' : 'nomore';
  129. }
  130. });
  131. }
  132. }
  133. };
  134. </script>
  135. <style lang="scss">
  136. // 记录卡片
  137. .log-list {
  138. min-height: 213rpx;
  139. background: #ffffff;
  140. margin-bottom: 10rpx;
  141. padding-bottom: 10rpx;
  142. .head {
  143. padding: 0 35rpx;
  144. height: 80rpx;
  145. border-bottom: 1rpx solid #eee;
  146. margin-bottom: 20rpx;
  147. .title {
  148. font-size: 28rpx;
  149. font-weight: 500;
  150. color: #333333;
  151. }
  152. .num {
  153. font-size: 28rpx;
  154. font-weight: 500;
  155. color: #7063d2;
  156. }
  157. }
  158. .item {
  159. padding: 0 30rpx 10rpx;
  160. .item-icon {
  161. color: #c0c0c0;
  162. font-size: 36rpx;
  163. margin-right: 8rpx;
  164. }
  165. .item-title {
  166. width: 180rpx;
  167. font-size: 24rpx;
  168. font-weight: 400;
  169. color: #c0c0c0;
  170. }
  171. .status-text {
  172. font-size: 24rpx;
  173. font-weight: 500;
  174. color: #05c3a1;
  175. }
  176. .time {
  177. font-size: 24rpx;
  178. font-weight: 400;
  179. color: #c0c0c0;
  180. }
  181. }
  182. }
  183. </style>