feat: 图片广场优化

This commit is contained in:
Gsh
2026-01-05 10:12:35 +08:00
parent 4f70356a5c
commit 9d8f8b3125
3 changed files with 60 additions and 17 deletions

View File

@@ -373,6 +373,13 @@ onUnmounted(() => {
配置 配置
</h2> </h2>
<!-- 操作说明 -->
<div class="px-3 py-2 bg-green-50 rounded-lg text-xs text-gray-600 leading-relaxed">
<p class="mb-1"><strong>📌 生成说明</strong></p>
<p class="mb-1"> 生成的图片将自动保存到"我的图库"仅个人可见</p>
<p> 发布后图片将在"图片广场"公开展示所有用户可见</p>
</div>
<el-form label-position="top" class="space-y-1"> <el-form label-position="top" class="space-y-1">
<!-- Token --> <!-- Token -->
<el-form-item label="API密钥 (可选)"> <el-form-item label="API密钥 (可选)">
@@ -413,10 +420,16 @@ onUnmounted(() => {
</div> </div>
</el-option> </el-option>
</el-select> </el-select>
<div class="mt-2 text-xs text-gray-500">
按此收费
<router-link to="/model-library" class="text-primary hover:underline">
前往模型库查看详情
</router-link>
</div>
</el-form-item> </el-form-item>
<!-- Prompt --> <!-- Prompt -->
<el-form-item label="提示词" required> <el-form-item label="提示词" required class="prompt-from">
<template #label> <template #label>
<div class="flex justify-between items-center w-full"> <div class="flex justify-between items-center w-full">
<span>提示词</span> <span>提示词</span>
@@ -597,7 +610,9 @@ onUnmounted(() => {
.custom-scrollbar::-webkit-scrollbar-track { .custom-scrollbar::-webkit-scrollbar-track {
background-color: transparent; background-color: transparent;
} }
:deep(.prompt-from .el-form-item__label){
display: flex;
}
.bg-checkboard { .bg-checkboard {
background-image: background-image:
linear-gradient(45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, #f0f0f0 25%, transparent 25%),

View File

@@ -472,9 +472,22 @@ watch([() => searchForm.TaskStatus, () => searchForm.PublishStatus, dateRange],
</el-icon> </el-icon>
重置 重置
</el-button> </el-button>
<el-button class="w-full refresh-btn" type="success" @click="handleSearch">
<el-icon class="mr-1">
<Refresh />
</el-icon>
刷新
</el-button>
<!-- Batch Operations --> <!-- Batch Operations -->
<div class="pt-4 border-t border-gray-100 space-y-2"> <div class="pt-4 border-t border-gray-100 space-y-2">
<!-- 操作说明 -->
<div class="px-3 py-2 bg-blue-50 rounded-lg text-xs text-gray-600 leading-relaxed">
<p class="mb-1"><strong>💡 操作提示</strong></p>
<p class="mb-1"> 删除图片后图片广场中的公开内容也会同步删除</p>
<p> 发布后的图片将在图片广场公开展示</p>
</div>
<el-button <el-button
:type="batchMode ? 'primary' : 'default'" :type="batchMode ? 'primary' : 'default'"
class="w-full " class="w-full "
@@ -598,9 +611,22 @@ watch([() => searchForm.TaskStatus, () => searchForm.PublishStatus, dateRange],
</el-icon> </el-icon>
重置 重置
</el-button> </el-button>
<el-button class="w-full" type="success" @click="handleSearch(); showMobileFilter = false">
<el-icon class="mr-1">
<Refresh />
</el-icon>
刷新
</el-button>
<!-- Batch Operations --> <!-- Batch Operations -->
<div class="pt-4 border-t border-gray-100 space-y-2"> <div class="pt-4 border-t border-gray-100 space-y-2">
<!-- 操作说明 -->
<div class="px-3 py-2 bg-blue-50 rounded-lg text-xs text-gray-600 leading-relaxed">
<p class="mb-1"><strong>💡 操作提示</strong></p>
<p class="mb-1"> 删除图片后图片广场中的公开内容也会同步删除</p>
<p> 发布后的图片将在图片广场公开展示</p>
</div>
<el-button <el-button
:type="batchMode ? 'primary' : 'default'" :type="batchMode ? 'primary' : 'default'"
class="w-full" class="w-full"

View File

@@ -37,6 +37,17 @@ function goToMonitor() {
window.open('http://data.ccnetcore.com:91/?period=24h', '_blank'); 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() { async function fetchModelList() {
loading.value = true; loading.value = true;
try { try {
@@ -515,8 +526,7 @@ onMounted(() => {
</el-tag> </el-tag>
</div> </div>
<div class="model-pricing"> <div class="model-pricing">
<span class="pricing-label">计费倍率</span> <span class="pricing-value">{{ formatMultiplier(model.multiplierShow) }}</span>
<span class="pricing-value">{{ model.multiplierShow }}×</span>
</div> </div>
</div> </div>
</div> </div>
@@ -1109,19 +1119,15 @@ onMounted(() => {
.model-pricing { .model-pricing {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; justify-content: center;
padding: 6px 6px; padding: 6px 10px;
background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%); background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
border-radius: 8px; border-radius: 8px;
white-space: nowrap; white-space: nowrap;
flex-shrink: 0;
.pricing-label {
font-size: 12px;
color: #909399;
}
.pricing-value { .pricing-value {
font-size: 16px; font-size: 14px;
font-weight: 700; font-weight: 700;
color: #667eea; color: #667eea;
} }
@@ -1410,12 +1416,8 @@ onMounted(() => {
.model-pricing { .model-pricing {
padding: 4px 8px; padding: 4px 8px;
.pricing-label {
display: none; // 移动端隐藏"计费倍率"文字,只显示数字
}
.pricing-value { .pricing-value {
font-size: 14px; font-size: 12px;
} }
} }
} }