feat: 图片广场优化
This commit is contained in:
@@ -37,6 +37,17 @@ function goToMonitor() {
|
||||
window.open('http://data.ccnetcore.com:91/?period=24h', '_blank');
|
||||
}
|
||||
|
||||
// 格式化倍率显示
|
||||
function formatMultiplier(multiplier: number): string {
|
||||
if (multiplier >= 10000) {
|
||||
// 倍率大于等于10000,显示为次数
|
||||
const tokenCount = multiplier / 10000;
|
||||
return `${tokenCount}w/次`;
|
||||
}
|
||||
// 倍率小于10000,显示为倍率
|
||||
return `${multiplier}×`;
|
||||
}
|
||||
|
||||
async function fetchModelList() {
|
||||
loading.value = true;
|
||||
try {
|
||||
@@ -515,8 +526,7 @@ onMounted(() => {
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="model-pricing">
|
||||
<span class="pricing-label">计费倍率</span>
|
||||
<span class="pricing-value">{{ model.multiplierShow }}×</span>
|
||||
<span class="pricing-value">{{ formatMultiplier(model.multiplierShow) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1109,19 +1119,15 @@ onMounted(() => {
|
||||
.model-pricing {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 6px;
|
||||
justify-content: center;
|
||||
padding: 6px 10px;
|
||||
background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
|
||||
border-radius: 8px;
|
||||
white-space: nowrap;
|
||||
|
||||
.pricing-label {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
}
|
||||
flex-shrink: 0;
|
||||
|
||||
.pricing-value {
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: #667eea;
|
||||
}
|
||||
@@ -1410,12 +1416,8 @@ onMounted(() => {
|
||||
.model-pricing {
|
||||
padding: 4px 8px;
|
||||
|
||||
.pricing-label {
|
||||
display: none; // 移动端隐藏"计费倍率"文字,只显示数字
|
||||
}
|
||||
|
||||
.pricing-value {
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user