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
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
126
127
128
129
130
131
132
133
134
135
136
137
<template>
  <div class="lotteryRecord">
      <div class="px-5">
          <div class="flex  py-10 border-b-color border-t-color justify-between ">
            <div class="text-center">
                <div class="text_color6">{{t('中签额度')}}</div>
                <div>{{ topData.winningQuota }}</div>
            </div>
            <div class="text-center">
                <div class="text_color6">{{t('认缴额度')}}</div>
                <div :class="topData.subscriptionLimit > 0 ? 'red' : 'green'">{{ topData.subscriptionLimit }}</div>
            </div>
            <div class="text-center">
                <div class="text_color6">{{t('可用额度')}}</div>
                <div>{{ topData.availableLimit }}</div>
            </div>
          </div>
          <div class="tabWarp">
            <div class="tab-header flex py-5 text_color6">
              <div class="td-2 text-left">{{t('名称/代码')}}</div>
              <div class="td-1 text-center">{{t('现价/成本')}}</div>
              <div class="td-1 text-center">{{t('中签额度')}}</div>
              <div class="td-1 text-center">{{t('认缴金额')}}</div>
              <div class="td-1 text-center">{{t('状态')}}</div>
              <div class="td-2 text-right">{{t('时间')}}</div>
          </div>
          <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">
              <div class="td-2 text-left">
                  <div class="list-title">{{ item.name }}</div>
                  <div class="text_color6">{{ item.productCode}}</div>
              </div>
              <div class="td-1 text-center">{{ item.subPrice + '/' +  item.subPrice }}</div>
              <div class="td-1 text-center">{{ item.requiredNumber }}</div>
              <div class="td-1 text-center">{{ item.requiredSubscribe }}</div>
              <div class="td-1 text-center" :class="item.status === 2 ? 'red' : ''">{{ item.status === 1 ? t('待确认') : t('已认缴') }}</div>
              <div class="td-2 text-right">{{ getTime(item.createTime) }}</div>
          </div>
      </van-list>
          </div>
      </div>
  </div>
</template>
 
<script setup>
import {inject, onMounted, provide, ref} from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useI18n } from "vue-i18n";
import { userPromiseList, getSubscribeTop } from '@/service/ipo.api'
 
const { t } = useI18n()
const route = useRoute()
const router = useRouter()
const list = ref([]);
const loading = ref(false);
const finished = ref(false);
const index= ref(1)
const topData = ref({})
onMounted(() => {
  getTopData()
})
const getTopData = () => {
  getSubscribeTop({symbolType: stockType || 'US-stocks'}).then((res)=>{
    topData.value = res
 })
}
 
const stockType = inject('stockType')
provide('stockType', stockType)
const onLoad = () => {
  let params = {
    current: index.value,
    size: 10,
    symbolType: stockType || 'US-stocks'
  }
  userPromiseList(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];
}
 
</script>
<style lang="scss" scoped>
.lotteryRecord {
  font-size: 14px;
 
  .search-icon {
      width: 23px;
      height: 23px;
  }
 
  .tab-header {
      gap: 0 5px;
      font-size: 12px;
      color: #747A8F;
  }
  .td-1{
      flex-shrink: 0;
      width: 60px;
    }
    .td-2{
      flex-shrink: 0;
      width: 80px;
    }
 
    .tabWarp{
      width: 100%;
      padding: 10px 10px;
      overflow-x: scroll;
      // white-space: nowrap;
      box-sizing: border-box;
    }
  .list-div {
      gap: 0 5px;
      padding: 15px 0;
      font-size: 12px;
      align-items: center;
      border-bottom: 1px solid $border_color;
 
      .list-title {
          text-overflow: ellipsis;
          // white-space: nowrap;
          overflow: hidden;
      }
  }
}
</style>