<template>
|
<div class="wrapper">
|
<div v-if="list.length <= 0" class="empty text-center">
|
{{ $t("hj162e") }}!
|
</div>
|
<div v-else>
|
<ul
|
class="table-list"
|
v-infinite-scroll="loadMore"
|
infinite-scroll-disabled="loading"
|
infinite-scroll-distance="10"
|
>
|
<li class="list-body" v-for="item in list" :key="item.key">
|
<div class="order-info-box">
|
<div class="order-title">
|
<span class="main"> {{ $t("hjtxyhk") }} </span>
|
<span class="payNumber"
|
>{{ $USD }}{{ item.withAmt }}</span
|
>
|
<span v-if="item.withStatus!=1" class="red pull-right">
|
{{
|
item.withStatus == 1
|
? $t("hjtxcg")
|
: item.withStatus == 2
|
? $t("hjtxsb")
|
: item.withStatus == 3
|
? $t("hjddqx")
|
: $t("hjshz")
|
}}
|
<i
|
v-if="item.withStatus == 1"
|
class="iconfont icon-tongguo4 animated bounceIn"
|
></i>
|
<i
|
v-if="item.withStatus == 0"
|
class="iconfont icon-dengdai animated bounceInDown"
|
></i>
|
<i
|
v-if="item.withStatus == 2"
|
class="iconfont icon-failure animated bounceInDown"
|
></i>
|
<i
|
v-if="item.withStatus == 3"
|
class="iconfont icon-iconfontweitongguo animated bounceInDown"
|
></i>
|
</span>
|
<span v-if="item.withStatus==1" class="green pull-right" >
|
{{
|
item.withStatus == 1
|
? $t("hjtxcg")
|
: item.withStatus == 2
|
? $t("hjtxsb")
|
: item.withStatus == 3
|
? $t("hjddqx")
|
: $t("hjshz")
|
}}
|
<i
|
v-if="item.withStatus == 1"
|
class="iconfont icon-tongguo4 animated bounceIn"
|
></i>
|
<i
|
v-if="item.withStatus == 0"
|
class="iconfont icon-dengdai animated bounceInDown"
|
></i>
|
<i
|
v-if="item.withStatus == 2"
|
class="iconfont icon-failure animated bounceInDown"
|
></i>
|
<i
|
v-if="item.withStatus == 3"
|
class="iconfont icon-iconfontweitongguo animated bounceInDown"
|
></i>
|
</span>
|
<!-- <span class="secondary ">123456789</span> -->
|
</div>
|
<div class="order-info">
|
<p class="clearfix">
|
<span class="col-xs-6">
|
{{ $t("hj44") }}:
|
<b class="space">
|
{{ $USD }} {{ item.withFee }}
|
</b>
|
</span>
|
<!-- <span class="col-xs-6">实际到账金额:<b class="space" style="font-size:0.26rem">{{item.withAmt - item.withFee}}</b>元</span> -->
|
</p>
|
<p class="clearfix">
|
<span class="col-xs-12"
|
>{{ $t("hj247") }}:<b class="space"
|
>{{ item.bankName }}-{{ item.bankAddress }}</b
|
></span
|
>
|
</p>
|
<p class="clearfix">
|
<span class="col-xs-12"
|
>{{ $t("hjkh") }}:<b class="space">{{ item.bankNo }}</b></span
|
>
|
</p>
|
<p v-if="item.withStatus == 3" class="clearfix">
|
<span class="col-xs-12"
|
>{{ $t("hjqxyy") }}:<b class="space">{{
|
item.withMsg
|
}}</b></span
|
>
|
</p>
|
<p v-if="item.withStatus == 2" class="clearfix">
|
<span class="col-xs-12"
|
>{{ $t("hj201") }}:<b class="space">{{
|
item.withMsg
|
}}</b></span
|
>
|
</p>
|
<p class="clearfix">
|
<span class="secondary col-xs-6"
|
>{{ $t("sj") }}:
|
<b v-if="item.applyTime">{{ formatTimestamp(item.applyTime) }}</b>
|
<b v-else></b>
|
</span>
|
</p>
|
</div>
|
<!-- <div v-if="item.withStatus == 0" class="order-foot clearfix">
|
<div @click="cancle(item.id)" class="foot-btn">
|
<i class="font-icon"></i>
|
{{ $t("hjqxtx") }}
|
</div>
|
</div> -->
|
</div>
|
<!-- <div class="capital">
|
<div class="pro">
|
股票:300092/开山股份 <span class="pull-right">金额:50.241</span>
|
</div>
|
<div class=" clearfix">
|
<div class="col-xs-8">01-21 13:22</div>
|
<div class="col-xs-4 ">
|
<span class="pull-right">交易状态</span>
|
</div>
|
</div>
|
</div> -->
|
</li>
|
</ul>
|
<div v-show="loading" class="load-all text-center">
|
<mt-spinner type="fading-circle"></mt-spinner>
|
loading...
|
</div>
|
<div v-show="!loading" class="load-all text-center">
|
{{ $t("hj236") }}
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { Toast } from "mint-ui";
|
import * as api from "@/axios/api";
|
|
export default {
|
components: {},
|
props: {},
|
data() {
|
return {
|
loading: false,
|
list: [],
|
pageNum: 1,
|
pageSize: 15,
|
};
|
},
|
watch: {},
|
computed: {},
|
created() {},
|
mounted() {
|
this.getListDetail();
|
},
|
methods: {
|
formatTimestamp(timestamp) {
|
const date = new Date(timestamp); // 将时间戳转换为 Date 对象
|
|
const day = date.getDate(); // 日期
|
const month = date.getMonth() + 1; // 月份(从 0 开始,所以下标要加 1)
|
const year = date.getFullYear(); // 年份
|
const hours = date.getHours(); // 小时
|
const minutes = date.getMinutes(); // 分钟
|
const seconds = date.getSeconds(); // 秒钟
|
|
// 格式化为 "日月年/时分秒" 格式
|
return `${year}${this.$t('年')}${month}${this.$t('月')}${day}${this.$t('日')}/${hours}:${minutes}:${seconds}`;
|
// return `${month}`;
|
},
|
async getListDetail() {
|
let opt = {
|
withStatus: "", // 提现状态 0已提交,1转账成功,2转账失败
|
pageNum: this.pageNum,
|
pageSize: 15,
|
};
|
let data = await api.withdrawList(opt);
|
if (data.status === 0) {
|
data.data.list.forEach((element) => {
|
this.list.push(element);
|
});
|
} else {
|
Toast(data.msg);
|
}
|
},
|
async loadMore() {
|
if (this.list.length < 10) {
|
return;
|
}
|
this.loading = true;
|
// 加载下一页
|
this.pageNum++;
|
await this.getListDetail();
|
this.loading = false;
|
},
|
async cancle(val) {
|
// 取消提现
|
// MessageBox.confirm('您确定要平仓吗?').then(async action => {
|
let opt = {
|
withId: val,
|
};
|
let data = await api.canceloutMoney(opt);
|
if (data.status === 0) {
|
this.list = [];
|
Toast(data.msg);
|
this.getListDetail();
|
} else {
|
Toast(data.msg);
|
}
|
// });
|
},
|
},
|
};
|
</script>
|
<style lang="less" scoped>
|
.wrapper {
|
background-color: #fff !important;
|
height: 95vh;
|
}
|
|
.payNumber {
|
font-size: 0.3rem;
|
color: #ff8000;
|
}
|
|
.table-list {
|
padding: 0.2rem 0;
|
|
.list-body {
|
padding: 0.1rem 0.2rem;
|
|
.capital:nth-child(1) {
|
border-top: 0.01rem solid #3f444a;
|
}
|
|
.capital {
|
padding: 0.2rem;
|
// border-radius: 0.2rem;
|
border-bottom: 0.01rem solid #3f444a;
|
|
div {
|
line-height: 0.4rem;
|
}
|
|
.col-xs-4 {
|
padding-left: 0;
|
padding-right: 0;
|
}
|
|
.pro {
|
color: #999;
|
}
|
}
|
}
|
}
|
</style>
|