1
李凌
2026-01-26 b27cbd67a587c040d9acbb06417456116682043a
src/views/ICO/ico.vue
@@ -91,7 +91,7 @@
                </div>
                <div class="info-row">
                    <div class="info-label">{{ $t('盈亏') }}</div>
                    <div class="info-value red">
                    <div class="info-value" :class="getProfitClass(recordData.profit)">
                        {{ recordData.profitPercent ? (recordData.profitPercent + '%') : '--%' }}
                        ({{ recordData.profit || '0.00' }}USDT)
                    </div>
@@ -237,6 +237,18 @@
    }).catch(err => {
        showToast(err.msg || err || t('申购失败'))
    })
}
// 根据盈亏值返回对应的样式类
const getProfitClass = (profit) => {
    if (!profit && profit !== 0) return ''
    const profitNum = parseFloat(profit)
    if (profitNum > 0) {
        return 'green'
    } else if (profitNum < 0) {
        return 'red'
    }
    return ''
}
// 卖出
@@ -456,6 +468,10 @@
                    &.red {
                        color: #f43368;
                    }
                    &.green {
                        color: #06CDA5;
                    }
                }
            }