交易所前端蓝色ui, 4.5 jiem
lxf
2025-04-18 66a33e936d39ec4db7fdffed5d646e044ccc43e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<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>