123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <template>
- <view>
- <u-navbar title="提现记录"></u-navbar>
- <view class="detailed">
-
- <view class="detailed-list"
- :key="index"
- v-for="(item ,index) in list" >
- <view class="detailed-time" v-if="item.show">
- <p>{{item.showtime}}</p>
- <p>共提现 {{showMap.get(item.showtime)}}</p>
- </view>
- <view class="detailed-item">
- <view class="detailed-item-name">
- <view class="u-flex">
- <h4>提现</h4>
- <span v-if="item.status==1" class="success">(提现成功)</span>
- <span v-if="item.status==0" class="error">(待转账)</span>
- </view>
- <p>{{item.createTime}}</p>
- </view>
- <view class="detailed-item-num">
- <h2>{{item.applicationAmount}}</h2>
- </view>
- </view>
-
- </view>
-
-
- </view>
- </view>
- </template>
- <script>
- import * as API from '@/apis/finance.js'
-
- export default {
- data() {
- return {
- pageIndex: 1,
- recordsTotal: 0,
- list: [],
- form: {
- name: '',
- intro: '',
- },
- showMap:null,
-
- }
- },
- onReady() {
- this.getList()
- },
-
- onReachBottom() {
- if (this.list.length < this.recordsTotal) {
- this.myLoadmore();
- }
- },
- methods: {
- getList() {
-
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
-
-
- API.withdrawRecord({
- pageIndex:this.pageIndex
- }).then((res) => {
-
- this.list = [
- ...this.list,
- ...res.data.data
- ];
-
- var showMap=new Map()
- this.list.forEach(item=>{
- var ktime=item.createTime.split(" ")[0]
- if(showMap.has(ktime)){
- item.show=false;
- var m=showMap.get(ktime)+item.applicationAmount;
- showMap.set(ktime,m)
- }else{
- showMap.set(ktime,item.applicationAmount)
-
- item.show=true;
- item.showtime=ktime;
- }
- })
- this.showMap=showMap;
- this.recordsTotal = res.data.recordsTotal
- uni.hideLoading()
-
- }).catch(error => {
- uni.showToast({
-
- title: error
- })
- })
- },
- }
- }
- </script>
- <style>
- page{
- background-color: #F7F7F7;
- }
- </style>
- <style lang="scss" scoped>
-
- .detailed-time{
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 10px 20px;
- p{
- color:#666;
- }
- }
- .detailed-item{
- background-color: #fff;
- display: flex;
- justify-content: space-between;
- padding: 10px 20px;
- border-bottom: 1px solid #ededed;
- .detailed-item-name{
- h4{
- font-weight: normal;
- }
- p{
- font-size: 12px;
- margin-top: 4px;
- color:#A2A9B5;
- }
- span{
- margin-left: 10px;
- }
- .success{color:#27b148}
- .error{color:#FF6200;}
- }
- .detailed-item-num{
- display: flex;
- align-items: center;
- h2{
- margin-right: 4px;
- }
- }
- }
- </style>
|