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