index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <view>
  3. <view class="header-box"></view>
  4. <view class="header-title">
  5. <text style="margin-top: 4%;">已提现(元)</text>
  6. <text style="margin-top: 2%;font-size: 36rpx;">{{cashObj.totality || '0'}}</text>
  7. <view class="apply-cash-box" @click.stop="goApplyCash">
  8. <text>申请提现</text>
  9. <image src="/static/arrow-go2.png" mode=""></image>
  10. </view>
  11. </view>
  12. <view class="count-deatil-box">
  13. <view class="count-detail-title">
  14. 提现明细
  15. </view>
  16. <view class="leader-info" v-for="item in cashObj.list" :key='item.id'>
  17. <view class="leader-column">
  18. <view>
  19. <text style="font-size: 30rpx;">{{item.time}}</text>
  20. </view>
  21. </view>
  22. <view class="display-column">
  23. <view class="count-sum">
  24. {{item.money || '0'}}
  25. </view>
  26. <view class="count-sum" style="color: #ccc;">
  27. {{item.status === '1' ? '已到账' : '进行中'}}
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. var md5 = require('../../../common/md5.js')
  36. //0进行中 , 1已到账
  37. export default {
  38. data() {
  39. return {
  40. title: 'selfCenter',
  41. cashObj:{},
  42. cashOutList: [
  43. // {
  44. // money: '28.35',
  45. // time: '2019-02-14 00:00',
  46. // status:'进行中',
  47. // id: 1
  48. // },
  49. // {
  50. // money: '66.12',
  51. // time: '2019-02-15 00:00',
  52. // status:'已到账',
  53. // id: 2
  54. // },
  55. // {
  56. // money: '32.15',
  57. // time: '2019-02-15 01:00',
  58. // status:'进行中',
  59. // id:3
  60. // },
  61. // {
  62. // money: '12.00',
  63. // time: '2019-02-16 00:00',
  64. // status:'已到账',
  65. // id: 4
  66. // }
  67. ]
  68. };
  69. },
  70. onLoad() {
  71. },
  72. onShow() {
  73. this.getCashOutList()
  74. },
  75. methods: {
  76. goApplyCash(){
  77. uni.navigateTo({
  78. url: '/pages/selfCenter/cashoutPage/applyPage/index',
  79. success: res => {},
  80. fail: () => {},
  81. complete: () => {}
  82. });
  83. },
  84. getCashOutList(){
  85. uni.showLoading({
  86. title: '加载中',
  87. });
  88. let that = this;
  89. uni.request({
  90. url: getApp().globalData.shareUrl, //需要设置为全局
  91. method: 'POST',
  92. header: {
  93. 'content-type': 'application/x-www-form-urlencoded'
  94. },
  95. data: {
  96. method: 'getWithdrawdepositList',
  97. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  98. page: '',
  99. pageSize:'',
  100. uid:getApp().globalData.user_id,
  101. sign: md5('getWithdrawdepositList' + getApp().globalData.globalTimestamp)
  102. },
  103. success: res => {
  104. if (res.data.code === 200) {
  105. uni.hideLoading();
  106. that.cashObj = res.data.msg;
  107. //that.cashOutList = res.data.msg
  108. }
  109. }
  110. });
  111. }
  112. }
  113. };
  114. </script>
  115. <style>
  116. .header-box {
  117. width: 100%;
  118. height: 180rpx;
  119. background: #1a9ed3;
  120. }
  121. .header-title {
  122. width: 93%;
  123. height: 150rpx;
  124. display: flex;
  125. flex-direction: column;
  126. align-items: center;
  127. background: #fff;
  128. z-index: 99;
  129. border-radius: 10rpx;
  130. font-size: 30rpx;
  131. margin: -13% auto;
  132. margin-bottom: 3%;
  133. position: relative;
  134. }
  135. .count-sum {
  136. color: red;
  137. font-size: 28rpx;
  138. }
  139. .count-deatil-box {
  140. width: 93%;
  141. border-radius: 10rpx;
  142. display: flex;
  143. flex-direction: column;
  144. align-items: center;
  145. background: #fff;
  146. margin: 0 auto;
  147. }
  148. .count-detail-title {
  149. width: 89%;
  150. border-bottom: 1px solid #dbdbdb;
  151. padding: 10px;
  152. font-size: 32rpx;
  153. }
  154. .leader-info {
  155. width: 90%;
  156. display: flex;
  157. align-items: center;
  158. background: #fff;
  159. padding: 20rpx;
  160. border-bottom: 1px solid #ccc;
  161. }
  162. .leader-column {
  163. display: flex;
  164. flex-direction: column;
  165. justify-content: space-between;
  166. height: 90rpx;
  167. font-size: 28rpx;
  168. margin-right: 20%;
  169. width: 400rpx;
  170. line-height: 90rpx;
  171. }
  172. .display-column {
  173. display: flex;
  174. flex-direction: column;
  175. align-items: center;
  176. justify-content: space-around;
  177. }
  178. .apply-cash-box {
  179. position: absolute;
  180. right: 5px;
  181. top: 14px;
  182. display: flex;
  183. align-items: center
  184. }
  185. .apply-cash-box image {
  186. width: 48rpx;
  187. height: 48rpx;
  188. }
  189. </style>