Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
digitalPerson-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
digitalPerson
digitalPerson-fe
Commits
9e9b2a7f
Commit
9e9b2a7f
authored
Sep 29, 2024
by
Dazzle Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 首页最近创作传参
parent
df3e482e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
template.ts
src/apis/template.ts
+2
-4
header-bar.vue
src/views/creation/layout/header-bar.vue
+1
-0
recent-creation.vue
src/views/home/components/recent-creation.vue
+1
-4
recommend-template.vue
src/views/home/components/recommend-template.vue
+3
-1
No files found.
src/apis/template.ts
View file @
9e9b2a7f
import
{
request
}
from
'@/utils/request'
import
{
request
}
from
'@/utils/request'
// 获取模板
// 获取模板
export
function
fetchDigitalHumanTemplateStatusList
<
T
>
()
{
export
function
fetchDigitalHumanTemplateStatusList
<
T
>
(
payload
:
object
)
{
return
request
.
post
<
T
>
(
return
request
.
post
<
T
>
(
'/aiDigitalHumanTemplateStatusRest/getDigitalHumanTemplateStatusList.json'
,
payload
)
'/aiDigitalHumanTemplateStatusRest/getDigitalHumanTemplateStatusList.json?pageNo=1&pageSize=1000'
,
)
}
}
// 根据ID获取推荐模板信息
// 根据ID获取推荐模板信息
...
...
src/views/creation/layout/header-bar.vue
View file @
9e9b2a7f
...
@@ -118,6 +118,7 @@ async function createBaseVideoTask() {
...
@@ -118,6 +118,7 @@ async function createBaseVideoTask() {
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
window
.
$message
.
success
(
'導出成功'
)
window
.
$message
.
success
(
'導出成功'
)
showExportModal
.
value
=
false
showExportModal
.
value
=
false
router
.
push
(
'/work/videos'
)
}
}
}
}
...
...
src/views/home/components/recent-creation.vue
View file @
9e9b2a7f
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
fetchDraftsList
}
from
'@/apis/drafts'
import
{
fetchDraftsList
}
from
'@/apis/drafts'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
DraftConfig
}
from
'@/store/types/creation'
import
{
DraftConfig
}
from
'@/store/types/creation'
import
{
TaskType
}
from
'@/store/types/template'
import
{
TaskType
}
from
'@/store/types/template'
import
{
Right
}
from
'@icon-park/vue-next'
import
{
Right
}
from
'@icon-park/vue-next'
...
@@ -8,9 +7,7 @@ import { onMounted, ref } from 'vue'
...
@@ -8,9 +7,7 @@ import { onMounted, ref } from 'vue'
import
{
useRouter
}
from
'vue-router'
import
{
useRouter
}
from
'vue-router'
const
router
=
useRouter
()
const
router
=
useRouter
()
const
userStore
=
useUserStore
()
const
token
=
userStore
.
token
const
recentCreationList
=
ref
<
DraftConfig
[]
>
([])
const
recentCreationList
=
ref
<
DraftConfig
[]
>
([])
onMounted
(()
=>
{
onMounted
(()
=>
{
...
@@ -18,7 +15,7 @@ onMounted(() => {
...
@@ -18,7 +15,7 @@ onMounted(() => {
})
})
async
function
getDraftsList
()
{
async
function
getDraftsList
()
{
const
res
=
await
fetchDraftsList
<
DraftConfig
[]
>
(
token
,
{
pagingInfo
:
{
pageNo
:
1
,
pageSize
:
7
}
})
const
res
=
await
fetchDraftsList
<
DraftConfig
[]
>
({
pagingInfo
:
{
pageNo
:
1
,
pageSize
:
7
}
})
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
recentCreationList
.
value
=
res
.
data
recentCreationList
.
value
=
res
.
data
}
}
...
...
src/views/home/components/recommend-template.vue
View file @
9e9b2a7f
...
@@ -59,7 +59,9 @@ onMounted(() => {
...
@@ -59,7 +59,9 @@ onMounted(() => {
})
})
async
function
getTemplateList
()
{
async
function
getTemplateList
()
{
const
res
=
await
fetchDigitalHumanTemplateStatusList
<
DigitalTemplate
[]
>
()
const
res
=
await
fetchDigitalHumanTemplateStatusList
<
DigitalTemplate
[]
>
({
pagingInfo
:
{
pageNo
:
1
,
pageSize
:
1000
},
})
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
templateList
.
value
=
res
.
data
templateList
.
value
=
res
.
data
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment