10.10综合交易所原始源码_移动端
1
admin
2026-02-10 c547081aa61be5c7b6d4c12853c675954c2156eb
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
<template>
    <div class="listItem px-5">
        <van-list v-model:loading="loading" :finished="finished" :loading-text="$t('加载中') + '...'" :finished-text="$t('没有更多了')" @load="onLoad">
            <div v-for="(item, index) in list" :key="index" class="list-div flex" @click="goToDetail(item.productCode,item.productName)">
                <div class="tab1">
                    <div class="list-title">{{ item.productName }}</div>
                    <div class="text_color6">{{ item.productCode }}</div>
                </div>
                <div class="tab2">{{ item.raisedFunds }}</div>
                <div class="tab3 text-right">{{ getTime(item.createTime) }}</div>
            </div>
        </van-list>
    </div>
</template>
 
<script setup>
import {onMounted, ref, computed, inject} from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { getProspectus } from '@/service/ipo.api.js'
import { useI18n } from "vue-i18n";
const { t } = useI18n()
const route = useRoute()
const router = useRouter()
 
const list = ref([]);
const loading = ref(false);
const finished = ref(false);
const index = ref(1)
 
onMounted(() => {
 
})
 
const stockType = inject('stockType')
const onLoad = () => {
    let params = {
      current: index.value,
      size: 10,
      type: stockType || 'US-stocks'
    }
    getProspectus(params).then(res => {
      if(res.length) {
        list.value = list.value.concat(res)
      }
      index.value++
      loading.value = false;
      if (res.length < 10) {
        finished.value = true;
      }
    })
}
 
const getTime = (time) => {
  return time?.split(' ')[0];
}
 
const goToDetail = (id,name) => {
    router.push({
        path: "/ipo/progress",
        query: {
            id,
            name
        }
    })
}
</script>
<style lang="scss" scoped>
.listItem {
    .flex-2 {
        flex: 2;
    }
 
    .tab1{
      width: 40%;
    }
    .tab2{
      width: 30%;
    }
    .tab3{
      width: 30%;
    }
 
    .list-div {
        padding: 20px 0;
 
        .list-title {
            width: 100px;
            text-overflow: ellipsis;
            // white-space: nowrap;
            overflow: hidden;
        }
    }
}</style>