<template>
|
<van-list
|
v-model="loading"
|
:finished="finished"
|
:finished-text="$t('没有更多了')"
|
:loading-text="$t('加载中')"
|
>
|
<div class="list-call">
|
<van-row type="flex" justify="space-between" align="center">
|
<van-col span="4"> </van-col>
|
<van-col span="2"></van-col>
|
<van-col span="4"></van-col>
|
<van-col span="4">{{ $t("中签") }}</van-col>
|
<van-col span="10" style="text-align: right">
|
{{ $t("认购时间") }}
|
</van-col>
|
</van-row>
|
</div>
|
<div v-for="item in showList" :key="item.id" class="list-call">
|
<van-row
|
type="flex"
|
justify="space-between"
|
align="center"
|
style="min-height: 30px; margin: 10px 0"
|
>
|
<van-col span="4">
|
<div class="state">{{ getstatus(item.status) }}</div>
|
</van-col>
|
<van-col span="1"></van-col>
|
<van-col span="4">{{ item.newCoinName }}</van-col>
|
<van-col span="1"></van-col>
|
<van-col span="4">{{ item.lotteryQuantity }}</van-col>
|
<van-col span="10" style="text-align: right">
|
<div v-if="item.status === 2" class="gm">
|
<van-button @click="gmData(item)" class="gm" type="info">
|
{{ $t("认缴") }}</van-button
|
>
|
</div>
|
<div v-else>
|
{{ $moment(item.createTime).format("YYYY-MM-DD HH:mm:ss") }}
|
</div>
|
</van-col>
|
</van-row>
|
</div>
|
</van-list>
|
</template>
|
|
<script>
|
import { icoOrdergetList, appSubscribe } from "@/API/home.api";
|
import { List, Cell, Dialog, Notify } from 'vant';
|
|
export default {
|
props: ["active"],
|
components: {
|
[Dialog.Component.name]: Dialog.Component,
|
[List.name]: List,
|
[Cell.name]: Cell,
|
},
|
data() {
|
return {
|
loading: false,
|
finished: false,
|
showList: [],
|
};
|
},
|
watch: {
|
active() {
|
this.getList();
|
},
|
},
|
mounted() {
|
this.getList();
|
},
|
methods: {
|
async gmData(item) {
|
await appSubscribe({ id: item.id });
|
Notify({ type: "success", message: this.$t("认缴成功") });
|
this.getList();
|
},
|
getstatus(val) {
|
switch (val) {
|
case 1:
|
return this.$t("已认购");
|
case 2:
|
return this.$t("已中签");
|
case 3:
|
return this.$t("已认缴");
|
case 0:
|
return this.$t("未中签");
|
case 4:
|
return this.$t("已上市");
|
|
default:
|
break;
|
}
|
},
|
async getList() {
|
const res = await icoOrdergetList({ orderType: this.active });
|
this.loading = true;
|
this.finished = true;
|
this.showList = res;
|
},
|
},
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
.list-call {
|
border-bottom: 1px solid #f0f0f0;
|
margin: 0 20px;
|
}
|
.state {
|
color: #1553e6;
|
|
text-align: center;
|
// height: 40px;
|
line-height: 40px;
|
font-size: 26px;
|
}
|
.gm {
|
height: 50px;
|
line-height: 50px;
|
font-size: 26px;
|
}
|
</style>
|