feat: 功能优化
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
<div class="preview-meta">
|
||||
<div class="meta-row">
|
||||
<span class="meta-label">预计消耗积分</span>
|
||||
<span class="meta-value">150 积分</span>
|
||||
<span class="meta-value">{{ estimatedPoints }} 积分</span>
|
||||
</div>
|
||||
<div class="meta-row">
|
||||
<span class="meta-label">当前余额</span>
|
||||
@@ -218,6 +218,7 @@ import { ref, computed, onMounted } from 'vue'
|
||||
import { CloudUploadOutlined, CrownFilled, PictureOutlined } from '@ant-design/icons-vue'
|
||||
import { useVoiceCopyStore } from '@/stores/voiceCopy'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { usePointsConfigStore } from '@/stores/pointsConfig'
|
||||
import VideoSelector from '@/components/VideoSelector.vue'
|
||||
import VoiceSelector from '@/components/VoiceSelector.vue'
|
||||
import ResultPanel from '@/components/ResultPanel.vue'
|
||||
@@ -228,6 +229,7 @@ import { useDigitalHumanStore } from './stores/useDigitalHumanStore'
|
||||
const store = useDigitalHumanStore()
|
||||
const voiceStore = useVoiceCopyStore()
|
||||
const userStore = useUserStore()
|
||||
const pointsConfigStore = usePointsConfigStore()
|
||||
|
||||
// ==================== 本地状态 ====================
|
||||
const dragOver = ref(false)
|
||||
@@ -248,6 +250,12 @@ const progressStatus = computed(() => {
|
||||
return 'active'
|
||||
})
|
||||
|
||||
// 预计消耗积分(从配置获取 kling 模型积分)
|
||||
const estimatedPoints = computed(() => {
|
||||
const points = pointsConfigStore.getConsumePoints('kling')
|
||||
return points ?? 150 // 默认 150 积分
|
||||
})
|
||||
|
||||
// ==================== 方法 ====================
|
||||
function triggerFileSelect() {
|
||||
fileInput.value?.click()
|
||||
@@ -288,7 +296,8 @@ function getVideoPreviewUrl(video: any): string {
|
||||
onMounted(async () => {
|
||||
await Promise.all([
|
||||
voiceStore.refresh(),
|
||||
userStore.fetchUserProfile()
|
||||
userStore.fetchUserProfile(),
|
||||
pointsConfigStore.loadConfig()
|
||||
])
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user