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$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" /> <excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" /> <excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/python" />
<excludePattern pattern="*.zip" />
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <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 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 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', cardNoRequired: 'Please enter card number',
cardNameRequired: 'Please enter cardholder name', cardNameRequired: 'Please enter cardholder name',
rechargeFailed: 'Recharge failed', 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支付相关 // VM支付相关
vmCardInfo: 'Credit Card Information', vmCardInfo: 'Credit Card Information',
cardNumber: 'Card Number', cardNumber: 'Card Number',
@ -175,5 +183,9 @@ export default {
country: 'Country', country: 'Country',
countryPlaceholder: 'Select country', countryPlaceholder: 'Select country',
countryRequired: 'Please 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 { export default {
index: 'Home', index: 'Home',
imageToImage: 'One-click undressing', imageToImage: 'Image-to-Image 1',
imageToImage2: 'Image-to-Image2', imageToImage2: 'Image-to-Image2',
changeFace: 'Swap Face', changeFace: 'Swap Face',
changeFaceVideo: 'Swap Video Face', changeFaceVideo: 'Swap Video Face',
fastImage: 'Gen Image', fastImage: 'Gen Image',
fastVideo: 'Gen Video', fastVideo: 'Gen Video',
videoGen: 'Video Generation',
recharge: 'Quick Recharge', recharge: 'Quick Recharge',
help: 'Help Center', help: 'Help Center',
moneyInvite: 'Reward Invitation' moneyInvite: 'Reward Invitation'

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -81,11 +81,15 @@
</a-select> </a-select>
</div> </div>
<!-- <div class="text"> <!-- 富文本编辑器 -->
<a-textarea <RichTextEditor
v-model="text" v-model="editorContent"
:placeholder="$t('common.textVideoPlaceholder')" /> :placeholder="$t('common.textVideoPlaceholder') || '请输入文本生成视频...'"
</div> --> :uploaded-images="uploadedImages"
@text-change="handleTextChange"
@image-upload="handleImageUpload"
/>
<mf-button <mf-button
class="submit" class="submit"
type="primary" type="primary"
@ -188,6 +192,8 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import RichTextEditor from '@/components/RichTextEditor.vue'
export default { export default {
data() { data() {
return { return {
@ -195,6 +201,7 @@ export default {
firstUrl: '', firstUrl: '',
lastUrl: '', lastUrl: '',
text: '', text: '',
editorContent: '',
interval: null, interval: null,
videoUrl: null, videoUrl: null,
videoLoading: false, videoLoading: false,
@ -221,9 +228,14 @@ export default {
{ label: 'Seedance 2.0', value: 'ep-20260326165811-dlkth' }, { label: 'Seedance 2.0', value: 'ep-20260326165811-dlkth' },
{ label: 'Seedance 2.0 Fast', value: 'ep-20260326170056-dkj9m' } { label: 'Seedance 2.0 Fast', value: 'ep-20260326170056-dkj9m' }
], ],
selectedModel: 'ep-20260326165811-dlkth' selectedModel: 'ep-20260326165811-dlkth',
// @
uploadedImages: []
} }
}, },
components: {
RichTextEditor
},
beforeUnmount() { beforeUnmount() {
this.destroyInterval() this.destroyInterval()
}, },
@ -335,8 +347,25 @@ export default {
// chineseContent englishContent // chineseContent englishContent
if (this.lang === 'zh_HK') { if (this.lang === 'zh_HK') {
return template.chineseContent || template.name || '' 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() { handleConfirmTemplate() {
@ -496,7 +525,7 @@ export default {
this.generateLoading = true this.generateLoading = true
let params = { let params = {
text: this.text, text: this.editorContent || this.text,
firstUrl: firstImageUrl, firstUrl: firstImageUrl,
functionType: '21', functionType: '21',
model: this.selectedModel // model: this.selectedModel //
@ -638,6 +667,59 @@ export default {
border-color: rgba(255,255,255,0.1); 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 { &-title {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -74,13 +74,15 @@
</a-select> </a-select>
</div> </div>
<!-- <div <!-- 富文本编辑器 -->
class="text" <RichTextEditor
v-if="current == 2"> v-model="editorContent"
<a-textarea :placeholder="$t('common.textPlaceholder') || '请输入文本生成图片...'"
v-model="text" :uploaded-images="uploadedImages"
:placeholder="$t('common.textPlaceholder')" /> @text-change="handleTextChange"
</div> --> @image-upload="handleImageUpload"
/>
<mf-button <mf-button
class="submit" class="submit"
type="primary" type="primary"
@ -170,6 +172,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import RichTextEditor from '@/components/RichTextEditor.vue'
export default { export default {
data() { data() {
@ -198,9 +201,14 @@ export default {
{ label: 'Seedance 2.0', value: 'ep-20260326165811-dlkth' }, { label: 'Seedance 2.0', value: 'ep-20260326165811-dlkth' },
{ label: 'Seedance 2.0 Fast', value: 'ep-20260326170056-dkj9m' } { label: 'Seedance 2.0 Fast', value: 'ep-20260326170056-dkj9m' }
], ],
selectedModel: 'ep-20260326165811-dlkth' selectedModel: 'ep-20260326165811-dlkth',
// @
uploadedImages: []
} }
}, },
components: {
RichTextEditor
},
computed: { computed: {
...mapGetters(['lang']), ...mapGetters(['lang']),
}, },
@ -352,6 +360,21 @@ export default {
this.templateDialogVisible = false this.templateDialogVisible = false
// selectedTemplate便 // 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() { close() {
this.showResult = false this.showResult = false
}, },
@ -415,7 +438,7 @@ export default {
url: 'api/ai/imgToImg', url: 'api/ai/imgToImg',
method: 'POST', method: 'POST',
data: { data: {
text: this.text, text: this.editorContent || this.text,
firstUrl: this.firstUrl.url, firstUrl: this.firstUrl.url,
functionType: this.current == 1 ? '11' : '12', functionType: this.current == 1 ? '11' : '12',
tags: tags.join(','), tags: tags.join(','),
@ -531,6 +554,59 @@ export default {
border-color: rgba(255,255,255,0.1); 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 { &-title {
display: flex; display: flex;
align-items: center; align-items: center;