| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <template>
- <!-- 认购 -->
- <div class="subscription">
- <div class="subscription-content" v-if="subscriptionData > 0">
- <div class="subscription-head pf400 fs12 fc666666">
- <div class="head-name">名称</div>
- <div class="head-price">单价</div>
- <div class="head-operate">操作</div>
- </div>
- <div class="subscription-body">
- <div class="subscription-item" v-for="(item, index) in icoData" :key="index">
- <div class="item-name pf400 fs14 fc2C3131">{{ item.asset_name }}</div>
- <div class="item-price pf400 fs14 fc2C3131">
- {{ Number(item.issue_price).toFixed(2) }}
- </div>
- <div class="item-operate">
- <div class="text pf500 fs12 fcFFFFFF">认购</div>
- </div>
- </div>
- </div>
- </div>
- <div class="subscription-null" v-else>
- <img
- src="../../../assets/icon/index/subscription-null.svg"
- class="img-null"
- alt="" />
- </div>
- </div>
- </template>
- <script setup>
- import { ref, onMounted } from "vue";
- import { GetIcoIco } from "@/api/index";
- const icoData = ref();
- const subscriptionData = ref();
- const GetIcoIcoData = async () => {
- // 1,认购 2,配售
- const params = {
- asset_type: "1",
- };
- const data = await GetIcoIco(params);
- if (data) {
- icoData.value = data.list;
- subscriptionData.value = data.total;
- }
- };
- onMounted(() => {
- GetIcoIcoData();
- });
- </script>
- <style lang="less" scoped>
- .subscription {
- width: 349px;
- .subscription-content {
- margin-top: 15px;
- width: 100%;
- .subscription-head {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- width: 100%;
- height: 24px;
- .head-name {
- width: 116px;
- height: 24px;
- line-height: 24px;
- text-align: left;
- letter-spacing: 0.17px;
- }
- .head-price {
- width: 117px;
- height: 24px;
- line-height: 24px;
- text-align: center;
- letter-spacing: 0.17px;
- }
- .head-operate {
- width: 116px;
- height: 24px;
- line-height: 24px;
- text-align: right;
- letter-spacing: 0.17px;
- }
- }
- .subscription-body {
- width: 100%;
- .subscription-item {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- margin-top: 8px;
- padding-bottom: 8px;
- width: 100%;
- border-bottom: 1px solid #f5f5f5;
- .item-name {
- width: 116px;
- height: 24px;
- line-height: 24px;
- text-align: left;
- letter-spacing: 0.17px;
- }
- .item-price {
- width: 117px;
- height: 24px;
- line-height: 24px;
- text-align: center;
- letter-spacing: 0.17px;
- }
- .item-operate {
- display: flex;
- flex-direction: row;
- justify-content: flex-end;
- width: 116px;
- height: 24px;
- .text {
- width: 61px;
- height: 24px;
- line-height: 24px;
- text-align: center;
- border-radius: 5px;
- background: #45b26b;
- }
- }
- }
- }
- }
- .subscription-null {
- .img-null {
- margin-top: 117px;
- width: 343px;
- height: 267px;
- }
- }
- }
- </style>
|