123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <template>
- <view>
- <u-navbar title="提现记录"></u-navbar>
- <view class="detailed">
- <view style="text-align: center;margin-top: 100px" v-if="!list.length">
- <img src="@/assets/img/blankpage.png">
- <view>没有提现记录</view>
- </view>
- <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>
- <span v-if="item.status==2" >(已驳回)</span>
-
- </view>
- <p>{{item.createTime}}</p>
- </view>
- <view class="detailed-item-num">
- <h2>{{item.applicationAmount}}</h2>
- </view>
- </view>
-
- </view>
- <u-divider v-if="list.length&&list.length == recordsTotal" color="#B6BDC3" style="margin-top:20px;" bg-color="#f4f0f0">已经到底了</u-divider>
-
-
- </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)*100+item.applicationAmount*100;
- showMap.set(ktime,m/100)
- }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>
|