index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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}}
  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. let that = this;
  86. uni.request({
  87. url: getApp().globalData.shareUrl, //需要设置为全局
  88. method: 'POST',
  89. header: {
  90. 'content-type': 'application/x-www-form-urlencoded'
  91. },
  92. data: {
  93. method: 'getWithdrawdepositList',
  94. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  95. page: '',
  96. pageSize:'',
  97. uid:getApp().globalData.user_id,
  98. sign: md5('getWithdrawdepositList' + getApp().globalData.globalTimestamp)
  99. },
  100. success: res => {
  101. if (res.data.code === 200) {
  102. console.log(res.data.msg)
  103. that.cashObj = res.data.msg;
  104. //that.cashOutList = res.data.msg
  105. }
  106. }
  107. });
  108. }
  109. }
  110. };
  111. </script>
  112. <style>
  113. .header-box {
  114. width: 100%;
  115. height: 180rpx;
  116. background: #1a9ed3;
  117. }
  118. .header-title {
  119. width: 93%;
  120. height: 150rpx;
  121. display: flex;
  122. flex-direction: column;
  123. align-items: center;
  124. background: #fff;
  125. z-index: 99;
  126. border-radius: 10rpx;
  127. font-size: 30rpx;
  128. margin: -13% auto;
  129. margin-bottom: 3%;
  130. position: relative;
  131. }
  132. .count-sum {
  133. color: red;
  134. font-size: 28rpx;
  135. }
  136. .count-deatil-box {
  137. width: 93%;
  138. border-radius: 10rpx;
  139. display: flex;
  140. flex-direction: column;
  141. align-items: center;
  142. background: #fff;
  143. margin: 0 auto;
  144. }
  145. .count-detail-title {
  146. width: 89%;
  147. border-bottom: 1px solid #dbdbdb;
  148. padding: 10px;
  149. font-size: 32rpx;
  150. }
  151. .leader-info {
  152. width: 90%;
  153. display: flex;
  154. align-items: center;
  155. background: #fff;
  156. padding: 20rpx;
  157. border-bottom: 1px solid #ccc;
  158. }
  159. .leader-column {
  160. display: flex;
  161. flex-direction: column;
  162. justify-content: space-between;
  163. height: 90rpx;
  164. font-size: 28rpx;
  165. margin-right: 20%;
  166. width: 400rpx;
  167. line-height: 90rpx;
  168. }
  169. .display-column {
  170. display: flex;
  171. flex-direction: column;
  172. align-items: center;
  173. justify-content: space-around;
  174. }
  175. .apply-cash-box {
  176. position: absolute;
  177. right: 5px;
  178. top: 14px;
  179. display: flex;
  180. align-items: center
  181. }
  182. .apply-cash-box image {
  183. width: 48rpx;
  184. height: 48rpx;
  185. }
  186. </style>