Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
text2video-frontend
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
周成波
text2video-frontend
Commits
8d5c82cb
Commit
8d5c82cb
authored
Oct 12, 2024
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数字人视频生成
parent
75216ae2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
351 additions
and
7 deletions
+351
-7
text2videoService.ts
src/api/service/text2videoService.ts
+26
-0
index.ts
src/router/index.ts
+6
-5
gen_digit_human_video.vue
src/views/home/gen_digit_human_video.vue
+317
-0
vite.config.ts
vite.config.ts
+2
-2
No files found.
src/api/service/text2videoService.ts
View file @
8d5c82cb
...
...
@@ -278,4 +278,30 @@ export default {
return
Promise
.
reject
(
`与 img2img_inpaint Api 通讯失败`
);
});
},
submitGenDigitHumanVideo
(
post_data
:
any
):
Promise
<
string
>
{
if
(
!
post_data
)
{
return
Promise
.
reject
(
"输入不能为空"
);
}
return
request
.
post
(
'/text2video/gen_video_digithuman'
,
post_data
)
.
then
((
res
:
any
)
=>
{
// console.log(res);
if
(
res
&&
res
.
code
===
0
)
{
if
(
res
.
data
.
result
.
combined_video_oss
)
{
return
res
.
data
.
result
.
combined_video_oss
;
}
else
if
(
res
.
data
.
result
.
human_video_out_oss
)
{
return
res
.
data
.
result
.
human_video_out_oss
;
}
else
{
return
Promise
.
reject
(
"视频合成失败"
);
}
}
else
{
const
errorMessage
=
res
?
res
.
message
:
"未知错误"
;
return
Promise
.
reject
(
errorMessage
);
}
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`err =
${
JSON
.
stringify
(
err
)}
`
);
return
Promise
.
reject
(
`与后端 gen_video_digithuman 接口通讯失败`
);
});
},
}
src/router/index.ts
View file @
8d5c82cb
...
...
@@ -3,6 +3,7 @@ import HomeView from '../views/home/index.vue'
import
HomeViewEn
from
'../views/home/index_en.vue'
import
RecordSteps
from
'../views/home/record_steps.vue'
import
CalcRetire
from
'../views/home/calc_retire.vue'
import
GenDigitHumanVideo
from
'../views/home/gen_digit_human_video.vue'
const
router
=
createRouter
({
...
...
@@ -10,13 +11,13 @@ const router = createRouter({
routes
:
[
{
path
:
'/'
,
name
:
'
CalcRetire
'
,
component
:
CalcRetire
name
:
'
GenDigitHumanVideo
'
,
component
:
GenDigitHumanVideo
},
{
path
:
'/
recordsteps
'
,
name
:
'
recordsteps
'
,
component
:
RecordSteps
path
:
'/
calcretire
'
,
name
:
'
CalcRetire
'
,
component
:
CalcRetire
},
{
path
:
'/text2video'
,
...
...
src/views/home/gen_digit_human_video.vue
0 → 100644
View file @
8d5c82cb
This diff is collapsed.
Click to expand it.
vite.config.ts
View file @
8d5c82cb
...
...
@@ -27,8 +27,8 @@ export default defineConfig({
proxy
:
{
'/api/'
:
{
// target: 'http://127.0.0.1:5001/', // 本机后端服务
target
:
'http://wm-tools-backend.frp.wmdigit.com:8888/'
,
// new3090后端服务
// target: 'http://wm-tools-backend-test.frp.wmdigit.com:8888/', // 4090-1
测试后端服务
//
target: 'http://wm-tools-backend.frp.wmdigit.com:8888/', // new3090后端服务
target
:
'http://wm-tools-backend-test.frp.wmdigit.com:8888/'
,
//
测试后端服务
changeOrigin
:
true
,
rewrite
:
(
path
:
any
)
=>
path
.
replace
(
/^
\/
api/
,
''
)
}
...
...
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