Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yl15_ai_video
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
yl15_ai_video
Commits
39b2e852
Commit
39b2e852
authored
Mar 05, 2026
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
9d944887
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
580 additions
and
102 deletions
+580
-102
index.css
form/index.css
+80
-2
index.html
form/index.html
+86
-6
index.js
form/index.js
+322
-28
package-lock.json
package-lock.json
+92
-66
No files found.
form/index.css
View file @
39b2e852
.edit-data
{
padding
:
10px
;
html
,
body
{
height
:
100%
;
}
body
{
margin
:
0
;
}
.page
{
padding
:
15px
;
box-sizing
:
border-box
;
height
:
100vh
;
background
:
#f5f7fa
;
}
[
v-cloak
]
{
display
:
none
;
}
.split
{
height
:
calc
(
100vh
-
30px
);
display
:
flex
;
gap
:
15px
;
}
.split
>
.el-col
{
float
:
none
;
flex
:
1
;
max-width
:
none
;
}
.panel
{
background
:
#fff
;
border-radius
:
6px
;
padding
:
16px
;
box-sizing
:
border-box
;
height
:
100%
;
overflow
:
auto
;
border
:
1px
solid
#ebeef5
;
}
.panel-title
{
font-size
:
16px
;
font-weight
:
600
;
margin-bottom
:
16px
;
color
:
#303133
;
}
.uploader
.hint
{
margin-left
:
10px
;
color
:
#909399
;
font-size
:
12px
;
}
.upload-progress
{
width
:
100%
;
}
.upload-progress
.progress-info
{
display
:
flex
;
justify-content
:
space-between
;
color
:
#606266
;
font-size
:
12px
;
margin-bottom
:
6px
;
}
.video-preview
{
width
:
100%
;
max-height
:
260px
;
background
:
#000
;
}
.meta
{
font-size
:
13px
;
color
:
#606266
;
line-height
:
22px
;
}
.json-alert
{
margin-top
:
12px
;
}
\ No newline at end of file
form/index.html
View file @
39b2e852
...
...
@@ -9,17 +9,97 @@
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/jquery-1.12.3.min.js"
></script>
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"
></script>
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/vue.min.js"
></script>
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/crypto-js.min.js"
></script>
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/aliyun-oss-sdk-6.18.1.min.js"
></script>
<!-- 引入样式 -->
<link
href=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/element-ui/theme-chalk/index.css"
rel=
"stylesheet"
>
<!-- 引入组件库 -->
<script
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/element-ui/index.js"
></script>
</head>
<body>
<div
class=
"edit-data"
>
<!-- 简单的例子,一个输入框+一个按钮,保存输入框的信息 -->
test:
<input
type=
"text"
name=
"test"
/>
<input
id=
"save"
type=
"button"
value=
"保存"
>
</div>
<body>
<div
id=
"app"
v-cloak
class=
"page"
>
<el-row
:gutter=
"0"
class=
"split"
>
<el-col
:span=
"12"
class=
"panel"
>
<div
class=
"panel-title"
>
内容录入区
</div>
<el-form
label-width=
"90px"
size=
"small"
>
<el-form-item
label=
"上传视频"
>
<el-upload
v-if=
"!videoPreviewUrl"
ref=
"upload"
class=
"uploader"
:action=
"uploadUrl"
:data=
"uploadData"
:show-file-list=
"false"
:before-upload=
"beforeUpload"
:on-change=
"handleFileChange"
:on-error=
"handleUploadError"
accept=
"video/*"
>
<el-button
type=
"primary"
:loading=
"uploading"
:disabled=
"uploading"
>
选择视频
</el-button>
<span
class=
"hint"
>
支持重复上传,会覆盖当前视频
</span>
</el-upload>
<el-button
v-else
type=
"warning"
:loading=
"uploading"
:disabled=
"uploading"
@
click=
"confirmReupload"
>
重新上传
</el-button>
</el-form-item>
<el-form-item
label=
"上传进度"
v-if=
"uploading"
>
<div
class=
"upload-progress"
>
<div
class=
"progress-info"
>
<span>
正在上传视频...
</span>
<span>
{{ uploadProgress }}%
</span>
</div>
<el-progress
:percentage=
"uploadProgress"
:stroke-width=
"8"
:show-text=
"false"
status=
"success"
>
</el-progress>
</div>
</el-form-item>
<el-form-item
label=
"预览播放"
v-if=
"videoPreviewUrl"
>
<video
ref=
"videoRef"
class=
"video-preview"
controls
:src=
"videoPreviewUrl"
></video>
</el-form-item>
<el-form-item
label=
"视频信息"
v-if=
"videoInfo.ready"
>
<div
class=
"meta"
>
<div>
时长:{{ videoInfo.durationText }}
</div>
<div>
分辨率:{{ videoInfo.width }} × {{ videoInfo.height }}
</div>
<div>
大小:{{ videoInfo.sizeText }}
</div>
</div>
</el-form-item>
</el-form>
</el-col>
<el-col
:span=
"12"
class=
"panel"
>
<div
class=
"panel-title"
>
AI 编排脚本区
</div>
<el-input
type=
"textarea"
:rows=
"16"
v-model=
"scriptText"
placeholder=
"请输入 JSON"
></el-input>
<el-alert
v-if=
"jsonError"
type=
"error"
:closable=
"false"
class=
"json-alert"
:title=
"jsonError"
></el-alert>
<el-alert
v-else
type=
"success"
:closable=
"false"
class=
"json-alert"
title=
"JSON 格式正确"
></el-alert>
</el-col>
</el-row>
</div>
</body>
<script
src=
"./index.js"
></script>
</html>
\ No newline at end of file
form/index.js
View file @
39b2e852
This diff is collapsed.
Click to expand it.
package-lock.json
View file @
39b2e852
This diff is collapsed.
Click to expand it.
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