withdrawalManagement.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <view class="withdrawalManagement">
  3. <view class="card" :style="{backgroundImage: `url(${baseImgUrl}/withdrawalManagement_bg.png)`}">
  4. <view class="top-info">
  5. <view class="left">
  6. <view class="label">已提现</view>
  7. <view class="number">¥{{total['已提现']}}</view>
  8. </view>
  9. <view class="right">
  10. <view class="label">待提现</view>
  11. <view class="number">¥{{ total["待提现"] }}</view>
  12. </view>
  13. </view>
  14. <view class="bottom-info">
  15. <view class="number-item">总收益:¥{{total['总收益']}}</view>
  16. <view class="number-item">冻结中:¥{{ total["冻结中"] }}</view>
  17. </view>
  18. </view>
  19. <view class="title-wrap">
  20. <view class="title">提现记录</view>
  21. <navigator url="/subPages/applyWithdrawal/applyWithdrawal">
  22. <view class="btn">申请提现</view>
  23. </navigator>
  24. </view>
  25. <view class="list">
  26. <view class="item" v-for="item in list" :key="item.id">
  27. <view class="left">
  28. <view class="avatar-wrap">
  29. 提现
  30. </view>
  31. <view class="info">
  32. <view class="name">提现到-{{ item.bank_name }}{{getBankLastCode(item.bank_code)}}</view>
  33. <view class="time">
  34. {{ item.date }}
  35. </view>
  36. </view>
  37. </view>
  38. <view class="right">
  39. <view class="amount">
  40. {{ item.amount }}
  41. </view>
  42. <view class="status" :style="{ color: STATUSMAPLIST[item.status].text }">
  43. {{ STATUSMAPLIST[item.status].text }}
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. import { getWithdrawalList } from "@/common/api/withdrawal.js";
  52. const STATUSMAPLIST = [
  53. { text: '失败', color: '#8E8E8E' },
  54. { text: '待审核', color: '#0085FF' },
  55. { text: '已审核', color: '#00BE7A' },
  56. { text: '打款中', color: '#1b7976' },
  57. { text: '已打款', color: '#F39800' },
  58. { text: '已收款', color: '#00BE7A' },
  59. ]
  60. export default {
  61. data() {
  62. return {
  63. STATUSMAPLIST,
  64. total: {},
  65. list: [],
  66. baseImgUrl: this.$C.imageUrl
  67. };
  68. },
  69. onShow() {
  70. this._getWithdrawalList();
  71. console.log(7456746574356,this.$C)
  72. },
  73. methods: {
  74. _getWithdrawalList() {
  75. getWithdrawalList({
  76. page: 1,
  77. pageSize: 100,
  78. }).then(({ data = {} }) => {
  79. const { list = [], total = {} } = data;
  80. this.list = list;
  81. this.total = total;
  82. });
  83. },
  84. getBankLastCode(code) {
  85. if (!code) return "";
  86. return code.slice(-4);
  87. },
  88. },
  89. };
  90. </script>
  91. <style lang="scss" scoped>
  92. .withdrawalManagement {
  93. padding: 20rpx 20rpx 40rpx;
  94. background: #f5f6f8;
  95. .card {
  96. height: 377rpx;
  97. padding: 105rpx 0 0 43rpx;
  98. color: #fff;
  99. background-size: 100% 100%;
  100. border-radius: 16rpx;
  101. box-sizing: border-box;
  102. .top-info,
  103. .bottom-info {
  104. display: flex;
  105. align-items: center;
  106. }
  107. .top-info {
  108. padding-bottom: 34rpx;
  109. border-bottom: 2rpx solid rgba(255, 255, 255, 0.28);
  110. .left,
  111. .right {
  112. flex: 1;
  113. }
  114. .right {
  115. border-left: 1rpx solid #ffffff;
  116. padding-left: 62rpx;
  117. }
  118. .lable {
  119. font-size: 28rpx;
  120. font-weight: 500;
  121. color: #fffbe7;
  122. line-height: 39rpx;
  123. }
  124. .number {
  125. font-size: 42rpx;
  126. font-weight: bold;
  127. color: #ffffff;
  128. line-height: 59rpx;
  129. margin-top: 25rpx;
  130. }
  131. }
  132. .bottom-info {
  133. padding-top: 32rpx;
  134. .number-item {
  135. flex: 1;
  136. font-size: 26rpx;
  137. font-weight: 500;
  138. color: #ffffff;
  139. line-height: 36rpx;
  140. &:last-child {
  141. margin-left: 62rpx;
  142. }
  143. }
  144. }
  145. }
  146. .title-wrap {
  147. display: flex;
  148. justify-content: space-between;
  149. align-items: center;
  150. margin-top: 42rpx;
  151. padding-bottom: 6rpx;
  152. .title {
  153. font-size: 36rpx;
  154. font-weight: bold;
  155. color: #1d161f;
  156. line-height: 50rpx;
  157. &::before {
  158. content: "";
  159. display: inline-block;
  160. width: 4rpx;
  161. height: 32rpx;
  162. background: #f39800;
  163. margin-right: 8rpx;
  164. }
  165. }
  166. .btn {
  167. display: flex;
  168. justify-content: space-between;
  169. align-items: center;
  170. height: 66rpx;
  171. font-size: 28rpx;
  172. font-weight: 500;
  173. padding: 0 20rpx;
  174. color: #fffcf7;
  175. line-height: 1;
  176. background: linear-gradient(90deg, #535257 0%, #191820 100%);
  177. border-radius: 7rpx 7rpx 7rpx 7rpx;
  178. }
  179. }
  180. .item {
  181. height: 154rpx;
  182. background: #ffffff;
  183. border-radius: 10rpx;
  184. margin-top: 20rpx;
  185. padding: 0 20rpx;
  186. display: flex;
  187. justify-content: space-between;
  188. align-items: center;
  189. .left {
  190. display: flex;
  191. align-items: center;
  192. .avatar-wrap {
  193. display: flex;
  194. align-items: center;
  195. justify-content: center;
  196. width: 85rpx;
  197. height: 85rpx;
  198. background: #F39800;
  199. border-radius: 50%;
  200. font-size: 26rpx;
  201. font-weight: bold;
  202. color: #FFFFFF;
  203. line-height: 1;
  204. }
  205. .info {
  206. margin-left: 20rpx;
  207. }
  208. .name {
  209. font-size: 28rpx;
  210. font-weight: bold;
  211. color: #1d161f;
  212. line-height: 39rpx;
  213. }
  214. .time {
  215. font-size: 24rpx;
  216. font-weight: 500;
  217. color: #807f85;
  218. line-height: 34rpx;
  219. margin-top: 20rpx;
  220. }
  221. }
  222. .amount {
  223. text-align: right;
  224. font-size: 28rpx;
  225. font-family: PingFang SC-Bold, PingFang SC;
  226. font-weight: bold;
  227. color: #c9161e;
  228. line-height: 39rpx;
  229. }
  230. .status {
  231. font-size: 26rpx;
  232. font-family: PingFang SC-Medium, PingFang SC;
  233. font-weight: 500;
  234. color: #b2b2b2;
  235. line-height: 36rpx;
  236. margin-top: 20rpx;
  237. &.submited {
  238. color: #0085ff;
  239. }
  240. &.paid {
  241. color: #f39800;
  242. }
  243. &.audited {
  244. color: #00be7a;
  245. }
  246. &.rejected {
  247. color: #8e8e8e;
  248. }
  249. }
  250. }
  251. }
  252. </style>