更新功能和文档: 增强支付系统、任务队列管理、用户作品管理等功能

This commit is contained in:
AIGC Developer
2025-10-29 10:16:03 +08:00
parent 8c55f9f376
commit 6f72386523
64 changed files with 1529 additions and 339 deletions

View File

@@ -315,6 +315,7 @@ import { ref, onMounted, computed } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessage, ElMessageBox } from 'element-plus'
import { Star, User, Compass, Document, VideoPlay, Picture, Film, Bell, Setting, Search } from '@element-plus/icons-vue'
import { getMyWorks } from '@/api/userWorks'
const router = useRouter()
@@ -343,12 +344,20 @@ const items = ref([])
const loadList = async () => {
loading.value = true
try {
const response = await api.get('/user-works')
const data = response.data.data || []
const response = await getMyWorks({
page: page.value - 1, // 后端使用0-based分页
size: pageSize.value
})
if (page.value === 1) items.value = []
items.value = items.value.concat(data)
hasMore.value = data.length < pageSize.value
if (response.data.success) {
const data = response.data.data || []
if (page.value === 1) items.value = []
items.value = items.value.concat(data)
hasMore.value = data.length === pageSize.value
} else {
throw new Error(response.data.message || '获取作品列表失败')
}
} catch (error) {
console.error('加载作品列表失败:', error)
ElMessage.error('加载作品列表失败')
@@ -512,18 +521,18 @@ const goToSubscription = () => {
}
const goToTextToVideo = () => {
console.log('导航到文生视频')
router.push('/text-to-video')
console.log('导航到文生视频创作')
router.push('/text-to-video/create')
}
const goToImageToVideo = () => {
console.log('导航到图生视频')
router.push('/image-to-video')
console.log('导航到图生视频创作')
router.push('/image-to-video/create')
}
const goToStoryboardVideo = () => {
console.log('导航到分镜视频')
router.push('/storyboard-video')
console.log('导航到分镜视频创作')
router.push('/storyboard-video/create')
}
// 重置筛选器