@@ -6,5 +6,6 @@ NODE_ENV='development' | |||
VITE_APP_TITLE = 'Metavatar-PC' | |||
VITE_APP_PORT = 3000 | |||
## VITE_APP_BASE_API = 'https://photo.metavatar.cc/C' | |||
VITE_APP_BASE_API = 'https://test.metavatar.cc/C' | |||
# VITE_APP_BASE_API = 'https://test.metavatar.cc/C' | |||
VITE_APP_BASE_API = 'https://phototest.metavatar.cc/C' | |||
@@ -188,3 +188,16 @@ export function getModelDetailByIdApi(id) { | |||
method: 'get' | |||
}) | |||
} | |||
/** | |||
* @description:文字判断语种 | |||
* @param {number} id | |||
* @return data | |||
*/ | |||
export function getLanguageApi(data) { | |||
return request({ | |||
url: `/api/VoiceLanguage/getLanguage`, | |||
method: 'POST', | |||
data | |||
}) | |||
} |
@@ -2,6 +2,8 @@ | |||
export {} | |||
declare global { | |||
const EffectScope: typeof import('vue')['EffectScope'] | |||
const ElMessage: typeof import('element-plus/es')['ElMessage'] | |||
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] | |||
const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] | |||
const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] | |||
const computed: typeof import('vue')['computed'] | |||
@@ -268,6 +270,8 @@ import { UnwrapRef } from 'vue' | |||
declare module 'vue' { | |||
interface ComponentCustomProperties { | |||
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> | |||
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']> | |||
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']> | |||
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']> | |||
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']> | |||
readonly computed: UnwrapRef<typeof import('vue')['computed']> | |||
@@ -18,10 +18,13 @@ declare module '@vue/runtime-core' { | |||
ElDropdown: typeof import('element-plus/es')['ElDropdown'] | |||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] | |||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] | |||
ElForm: typeof import('element-plus/es')['ElForm'] | |||
ElFormItem: typeof import('element-plus/es')['ElFormItem'] | |||
ElIcon: typeof import('element-plus/es')['ElIcon'] | |||
ElInput: typeof import('element-plus/es')['ElInput'] | |||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] | |||
ElOption: typeof import('element-plus/es')['ElOption'] | |||
ElPagination: typeof import('element-plus/es')['ElPagination'] | |||
ElSelect: typeof import('element-plus/es')['ElSelect'] | |||
ElSwitch: typeof import('element-plus/es')['ElSwitch'] | |||
ElTooltip: typeof import('element-plus/es')['ElTooltip'] | |||
@@ -29,12 +32,18 @@ declare module '@vue/runtime-core' { | |||
GithubCorner: typeof import('./../components/GithubCorner/index.vue')['default'] | |||
Hamburger: typeof import('./../components/Hamburger/index.vue')['default'] | |||
IconSelect: typeof import('./../components/IconSelect/index.vue')['default'] | |||
IEpCloseBold: typeof import('~icons/ep/close-bold')['default'] | |||
IEpDelete: typeof import('~icons/ep/delete')['default'] | |||
IEpDocumentAdd: typeof import('~icons/ep/document-add')['default'] | |||
IEpDownload: typeof import('~icons/ep/download')['default'] | |||
IEpEdit: typeof import('~icons/ep/edit')['default'] | |||
IEpGoods: typeof import('~icons/ep/goods')['default'] | |||
IEpLoading: typeof import('~icons/ep/loading')['default'] | |||
IEpMenu: typeof import('~icons/ep/menu')['default'] | |||
IEpPhone: typeof import('~icons/ep/phone')['default'] | |||
IEpSearch: typeof import('~icons/ep/search')['default'] | |||
IEpUser: typeof import('~icons/ep/user')['default'] | |||
IEpVideoPlay: typeof import('~icons/ep/video-play')['default'] | |||
LangSelect: typeof import('./../components/LangSelect/index.vue')['default'] | |||
MultiUpload: typeof import('./../components/Upload/MultiUpload.vue')['default'] | |||
MyLoading: typeof import('./../components/myLoading.vue')['default'] | |||
@@ -218,7 +218,7 @@ | |||
> | |||
< | |||
</div> | |||
<!-- tab栏 --> | |||
<!-- tab栏 性别--> | |||
<p>{{ $t("createVideo.sex") }}</p> | |||
<div class="tab" v-show="showChooseModel"> | |||
<div | |||
@@ -243,6 +243,7 @@ | |||
{{ $t("createVideo.female") }} | |||
</div> | |||
</div> | |||
<!-- 横屏竖屏 --> | |||
<p>{{ $t("createVideo.videoRatio") }}</p> | |||
<div class="tab" v-show="showChooseModel"> | |||
<div | |||
@@ -267,6 +268,17 @@ | |||
{{ $t("createVideo.portrait") }} | |||
</div> | |||
</div> | |||
<!-- 风格模版 --> | |||
<!-- <p>{{ $t("createVideo.videoRatio") }}</p> | |||
<div class="tab" v-show="showChooseModel"> | |||
<div | |||
class="tabItem" | |||
:class="modelTabItemActive3 == -1 ? 'tabItemActive' : ''" | |||
@click="changeModelStyle(-1)" | |||
> | |||
{{ $t("createVideo.all") }} | |||
</div> | |||
</div> --> | |||
<!-- 模版列表 --> | |||
<div | |||
class="modeListBox" | |||
@@ -460,6 +472,7 @@ | |||
v-model="language" | |||
:placeholder="$t('createVideo.select')" | |||
style="width: 100%" | |||
filterable | |||
> | |||
<el-option | |||
v-for="item in languageOptions" | |||
@@ -746,6 +759,7 @@ import { | |||
saveOrUpdateApi, | |||
createVideoApi, | |||
getModelDetailByIdApi, | |||
getLanguageApi, | |||
} from "@/apis/createVideo"; | |||
import { useI18n } from "vue-i18n"; | |||
import Recorder from "js-audio-recorder"; //mp3插件 | |||
@@ -824,6 +838,13 @@ function changeTabVideoType(index) { | |||
tabVideoType.value | |||
); | |||
} | |||
// 模版风格tab | |||
const modelStyleTabList = ref([]); | |||
const modelTabItemActive3 = ref(-1); //模版风格tab栏 比例 | |||
function changeModelStyle(index) { | |||
modelTabItemActive3.value = index; | |||
} | |||
// watch(tabSex, (newVal, oldVal) => { | |||
// if (newVal == 0) { | |||
// getModeList("", modelPageNum.value, modelPageSize.value); | |||
@@ -869,7 +890,7 @@ const title = | |||
const textareaContent = ref(""); | |||
function insertIcon() { | |||
const textarea = document.getElementById("textInputId"); | |||
const icon = "🕗"; // 这里使用了一个星星作为示例图标,你可以替换为你自己的图标 | |||
const icon = "🕗"; | |||
// 获取光标位置 | |||
const startPos = textarea.selectionStart; | |||
const endPos = textarea.selectionEnd; | |||
@@ -887,6 +908,31 @@ function insertIcon() { | |||
const language = ref(""); //选择的语言 | |||
const sound = ref(""); // 选择的声音 | |||
const soundStyle = ref(""); //选择的风格 | |||
// 输入文字判断语种 | |||
const getLanguageTimeOut = ref(false); //定时器 | |||
watch( | |||
() => textareaContent.value, | |||
() => { | |||
clearTimeout(getLanguageTimeOut.value); | |||
getLanguageTimeOut.value = setTimeout(async () => { | |||
try { | |||
const data = { | |||
paperwork: textareaContent.value, | |||
}; | |||
const res = await getLanguageApi(data); | |||
if (res.code == 200) { | |||
language.value = res.data.id; | |||
} | |||
} catch (error) {} | |||
}, 1500); | |||
} | |||
); | |||
watch( | |||
() => language.value, | |||
() => { | |||
chooseType(); | |||
} | |||
); | |||
// 语言下拉框内容 | |||
const languageOptions = ref([]); | |||
async function voiceTotal() { | |||
@@ -481,6 +481,7 @@ const checkVideoStatus = async () => { | |||
// 如果列表中没有生成中的视频,不发送请求 | |||
const intervalId = setInterval(async () => { | |||
// && notGenerateList2.value.length == 0; | |||
console.log(""); | |||
if (notGenerateList.value.length == 0) { | |||
return; | |||
} | |||
@@ -509,7 +510,7 @@ onMounted(() => { | |||
isLoading.value = true; | |||
getPhotoVideoList(pageNum.value, pageSize.value, title.value); | |||
// checkVideoStatus(); | |||
checkVideoStatus(); | |||
}); | |||
//#endregion --------------------------- | |||
</script> | |||