1
李凌
2025-09-19 e1e51991ad91c14fa00c5cf46f95e514f676ac4d
src/views/ICO/ico.vue
@@ -4,9 +4,9 @@
            <template v-slot:title>
                <div>STO</div>
            </template>
            <template v-slot:right>
            <!-- <template v-slot:right>
                <van-icon name="todo-list-o" @click="$router.push('/ICO/icoRecord')" />
            </template>
            </template> -->
        </fx-header>
        <div class="ico_list">
@@ -15,40 +15,51 @@
                    {{ i.name }}
                </div>
                <div class="item_2 flex justify-between">
                    <div class="mr-5">{{$t('申购时间')}}</div>
                    <div class="mr-5">{{ $t('申购时间') }}</div>
                    <div>{{ i.startDate }} ~ {{ i.endDate }}</div>
                </div>
                <div class="item_2 flex justify-between">
                    <div>{{$t('listingDate')}}</div>
                    <div>{{ i.marketDate }}</div>
                    <div>{{ $t('最低认购') }}</div>
                    <div>{{ i.minContribution }}</div>
                </div>
                <div class="item_2 flex justify-between">
                    <div>{{$t('每张金额')}}</div>
                    <div>{{ $t('币种数量') }}</div>
                    <div>{{ i.maxContribution }}</div>
                </div>
                <div class="item_2 flex justify-between">
                    <div>{{ $t('IssuePrice') }}</div>
                    <div>{{ i.unitAmount }}</div>
                </div>
                <div class="item_2 flex justify-between">
                    <div>{{$t('每张手续费')}}</div>
                    <div>{{ i.unitFee }}</div>
                    <div>{{ $t('listingDate') }}</div>
                    <div>{{ i.marketDate }}</div>
                </div>
                <div class="item_3 flex justify-center">
                <div class="item_2 flex justify-between align-center">
                    <div>{{ $t('进度') }}</div>
                    <div style="width: 70%;padding-top: 1rem;">
                        <van-progress :percentage="i.progressRate || 0" track-color="#ccc" />
                    </div>
                </div>
                <!-- <div class="item_3 flex justify-center">
                    <van-button type="default" round size="large" @click="openBuy(i)">{{$t('申购')}}</van-button>
                </div> -->
            </div>
        </div>
        <!-- 购买弹窗 -->
        <van-popup v-model:show="show" round>
            <div class="buy_popup">
                <div class="buy_title flex justify-center">{{ itemObj.symbol }}</div>
                <van-field v-model="sgNum" type="digit" :label="$t('申购数量')" />
                <div class="flex justify-center mt-5">
                    <van-button type="default" size="large" round @click="buy">{{ $t('confirm') }}</van-button>
                </div>
            </div>
        </div>
    <!-- 购买弹窗 -->
    <van-popup v-model:show="show" round >
        <div class="buy_popup">
            <div class="buy_title flex justify-center">{{ itemObj.symbol }}</div>
            <van-field v-model="sgNum" type="digit" :label="$t('申购数量')" />
            <div class="flex justify-center mt-5">
                <van-button type="default" size="large" round @click="buy">{{$t('confirm')}}</van-button>
            </div>
        </div>
    </van-popup>
        </van-popup>
    </div>
</template>
@@ -64,7 +75,7 @@
_icoList().then(res => {
    icoList.value = res.records
}).catch(err => {
    showToast(err.msg)
    // showToast(err.msg)
})
// 打开申购弹窗
@@ -79,9 +90,9 @@
// 申购
const buy = () => {
    let opt = {
        icoProjectId:itemObj.value.id,
        icoProjectId: itemObj.value.id,
        subscribeNums: sgNum.value,
        subscriptionType:1,
        subscriptionType: 1,
    }
    _icoSubscribe(opt).then(res => {
        showToast(t('submitSuccess'))
@@ -94,44 +105,50 @@
</script>
<style lang="scss" scoped>
.ico{
.ico {
    padding: 0rem 1.2rem 5rem 1.2rem;
    font-size: 1.5rem;
    .buy_popup{
    .buy_popup {
        width: 40rem;
        padding: 1rem;
        .buy_title{
        .buy_title {
            font-size: 2.5rem;
            font-weight: 700;
            border-bottom: #aaa solid 1px;
            padding: 1rem;
        }
    }
    .ico_list{
    .ico_list {
        padding: 1rem 0rem;
        .ico_item{
        .ico_item {
            background-color: #eee;
            padding:.5rem 1rem;
            padding: .5rem 1rem;
            border: #aaa solid 1px;
            border-radius: 1rem;
            .item_1{
            .item_1 {
                padding: 1rem .5rem;
                border-bottom: #ccc solid 1px;
                font-size: 2rem;
                font-weight: 700;
            }
            .item_2{
            .item_2 {
                padding: 1rem .5rem;
                border-bottom: #ccc solid 1px;
                font-size: 1.6rem;
                font-weight: 500;
                &>div:last-child{
                &>div:last-child {
                    color: #999;
                }
            }
            .item_3{
            .item_3 {
                padding: .5rem;
            }
        }