feat: 图片压缩后上传COS + 修复订单LazyInitializationException + 添加调试日志
This commit is contained in:
@@ -78,7 +78,9 @@
|
||||
<el-icon><User /></el-icon>
|
||||
<span>{{ $t('systemSettings.membership') }}</span>
|
||||
</div>
|
||||
<!-- 任务清理管理标签暂时隐藏 -->
|
||||
<div
|
||||
v-if="false"
|
||||
class="tab-item"
|
||||
:class="{ active: activeTab === 'cleanup' }"
|
||||
@click="activeTab = 'cleanup'"
|
||||
@@ -256,8 +258,34 @@
|
||||
<el-input v-model="promptOptimizationModel" style="width: 400px;" placeholder="gpt-5.1-thinking"></el-input>
|
||||
<div class="model-tip">{{ $t('systemSettings.promptOptimizationModelTip') }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('systemSettings.storyboardSystemPrompt')">
|
||||
<el-input
|
||||
v-model="storyboardSystemPrompt"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
style="width: 500px;"
|
||||
:placeholder="$t('systemSettings.storyboardSystemPromptPlaceholder')">
|
||||
</el-input>
|
||||
<div class="model-tip">{{ $t('systemSettings.storyboardSystemPromptTip') }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('systemSettings.promptOptimizationSystemPrompt')">
|
||||
<el-input
|
||||
v-model="promptOptimizationSystemPrompt"
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
style="width: 500px;"
|
||||
:placeholder="$t('systemSettings.promptOptimizationSystemPromptPlaceholder')">
|
||||
</el-input>
|
||||
<div class="model-tip">{{ $t('systemSettings.promptOptimizationSystemPromptTip') }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="saveAiModelSettings" :loading="savingAiModel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="saveAiModelSettings"
|
||||
:loading="savingAiModel"
|
||||
class="ai-save-btn"
|
||||
>
|
||||
<el-icon v-if="!savingAiModel"><Check /></el-icon>
|
||||
{{ $t('common.save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@@ -431,7 +459,8 @@ import {
|
||||
User as Search,
|
||||
User as ArrowDown,
|
||||
Delete,
|
||||
Refresh
|
||||
Refresh,
|
||||
Check
|
||||
} from '@element-plus/icons-vue'
|
||||
import cleanupApi from '@/api/cleanup'
|
||||
import { getMembershipLevels, updateMembershipLevel } from '@/api/members'
|
||||
@@ -498,6 +527,8 @@ const cleanupConfig = reactive({
|
||||
// AI模型设置相关
|
||||
const promptOptimizationModel = ref('gpt-5.1-thinking')
|
||||
const promptOptimizationApiUrl = ref('https://ai.comfly.chat')
|
||||
const storyboardSystemPrompt = ref('')
|
||||
const promptOptimizationSystemPrompt = ref('')
|
||||
const savingAiModel = ref(false)
|
||||
|
||||
const goToDashboard = () => {
|
||||
@@ -773,6 +804,12 @@ const loadAiModelSettings = async () => {
|
||||
if (data.promptOptimizationApiUrl) {
|
||||
promptOptimizationApiUrl.value = data.promptOptimizationApiUrl
|
||||
}
|
||||
if (data.storyboardSystemPrompt !== undefined) {
|
||||
storyboardSystemPrompt.value = data.storyboardSystemPrompt
|
||||
}
|
||||
if (data.promptOptimizationSystemPrompt !== undefined) {
|
||||
promptOptimizationSystemPrompt.value = data.promptOptimizationSystemPrompt
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载AI模型设置失败:', error)
|
||||
@@ -790,7 +827,9 @@ const saveAiModelSettings = async () => {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
promptOptimizationModel: promptOptimizationModel.value,
|
||||
promptOptimizationApiUrl: promptOptimizationApiUrl.value
|
||||
promptOptimizationApiUrl: promptOptimizationApiUrl.value,
|
||||
storyboardSystemPrompt: storyboardSystemPrompt.value,
|
||||
promptOptimizationSystemPrompt: promptOptimizationSystemPrompt.value
|
||||
})
|
||||
})
|
||||
if (response.ok) {
|
||||
@@ -1419,6 +1458,38 @@ const fetchSystemStats = async () => {
|
||||
border-color: #40a9ff;
|
||||
}
|
||||
|
||||
/* AI模型设置保存按钮样式 */
|
||||
.ai-save-btn {
|
||||
width: auto !important;
|
||||
min-width: 140px;
|
||||
padding: 12px 32px !important;
|
||||
font-size: 15px !important;
|
||||
font-weight: 500;
|
||||
border-radius: 8px !important;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
||||
border: none !important;
|
||||
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
|
||||
transition: all 0.3s ease !important;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.ai-save-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
|
||||
background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%) !important;
|
||||
}
|
||||
|
||||
.ai-save-btn:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
|
||||
}
|
||||
|
||||
.ai-save-btn .el-icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 480px) {
|
||||
.membership-modal {
|
||||
|
||||
Reference in New Issue
Block a user