fix: 新需求 对接火山seedance

This commit is contained in:
old burden 2026-03-27 15:27:28 +08:00
parent aed52b0437
commit 8959b775a4
15 changed files with 266 additions and 72 deletions

View File

@ -5,6 +5,8 @@
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/python" />
<excludePattern pattern="*.zip" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -615,4 +615,4 @@
right: 15px
}
/*# sourceMappingURL=quill.core.css.map*/
/* Quill core styles - source map removed to fix build error */

View File

@ -1286,4 +1286,4 @@
border: 1px solid #ccc
}
/*# sourceMappingURL=quill.snow.css.map*/
/* Quill snow styles - source map removed to fix build error */

View File

@ -143,6 +143,14 @@ export default {
cardNoRequired: 'Please enter card number',
cardNameRequired: 'Please enter cardholder name',
rechargeFailed: 'Recharge failed',
// Model selection
selectModel: 'Select Model',
seedance20: 'Seedance 2.0',
seedance20Fast: 'Seedance 2.0 Fast',
// Rich text editor
insertImage: 'Insert Image',
mentionImage: 'Mention Image',
noImageToMention: 'No images to mention',
// VM支付相关
vmCardInfo: 'Credit Card Information',
cardNumber: 'Card Number',
@ -175,5 +183,9 @@ export default {
country: 'Country',
countryPlaceholder: 'Select country',
countryRequired: 'Please select country',
submit: 'Submit'
videoGen: 'Video Generation',
uploadFirstImage: 'Upload Reference Image',
insertImage: 'Insert Image',
submit: 'Submit',
cancel: 'Cancel'
}

View File

@ -1,11 +1,12 @@
export default {
index: 'Home',
imageToImage: 'One-click undressing',
imageToImage: 'Image-to-Image 1',
imageToImage2: 'Image-to-Image2',
changeFace: 'Swap Face',
changeFaceVideo: 'Swap Video Face',
fastImage: 'Gen Image',
fastVideo: 'Gen Video',
videoGen: 'Video Generation',
recharge: 'Quick Recharge',
help: 'Help Center',
moneyInvite: 'Reward Invitation'

View File

@ -145,6 +145,14 @@ export default {
cardNoRequired: '請輸入銀行卡號',
cardNameRequired: '請輸入銀行卡姓名',
rechargeFailed: '充值失敗',
// 模型选择
selectModel: '選擇模型',
seedance20: 'Seedance 2.0',
seedance20Fast: 'Seedance 2.0 Fast',
// 富文本编辑器
insertImage: '插入圖片',
mentionImage: '引用圖片',
noImageToMention: '暫無可引用的圖片',
// VM支付相關
vmCardInfo: '信用卡信息',
cardNumber: '信用卡卡號',
@ -178,6 +186,9 @@ export default {
country: '國家',
countryPlaceholder: '請選擇國家',
countryRequired: '請選擇國家',
videoGen: '視頻生成',
uploadFirstImage: '上傳首圖',
insertImage: '插入圖片',
submit: '提交',
cancel: '取消'
}

View File

@ -6,6 +6,7 @@ export default {
changeFaceVideo: '視頻換臉',
fastImage: '快捷生圖',
fastVideo: '快捷生視頻',
videoGen: '視頻生成',
recharge: '快速充值',
help: '幫助中心',
moneyInvite: '有獎邀請'

View File

@ -29,11 +29,12 @@
:title="$t('common.moneyInvite')">
<Money />
</a-tab-pane>
<a-tab-pane
<!-- 隐藏快速充值入口 -->
<!-- <a-tab-pane
key="recharge"
:title="$t('common.rechargeRecord')">
<RechargeRecord />
</a-tab-pane>
</a-tab-pane> -->
<a-tab-pane
key="resume"
:title="$t('common.myProduct')">
@ -67,7 +68,6 @@ import { mapGetters } from 'vuex'
import i18n from '@/lang/i18n'
import Money from './Money.vue'
import UserAccount from './UserAccount.vue'
import RechargeRecord from './RechargeRecord.vue'
import ResumeRecord from './ResumeRecord.vue'
import RewardRecord from './RewardRecord.vue'
@ -93,7 +93,6 @@ export default {
Register,
Money,
UserAccount,
RechargeRecord,
ResumeRecord,
RewardRecord
},

View File

@ -9,9 +9,11 @@ import router from './router'
import '@/assets/styles/base.less'
import '@/assets/styles/quill.bubble.css'
import '@/assets/styles/quill.core.css'
import '@/assets/styles/quill.snow.css'
// Quill 样式 - 临时注释避免 source map 文件缺失导致的构建错误
// 如果后续需要使用 Quill 富文本编辑器,可取消注释
// import '@/assets/styles/quill.bubble.css'
// import '@/assets/styles/quill.core.css'
// import '@/assets/styles/quill.snow.css'
const app = createApp(App)
app.use(router)

View File

@ -69,49 +69,47 @@ export const constantRoutes = [{
permission: "pass",
icon: 'btn_tst'
}
},
// {
// path: 'image-to-image?type=2',
// name: 'image-to-image2',
// component: () => import('@/views/Image.vue'),
// meta: {
// title: 'imageToImage2',
// menuItem: true,
// permission: "pass",
// icon: 'btn_tst'
// }
// }, {
// path: 'change-face',
// name: 'change-face',
// component: () => import('@/views/ChangeFace.vue'),
// meta: {
// title: 'changeFace',
// menuItem: true,
// permission: "pass",
// icon: 'btn_yjhl'
// }
// }, {
// path: 'change-face-video',
// name: 'change-face-video',
// component: () => import('@/views/ChangeFace.vue'),
// meta: {
// title: 'changeFaceVideo',
// menuItem: true,
// permission: "pass",
// icon: 'btn_yjhl'
// }
// }, {
// path: 'fast-image',
// name: 'fast-image',
// component: () => import('@/views/FastImage.vue'),
// meta: {
// title: 'fastImage',
// menuItem: true,
// permission: "pass",
// icon: 'btn_kjst'
// }
// },
{
}, {
path: 'image-to-image?type=2',
name: 'image-to-image2',
component: () => import('@/views/Image.vue'),
meta: {
title: 'imageToImage2',
menuItem: true,
permission: "pass",
icon: 'btn_tst'
}
}, {
path: 'change-face',
name: 'change-face',
component: () => import('@/views/ChangeFace.vue'),
meta: {
title: 'changeFace',
menuItem: true,
permission: "pass",
icon: 'btn_yjhl'
}
}, {
path: 'change-face-video',
name: 'change-face-video',
component: () => import('@/views/ChangeFace.vue'),
meta: {
title: 'changeFaceVideo',
menuItem: true,
permission: "pass",
icon: 'btn_yjhl'
}
}, {
path: 'fast-image',
name: 'fast-image',
component: () => import('@/views/FastImage.vue'),
meta: {
title: 'fastImage',
menuItem: true,
permission: "pass",
icon: 'btn_kjst'
}
}, {
path: 'fast-video',
name: 'fast-video',
component: () => import('@/views/FastVideo.vue'),
@ -121,6 +119,16 @@ export const constantRoutes = [{
permission: "pass",
icon: 'btn_kjsp'
}
}, {
path: 'video-gen',
name: 'video-gen',
component: () => import('@/views/VideoGen.vue'),
meta: {
title: 'videoGen',
menuItem: true,
permission: "pass",
icon: 'btn_video'
}
}, {
path: 'recharge',
name: 'recharge',

View File

@ -81,11 +81,15 @@
</a-select>
</div>
<!-- <div class="text">
<a-textarea
v-model="text"
:placeholder="$t('common.textVideoPlaceholder')" />
</div> -->
<!-- 富文本编辑器 -->
<RichTextEditor
v-model="editorContent"
:placeholder="$t('common.textVideoPlaceholder') || '请输入文本生成视频...'"
:uploaded-images="uploadedImages"
@text-change="handleTextChange"
@image-upload="handleImageUpload"
/>
<mf-button
class="submit"
type="primary"
@ -188,6 +192,8 @@
<script>
import { mapGetters } from 'vuex'
import RichTextEditor from '@/components/RichTextEditor.vue'
export default {
data() {
return {
@ -195,6 +201,7 @@ export default {
firstUrl: '',
lastUrl: '',
text: '',
editorContent: '',
interval: null,
videoUrl: null,
videoLoading: false,
@ -221,9 +228,14 @@ export default {
{ label: 'Seedance 2.0', value: 'ep-20260326165811-dlkth' },
{ label: 'Seedance 2.0 Fast', value: 'ep-20260326170056-dkj9m' }
],
selectedModel: 'ep-20260326165811-dlkth'
selectedModel: 'ep-20260326165811-dlkth',
// @
uploadedImages: []
}
},
components: {
RichTextEditor
},
beforeUnmount() {
this.destroyInterval()
},
@ -335,8 +347,25 @@ export default {
// chineseContent englishContent
if (this.lang === 'zh_HK') {
return template.chineseContent || template.name || ''
}else{
return template.englishContent || template.name || ''
}
},
//
handleTextChange(content) {
this.editorContent = content
// text
this.text = content
},
// @
handleImageUpload(imageInfo) {
if (imageInfo && imageInfo.url) {
this.uploadedImages.push({
url: imageInfo.url,
name: imageInfo.name || 'image'
})
}
return template.englishContent || template.name || ''
},
//
handleConfirmTemplate() {
@ -496,7 +525,7 @@ export default {
this.generateLoading = true
let params = {
text: this.text,
text: this.editorContent || this.text,
firstUrl: firstImageUrl,
functionType: '21',
model: this.selectedModel //
@ -638,6 +667,59 @@ export default {
border-color: rgba(255,255,255,0.1);
}
}
/* 富文本编辑器样式 */
.rich-editor-root {
margin-bottom: 20px;
.toolbar {
display: flex;
gap: 8px;
margin-bottom: 12px;
padding: 8px;
background-color: #1a1b20;
border-radius: 6px;
border: 1px solid rgba(255,255,255,0.1);
.tool-btn {
padding: 6px 12px;
background-color: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.1);
color: #fff;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
&:hover {
background-color: rgba(255,255,255,0.1);
border-color: rgba(255,255,255,0.2);
}
}
}
.rich-editor {
min-height: 160px;
padding: 16px;
background-color: #1a1b20;
border: 1px solid rgba(255,255,255,0.1);
border-radius: 6px;
color: #fff;
font-size: 14px;
line-height: 1.6;
outline: none;
resize: none;
&:focus {
border-color: rgb(var(--primary-6));
}
&[data-placeholder]:empty::before {
content: attr(data-placeholder);
color: #5c5d68;
pointer-events: none;
}
}
}
&-title {
display: flex;
align-items: center;

View File

@ -74,13 +74,15 @@
</a-select>
</div>
<!-- <div
class="text"
v-if="current == 2">
<a-textarea
v-model="text"
:placeholder="$t('common.textPlaceholder')" />
</div> -->
<!-- 富文本编辑器 -->
<RichTextEditor
v-model="editorContent"
:placeholder="$t('common.textPlaceholder') || '请输入文本生成图片...'"
:uploaded-images="uploadedImages"
@text-change="handleTextChange"
@image-upload="handleImageUpload"
/>
<mf-button
class="submit"
type="primary"
@ -170,6 +172,7 @@
<script>
import { mapGetters } from 'vuex'
import RichTextEditor from '@/components/RichTextEditor.vue'
export default {
data() {
@ -198,9 +201,14 @@ export default {
{ label: 'Seedance 2.0', value: 'ep-20260326165811-dlkth' },
{ label: 'Seedance 2.0 Fast', value: 'ep-20260326170056-dkj9m' }
],
selectedModel: 'ep-20260326165811-dlkth'
selectedModel: 'ep-20260326165811-dlkth',
// @
uploadedImages: []
}
},
components: {
RichTextEditor
},
computed: {
...mapGetters(['lang']),
},
@ -352,6 +360,21 @@ export default {
this.templateDialogVisible = false
// selectedTemplate便
},
//
handleTextChange(content) {
this.editorContent = content
// text
this.text = content
},
// @
handleImageUpload(imageInfo) {
if (imageInfo && imageInfo.url) {
this.uploadedImages.push({
url: imageInfo.url,
name: imageInfo.name || 'image'
})
}
},
close() {
this.showResult = false
},
@ -415,7 +438,7 @@ export default {
url: 'api/ai/imgToImg',
method: 'POST',
data: {
text: this.text,
text: this.editorContent || this.text,
firstUrl: this.firstUrl.url,
functionType: this.current == 1 ? '11' : '12',
tags: tags.join(','),
@ -531,6 +554,59 @@ export default {
border-color: rgba(255,255,255,0.1);
}
}
/* 富文本编辑器样式 */
.rich-editor-root {
margin-bottom: 20px;
.toolbar {
display: flex;
gap: 8px;
margin-bottom: 12px;
padding: 8px;
background-color: #1a1b20;
border-radius: 6px;
border: 1px solid rgba(255,255,255,0.1);
.tool-btn {
padding: 6px 12px;
background-color: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.1);
color: #fff;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
&:hover {
background-color: rgba(255,255,255,0.1);
border-color: rgba(255,255,255,0.2);
}
}
}
.rich-editor {
min-height: 160px;
padding: 16px;
background-color: #1a1b20;
border: 1px solid rgba(255,255,255,0.1);
border-radius: 6px;
color: #fff;
font-size: 14px;
line-height: 1.6;
outline: none;
resize: none;
&:focus {
border-color: rgb(var(--primary-6));
}
&[data-placeholder]:empty::before {
content: attr(data-placeholder);
color: #5c5d68;
pointer-events: none;
}
}
}
&-title {
display: flex;
align-items: center;