Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ai_fundub
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
ai_fundub
Commits
046c2acc
Commit
046c2acc
authored
Oct 01, 2026
by
Jeff nan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
2ca3ea70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
index.js
form/index.js
+21
-16
No files found.
form/index.js
View file @
046c2acc
...
@@ -269,13 +269,11 @@ function initVueApp(savedData) {
...
@@ -269,13 +269,11 @@ function initVueApp(savedData) {
return
isStaging
?
'
https://stagingopensource.iteachabc.com
'
:
'
https://opensource.iteachabc.com
'
;
return
isStaging
?
'
https://stagingopensource.iteachabc.com
'
:
'
https://opensource.iteachabc.com
'
;
},
},
// open API 鉴权
headers
// open API 鉴权
query:auth_key / user_sign
async
getApiAuthHeaders
(
extra
)
{
async
appendApiAuthQuery
(
url
)
{
const
authKey
=
await
this
.
getAuthKey
();
const
authKey
=
await
this
.
getAuthKey
();
return
Object
.
assign
({
const
sep
=
url
.
includes
(
'
?
'
)
?
'
&
'
:
'
?
'
;
auth_key
:
authKey
||
''
,
return
`
${
url
}${
sep
}
auth_key=
${
encodeURIComponent
(
authKey
||
''
)}
&user_sign=
${
encodeURIComponent
(
'
syllabus_cw_make
'
)}
`
;
user_sign
:
'
syllabus_cw_make
'
,
},
extra
||
{});
},
},
// 开始字幕任务轮询
// 开始字幕任务轮询
...
@@ -288,11 +286,13 @@ function initVueApp(savedData) {
...
@@ -288,11 +286,13 @@ function initVueApp(savedData) {
this
.
loadingText
=
'
字幕任务已创建,正在处理...
'
;
this
.
loadingText
=
'
字幕任务已创建,正在处理...
'
;
this
.
subtitlePollTimer
=
setInterval
(
async
()
=>
{
this
.
subtitlePollTimer
=
setInterval
(
async
()
=>
{
try
{
try
{
const
resp
=
await
fetch
(
`
${
base
}
/open/api/ai/dpe/v1/common/task?task_uuid=
${
encodeURIComponent
(
uuid
)}
`
,
{
const
url
=
await
this
.
appendApiAuthQuery
(
`
${
base
}
/open/api/ai/dpe/v1/common/task?task_uuid=
${
encodeURIComponent
(
uuid
)}
`
);
const
resp
=
await
fetch
(
url
,
{
method
:
'
GET
'
,
method
:
'
GET
'
,
mode
:
'
cors
'
,
mode
:
'
cors
'
,
cache
:
'
no-cache
'
,
cache
:
'
no-cache
'
,
headers
:
await
this
.
getApiAuthHeaders
(),
});
});
const
json
=
await
resp
.
json
();
const
json
=
await
resp
.
json
();
if
(
json
&&
json
.
code
===
200
&&
json
.
data
)
{
if
(
json
&&
json
.
code
===
200
&&
json
.
data
)
{
...
@@ -346,11 +346,13 @@ function initVueApp(savedData) {
...
@@ -346,11 +346,13 @@ function initVueApp(savedData) {
this
.
vocalLoadingText
=
'
去人声任务已创建,正在处理...
'
;
this
.
vocalLoadingText
=
'
去人声任务已创建,正在处理...
'
;
this
.
vocalPollTimer
=
setInterval
(
async
()
=>
{
this
.
vocalPollTimer
=
setInterval
(
async
()
=>
{
try
{
try
{
const
resp
=
await
fetch
(
`
${
base
}
/open/api/ai/dpe/v1/common/task?task_uuid=
${
encodeURIComponent
(
uuid
)}
`
,
{
const
url
=
await
this
.
appendApiAuthQuery
(
`
${
base
}
/open/api/ai/dpe/v1/common/task?task_uuid=
${
encodeURIComponent
(
uuid
)}
`
);
const
resp
=
await
fetch
(
url
,
{
method
:
'
GET
'
,
method
:
'
GET
'
,
mode
:
'
cors
'
,
mode
:
'
cors
'
,
cache
:
'
no-cache
'
,
cache
:
'
no-cache
'
,
headers
:
await
this
.
getApiAuthHeaders
(),
});
});
const
json
=
await
resp
.
json
();
const
json
=
await
resp
.
json
();
if
(
json
&&
json
.
code
===
200
&&
json
.
data
)
{
if
(
json
&&
json
.
code
===
200
&&
json
.
data
)
{
...
@@ -649,9 +651,10 @@ function initVueApp(savedData) {
...
@@ -649,9 +651,10 @@ function initVueApp(savedData) {
const
base
=
this
.
getApiBase
();
const
base
=
this
.
getApiBase
();
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
正在提交字幕任务...
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
});
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
正在提交字幕任务...
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
});
try
{
try
{
const
resp
=
await
fetch
(
`
${
base
}
/open/api/ai/dpe/v1/video/subtitles`
,
{
const
url
=
await
this
.
appendApiAuthQuery
(
`
${
base
}
/open/api/ai/dpe/v1/video/subtitles`
);
const
resp
=
await
fetch
(
url
,
{
method
:
'
POST
'
,
method
:
'
POST
'
,
headers
:
await
this
.
getApiAuthHeaders
({
'
Content-Type
'
:
'
application/json
'
})
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
}
,
body
:
JSON
.
stringify
({
video_url
:
videoUrl
})
body
:
JSON
.
stringify
({
video_url
:
videoUrl
})
});
});
const
json
=
await
resp
.
json
();
const
json
=
await
resp
.
json
();
...
@@ -702,9 +705,10 @@ function initVueApp(savedData) {
...
@@ -702,9 +705,10 @@ function initVueApp(savedData) {
const
base
=
this
.
getApiBase
();
const
base
=
this
.
getApiBase
();
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
正在提交去人声任务...
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
});
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
正在提交去人声任务...
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
});
try
{
try
{
const
resp
=
await
fetch
(
`
${
base
}
/open/api/ai/dpe/v1/video/vocalbgmute`
,
{
const
url
=
await
this
.
appendApiAuthQuery
(
`
${
base
}
/open/api/ai/dpe/v1/video/vocalbgmute`
);
const
resp
=
await
fetch
(
url
,
{
method
:
'
POST
'
,
method
:
'
POST
'
,
headers
:
await
this
.
getApiAuthHeaders
({
'
Content-Type
'
:
'
application/json
'
})
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
}
,
body
:
JSON
.
stringify
({
video_url
:
videoUrl
})
body
:
JSON
.
stringify
({
video_url
:
videoUrl
})
});
});
const
json
=
await
resp
.
json
();
const
json
=
await
resp
.
json
();
...
@@ -2406,9 +2410,10 @@ function initVueApp(savedData) {
...
@@ -2406,9 +2410,10 @@ function initVueApp(savedData) {
const
base
=
this
.
getApiBase
();
const
base
=
this
.
getApiBase
();
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
正在重新生成歌词(约3-5分钟)...
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0,0,0,0.7)
'
});
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
正在重新生成歌词(约3-5分钟)...
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0,0,0,0.7)
'
});
try
{
try
{
const
resp
=
await
fetch
(
`
${
base
}
/open/api/ai/dpe/v1/video/subtitles/fromjson`
,
{
const
url
=
await
this
.
appendApiAuthQuery
(
`
${
base
}
/open/api/ai/dpe/v1/video/subtitles/fromjson`
);
const
resp
=
await
fetch
(
url
,
{
method
:
'
POST
'
,
method
:
'
POST
'
,
headers
:
await
this
.
getApiAuthHeaders
({
'
Content-Type
'
:
'
application/json
'
})
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
}
,
body
:
JSON
.
stringify
({
body
:
JSON
.
stringify
({
subtitleJsonUrl
:
subUrl
.
replace
(
'
http://
'
,
'
https://
'
),
subtitleJsonUrl
:
subUrl
.
replace
(
'
http://
'
,
'
https://
'
),
translatedJsonUrl
:
transUrl
.
replace
(
'
http://
'
,
'
https://
'
)
translatedJsonUrl
:
transUrl
.
replace
(
'
http://
'
,
'
https://
'
)
...
...
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