cashlist.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view class="content">
  3. <view class="box">
  4. <view class="orderItem" v-for="(item, index) in list" :key="index">
  5. <view class="orderInfo">
  6. <view class="info1">
  7. <view>{{ item.bank }}</view>
  8. <view>+{{ item.money }}</view>
  9. </view>
  10. <view class="info2">
  11. <view>{{ parse.filterTime(item.createtime) }}</view>
  12. <view :class="item.status == 1 ? 'color1' : ''">
  13. {{ item.status == 0 ? '申请中' : item.status == 1 ? '提现成功' : item.status == 2 ? '拒绝提现' : '拒绝提现' }}
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <view v-if="!list.length" style='color:#999;text-align:center;margin:150rpx 0;font-size:30rpx'>暂无数据</view>
  19. </view>
  20. </view>
  21. </template>
  22. <script module="parse" lang="wxs">
  23. module.exports = {
  24. filterTime: function(time) {
  25. console.log(time)
  26. var nowDate = getDate(time * 1000);
  27. var year = nowDate.getFullYear();
  28. var month = nowDate.getMonth() + 1;
  29. var date = nowDate.getDate();
  30. var hours = nowDate.getHours();
  31. var minutes = nowDate.getMinutes();
  32. var seconds = nowDate.getSeconds();
  33. month = month > 9 ? month : '0' + month;
  34. date = date > 9 ? date : '0' + date;
  35. hours = hours > 9 ? hours : '0' + hours;
  36. minutes = minutes > 9 ? minutes : '0' + minutes;
  37. seconds=seconds>9?seconds:'0'+seconds;
  38. return year + '-' + month + '-' + date + " " + hours + ":" + minutes+ ":" + seconds;
  39. }
  40. }
  41. </script>
  42. <script>
  43. // pages/backstage/index/index.js
  44. var app = getApp();
  45. // import { request } from '../../../utils/request.js';
  46. export default {
  47. data() {
  48. return {
  49. page: 1,
  50. list: [],
  51. loaded: false,
  52. pageSize:10
  53. };
  54. }
  55. /**
  56. * 生命周期函数--监听页面加载
  57. */,
  58. onLoad: function (options) {
  59. this.getlist();
  60. },
  61. /**
  62. * 生命周期函数--监听页面初次渲染完成
  63. */
  64. onReady: function () {},
  65. /**
  66. * 生命周期函数--监听页面显示
  67. */
  68. onShow: function () {},
  69. /**
  70. * 生命周期函数--监听页面隐藏
  71. */
  72. onHide: function () {},
  73. /**
  74. * 生命周期函数--监听页面卸载
  75. */
  76. onUnload: function () {},
  77. /**
  78. * 页面相关事件处理函数--监听用户下拉动作
  79. */
  80. onPullDownRefresh: function () {
  81. this.init();
  82. this.getlist();
  83. uni.stopPullDownRefresh();
  84. },
  85. /**
  86. * 页面上拉触底事件的处理函数
  87. */
  88. onReachBottom: function () {
  89. this.loaded || this.getlist();
  90. },
  91. /**
  92. * 用户点击右上角分享
  93. */
  94. onShareAppMessage: function () {},
  95. methods: {
  96. async getlist() {
  97. var that = this;
  98. let res = await this.$api.request('/withdraw/index', 'GET', {
  99. page: this.page,
  100. pagesize: this.pageSize
  101. });
  102. console.log(res)
  103. if (res) {
  104. if (res.rows.length > 0) {
  105. this.list= this.list.concat(res.rows);
  106. this.page++;
  107. } else {
  108. this.loaded = true
  109. this.$api.msg('没有更多数据');
  110. }
  111. }
  112. },
  113. init() {
  114. this.setData({
  115. list: [],
  116. Page: 1,
  117. loaded: false
  118. });
  119. }
  120. }
  121. };
  122. </script>
  123. <style>
  124. page {
  125. background: #f4f5f9;
  126. }
  127. .content {
  128. margin: 26rpx;
  129. background: #fff;
  130. border-radius: 20rpx;
  131. }
  132. .orderItem {
  133. display: flex;
  134. align-items: center;
  135. padding: 28rpx 0 20rpx;
  136. border-bottom: 1px solid #e4e5ee;
  137. }
  138. .orderItem > image {
  139. width: 116rpx;
  140. height: 116rpx;
  141. border-radius: 12rpx;
  142. }
  143. .orderInfo {
  144. display: flex;
  145. flex-direction: column;
  146. flex: 1;
  147. justify-content: space-between;
  148. margin-left: 26rpx;
  149. }
  150. .info1 {
  151. display: flex;
  152. align-items: center;
  153. justify-content: space-between;
  154. padding-right: 30rpx;
  155. }
  156. .info1 > view:nth-child(1) {
  157. font-size: 28rpx;
  158. width: 300rpx;
  159. overflow: hidden;
  160. text-overflow: ellipsis;
  161. white-space: nowrap;
  162. }
  163. .info1 > view:nth-child(2) {
  164. font-size: 28rpx;
  165. }
  166. .info2 {
  167. display: flex;
  168. align-items: center;
  169. justify-content: space-between;
  170. padding-right: 30rpx;
  171. margin-top: 6rpx;
  172. }
  173. .info2 > view:nth-child(1) {
  174. color: #9194a6;
  175. }
  176. .info2 > view:nth-child(2) {
  177. color: #9194a6;
  178. }
  179. .info3 {
  180. color: #9194a6;
  181. }
  182. .color1 {
  183. color: #FB4C6F !important;
  184. }
  185. view{
  186. font-size: 24rpx;
  187. }
  188. </style>