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
7a420fbc
Commit
7a420fbc
authored
Mar 12, 2024
by
周成波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
封底图片update
parent
7e15b57b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
19 deletions
+39
-19
useManyValues.ts
src/views/home/compositions/useManyValues.ts
+17
-11
index.vue
src/views/home/index.vue
+22
-8
No files found.
src/views/home/compositions/useManyValues.ts
View file @
7a420fbc
...
@@ -280,28 +280,34 @@ export const useManyValues = () => {
...
@@ -280,28 +280,34 @@ export const useManyValues = () => {
words_num
:
100
,
words_num
:
100
,
result1
:
""
,
result1
:
""
,
result2
:
""
,
result2
:
""
,
if_need_product_pic
:
"false"
,
product_pic
:
"http://wm-tools-backend.frp.wmdigit.com:8888/assets/2024/03/12/887a52c6-e022-11ee-a7de-9be5c7a16c02_resized.png"
,
product_pic
:
"http://wm-tools-backend.frp.wmdigit.com:8888/assets/2024/03/06/4784edb2-db68-11ee-a7de-9be5c7a16c02_resized.jpg"
,
product_pic_local
:
"assets/2024/03/12/887a52c6-e022-11ee-a7de-9be5c7a16c02_resized.png"
,
product_pic_local
:
"assets/2024/03/06/4784edb2-db68-11ee-a7de-9be5c7a16c02_resized.jpg"
,
product_pic_with_text
:
"http://wm-tools-backend.frp.wmdigit.com:8888/assets/2024/03/12/887a52c6-e022-11ee-a7de-9be5c7a16c02_resized_with_text.png"
,
product_pic_with_text
:
"http://wm-tools-backend.frp.wmdigit.com:8888/assets/2024/03/06/4784edb2-db68-11ee-a7de-9be5c7a16c02_resized_with_text.jpg"
,
product_pic_with_text_local
:
"assets/2024/03/12/887a52c6-e022-11ee-a7de-9be5c7a16c02_resized_with_text.png"
,
product_pic_with_text_local
:
"assets/2024/03/06/4784edb2-db68-11ee-a7de-9be5c7a16c02_resized_with_text.jpg"
,
product_pic_titles
:
[
product_pic_titles
:
[
{
{
text
:
"金巧蒂原味猪肉松"
,
text
:
"金巧蒂原味猪肉松"
,
color
:
"#FB7D01"
,
color
:
"#FB7D01"
,
bg_color
:
""
,
bg_color
:
""
,
font_size
:
45
,
font_size
:
60
,
position
:
0.
8
,
position
:
0.
92
,
},
},
{
{
text
:
"促销价只要8.8!快来抢购吧~"
,
text
:
"促销价只要8.8!快来抢购吧~"
,
color
:
"#FF0
800
"
,
color
:
"#FF0
08C
"
,
bg_color
:
""
,
bg_color
:
""
,
font_size
:
45
,
font_size
:
50
,
position
:
0.2
,
position
:
0.41
,
},
{
text
:
"关注 点赞 评论
\n
记得一键三连哦"
,
color
:
"#000000"
,
bg_color
:
""
,
font_size
:
50
,
position
:
0.12
,
},
},
],
],
product_pic_speech
:
"我们的产品正在促销热卖中,点点关注
哦
~"
,
product_pic_speech
:
"我们的产品正在促销热卖中,点点关注
吧
~"
,
};
};
return
{
return
{
...
...
src/views/home/index.vue
View file @
7a420fbc
...
@@ -40,7 +40,7 @@ const tuili_llm = default_data.llms.qwen_local;
...
@@ -40,7 +40,7 @@ const tuili_llm = default_data.llms.qwen_local;
const
tuili_keyword_llm
=
default_data
.
llms
.
tyqw_online
;
const
tuili_keyword_llm
=
default_data
.
llms
.
tyqw_online
;
const
fanyi_llm
=
default_data
.
llms
.
qwen_local
;
const
fanyi_llm
=
default_data
.
llms
.
qwen_local
;
const
voice_rate
=
ref
(
-
1
0
)
const
voice_rate
=
ref
(
0
)
const
voice_volume
=
ref
(
0
)
const
voice_volume
=
ref
(
0
)
const
voice
=
ref
(
"zh-CN-YunjianNeural"
)
const
voice
=
ref
(
"zh-CN-YunjianNeural"
)
const
bgm
=
ref
(
"解忧曲"
)
const
bgm
=
ref
(
"解忧曲"
)
...
@@ -49,7 +49,7 @@ const pwdCheckDialogVisible = ref(false);
...
@@ -49,7 +49,7 @@ const pwdCheckDialogVisible = ref(false);
const
pwdCheckValue
=
ref
(
""
)
const
pwdCheckValue
=
ref
(
""
)
const
sub_font_color
=
ref
(
"#FFFF00"
)
const
sub_font_color
=
ref
(
"#FFFF00"
)
const
sub_bg_color
=
ref
()
const
sub_bg_color
=
ref
()
const
sub_font_size
=
ref
(
2
5
)
const
sub_font_size
=
ref
(
3
5
)
const
sub_position
=
ref
(
0.3
)
const
sub_position
=
ref
(
0.3
)
const
marketingTemplateVisible
=
ref
(
false
);
const
marketingTemplateVisible
=
ref
(
false
);
...
@@ -66,7 +66,7 @@ const marketing_template = reactive({
...
@@ -66,7 +66,7 @@ const marketing_template = reactive({
prompt2
:
""
,
prompt2
:
""
,
result1
:
""
,
result1
:
""
,
result2
:
""
,
result2
:
""
,
if_need_product_pic
:
""
,
if_need_product_pic
:
"
false
"
,
product_pic
:
"src/assets/waiting.png"
,
product_pic
:
"src/assets/waiting.png"
,
product_pic_local
:
""
,
product_pic_local
:
""
,
product_pic_with_text
:
""
,
product_pic_with_text
:
""
,
...
@@ -584,6 +584,13 @@ const onGenVideo = () => {
...
@@ -584,6 +584,13 @@ const onGenVideo = () => {
img_path
:
item
.
local_image_path
img_path
:
item
.
local_image_path
};
};
});
});
if
(
marketing_template
.
if_need_product_pic
==
'true'
&&
marketing_template
.
product_pic_with_text_local
&&
marketing_template
.
product_pic_speech
)
{
video_param_detail
.
push
({
idx
:
String
(
form
.
adapt_result_json
.
length
+
1
),
text
:
marketing_template
.
product_pic_speech
,
img_path
:
marketing_template
.
product_pic_with_text_local
})
}
let
para_rate
=
`
${
voice_rate
.
value
}
%`
;
let
para_rate
=
`
${
voice_rate
.
value
}
%`
;
let
para_volume
=
`
${
voice_volume
.
value
}
%`
;
let
para_volume
=
`
${
voice_volume
.
value
}
%`
;
if
(
voice_rate
.
value
>=
0
)
{
para_rate
=
`+
${
para_rate
}
`
}
if
(
voice_rate
.
value
>=
0
)
{
para_rate
=
`+
${
para_rate
}
`
}
...
@@ -660,6 +667,7 @@ const onChangeScreen = (val: string) => {
...
@@ -660,6 +667,7 @@ const onChangeScreen = (val: string) => {
marketing_template
.
product_pic_local
=
default_data
.
marketing_template
.
product_pic_local
;
marketing_template
.
product_pic_local
=
default_data
.
marketing_template
.
product_pic_local
;
marketing_template
.
product_pic_with_text
=
default_data
.
marketing_template
.
product_pic_with_text
;
marketing_template
.
product_pic_with_text
=
default_data
.
marketing_template
.
product_pic_with_text
;
marketing_template
.
product_pic_with_text_local
=
default_data
.
marketing_template
.
product_pic_with_text_local
;
marketing_template
.
product_pic_with_text_local
=
default_data
.
marketing_template
.
product_pic_with_text_local
;
marketing_template
.
if_need_product_pic
=
'true'
;
}
}
marketing_template
.
product_name
=
default_data
.
marketing_template
.
product_name
;
marketing_template
.
product_name
=
default_data
.
marketing_template
.
product_name
;
...
@@ -670,7 +678,6 @@ const onChangeScreen = (val: string) => {
...
@@ -670,7 +678,6 @@ const onChangeScreen = (val: string) => {
marketing_template
.
story_type
=
default_data
.
marketing_template
.
story_type
;
marketing_template
.
story_type
=
default_data
.
marketing_template
.
story_type
;
marketing_template
.
reference
=
default_data
.
marketing_template
.
reference
;
marketing_template
.
reference
=
default_data
.
marketing_template
.
reference
;
marketing_template
.
words_num
=
default_data
.
marketing_template
.
words_num
;
marketing_template
.
words_num
=
default_data
.
marketing_template
.
words_num
;
marketing_template
.
if_need_product_pic
=
default_data
.
marketing_template
.
if_need_product_pic
;
marketing_template
.
product_pic_titles
=
default_data
.
marketing_template
.
product_pic_titles
;
marketing_template
.
product_pic_titles
=
default_data
.
marketing_template
.
product_pic_titles
;
marketing_template
.
product_pic_speech
=
default_data
.
marketing_template
.
product_pic_speech
;
marketing_template
.
product_pic_speech
=
default_data
.
marketing_template
.
product_pic_speech
;
...
@@ -815,7 +822,7 @@ const onAddMarketingTemplatePicText = () => {
...
@@ -815,7 +822,7 @@ const onAddMarketingTemplatePicText = () => {
text
:
"新的文本"
,
text
:
"新的文本"
,
color
:
"#000000"
,
color
:
"#000000"
,
bg_color
:
"#FFFFFF"
,
bg_color
:
"#FFFFFF"
,
font_size
:
2
0
,
font_size
:
5
0
,
position
:
0.5
position
:
0.5
};
};
marketing_template
.
product_pic_titles
.
push
(
newElement
);
marketing_template
.
product_pic_titles
.
push
(
newElement
);
...
@@ -1058,6 +1065,13 @@ const onMarketingTemplateSubmitGpt = async () => {
...
@@ -1058,6 +1065,13 @@ const onMarketingTemplateSubmitGpt = async () => {
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</el-form-item>
</el-form-item>
<el-form-item
label=
"封底"
v-if=
"JSON.parse(marketing_template.if_need_product_pic.toLowerCase()) && marketing_template.product_pic_with_text_local"
>
<div
:style=
"{ width: String(parseInt(form.img_size.width) / 2)+'px' } "
class=
"dashed-div"
>
<el-image
:src=
"marketing_template.product_pic_with_text"
/>
</div>
<span
style=
"margin: 0 20px 0 20px"
>
镜头旁白:
</span>
<el-input
v-model=
"marketing_template.product_pic_speech"
:autosize=
"true"
type=
"textarea"
style=
"width: 400px;"
></el-input>
</el-form-item>
<!-- 生成视频 -->
<!-- 生成视频 -->
<el-form-item
label=
"设置"
>
<el-form-item
label=
"设置"
>
<span
style=
"margin: 0 20px"
>
TTS语速:
</span>
<span
style=
"margin: 0 20px"
>
TTS语速:
</span>
...
@@ -1178,7 +1192,7 @@ const onMarketingTemplateSubmitGpt = async () => {
...
@@ -1178,7 +1192,7 @@ const onMarketingTemplateSubmitGpt = async () => {
<el-form-item
label=
"文案字数"
>
<el-form-item
label=
"文案字数"
>
<el-input-number
v-model=
"marketing_template.words_num"
:min=
"10"
:max=
"500"
controls-position=
"right"
/>
<el-input-number
v-model=
"marketing_template.words_num"
:min=
"10"
:max=
"500"
controls-position=
"right"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
商品
图片"
>
<el-form-item
label=
"
封底
图片"
>
<el-switch
v-model=
"marketing_template.if_need_product_pic"
active-value=
"true"
inactive-value=
"false"
/>
<el-switch
v-model=
"marketing_template.if_need_product_pic"
active-value=
"true"
inactive-value=
"false"
/>
</el-form-item>
</el-form-item>
<div
v-if=
"JSON.parse(marketing_template.if_need_product_pic.toLowerCase())"
>
<div
v-if=
"JSON.parse(marketing_template.if_need_product_pic.toLowerCase())"
>
...
@@ -1208,9 +1222,9 @@ const onMarketingTemplateSubmitGpt = async () => {
...
@@ -1208,9 +1222,9 @@ const onMarketingTemplateSubmitGpt = async () => {
<span
style=
"margin-left:30px;"
>
字体背景:
</span>
<span
style=
"margin-left:30px;"
>
字体背景:
</span>
<el-color-picker
v-model=
"pic_title.bg_color"
/>
<el-color-picker
v-model=
"pic_title.bg_color"
/>
<span
style=
"margin-left:30px;"
>
字体大小:
</span>
<span
style=
"margin-left:30px;"
>
字体大小:
</span>
<el-input-number
v-model=
"pic_title.font_size"
:min=
"1"
:max=
"
5
0"
controls-position=
"right"
/>
<el-input-number
v-model=
"pic_title.font_size"
:min=
"1"
:max=
"
10
0"
controls-position=
"right"
/>
<span
style=
"margin-left:30px;"
>
在图片上的位置:
</span>
<span
style=
"margin-left:30px;"
>
在图片上的位置:
</span>
<el-slider
v-model=
"pic_title.position"
:step=
"0.1"
:min=
"0"
:max=
"1"
show-input
vertical
height=
"100px"
style=
"margin-top: 10px;"
/>
<el-slider
v-model=
"pic_title.position"
:step=
"0.
0
1"
:min=
"0"
:max=
"1"
show-input
vertical
height=
"100px"
style=
"margin-top: 10px;"
/>
<el-button
type=
"danger"
size=
"small"
@
click=
"marketing_template.product_pic_titles.splice(index, 1);"
style=
"margin-left: 80px;"
>
删除
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"marketing_template.product_pic_titles.splice(index, 1);"
style=
"margin-left: 80px;"
>
删除
</el-button>
</div>
</div>
<el-button
type=
"success"
size=
"small"
@
click=
"onPreviewMarketingTemplatePicText"
>
预览
</el-button>
<el-button
type=
"success"
size=
"small"
@
click=
"onPreviewMarketingTemplatePicText"
>
预览
</el-button>
...
...
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