| @@ -96,6 +96,25 @@ export function previewAudioApi(gen_txt, voice_id, voice_style) { | |||||
| data: { gen_txt, voice_id, voice_style } | data: { gen_txt, voice_id, voice_style } | ||||
| }) | }) | ||||
| } | } | ||||
| /** | |||||
| * @description 图片检测接口 | |||||
| * @params id | |||||
| * @returns data | |||||
| */ | |||||
| export function checkPhotoApi(data) { | |||||
| const timestamp = Date.now(); | |||||
| const formData = new FormData(); | |||||
| formData.append('file', data, timestamp + ".png"); | |||||
| return request({ | |||||
| url: '/api/baidu/checkPhoto', | |||||
| method: 'post', | |||||
| data: formData, | |||||
| headers: { | |||||
| 'Content-Type': 'application/form-data', | |||||
| "Access-Control-Allow-Credentials": true, | |||||
| } | |||||
| }); | |||||
| } | |||||
| /** | /** | ||||
| * @description 上传阿里云--裁剪后的个人背景图 | * @description 上传阿里云--裁剪后的个人背景图 | ||||
| @@ -63,7 +63,7 @@ | |||||
| // import { VueCropper } from "vue-cropper"; | // import { VueCropper } from "vue-cropper"; | ||||
| import { ElMessage } from "element-plus/es"; | import { ElMessage } from "element-plus/es"; | ||||
| import { ref, reactive, watch } from "vue"; | import { ref, reactive, watch } from "vue"; | ||||
| import { awsImgUpload, saveImgApi } from "../apis/createVideo"; | |||||
| import { awsImgUpload, saveImgApi, checkPhotoApi } from "../apis/createVideo"; | |||||
| import { useI18n } from "vue-i18n"; | import { useI18n } from "vue-i18n"; | ||||
| const { locale } = useI18n(); | const { locale } = useI18n(); | ||||
| @@ -116,6 +116,11 @@ const cropperOverData = ref(null); | |||||
| function sendImgData() { | function sendImgData() { | ||||
| cropper.value.getCropBlob(async (data) => { | cropper.value.getCropBlob(async (data) => { | ||||
| try { | try { | ||||
| const checkPhotoRes = await checkPhotoApi(data) | |||||
| if (checkPhotoRes.code !== 200) { | |||||
| ElMessage.error(checkPhotoRes.message); | |||||
| return | |||||
| } | |||||
| const res = await awsImgUpload(data); | const res = await awsImgUpload(data); | ||||
| const res2 = await saveImgApi({ | const res2 = await saveImgApi({ | ||||
| type: props.type, | type: props.type, | ||||
| @@ -23,13 +23,13 @@ | |||||
| </div> | </div> | ||||
| {{ $t("myCreating.title") }} | {{ $t("myCreating.title") }} | ||||
| </div> | </div> | ||||
| <div class="myRouter-item" @click="toUserModel"> | |||||
| <div class="myRouter-item" @click="router.push('/separation')"> | |||||
| <div class="icon"> | <div class="icon"> | ||||
| <el-icon><i-ep-user /></el-icon> | <el-icon><i-ep-user /></el-icon> | ||||
| </div> | </div> | ||||
| {{ $t("userModel.title") }} | {{ $t("userModel.title") }} | ||||
| </div> | </div> | ||||
| <div class="myRouter-item" @click="showTalkUsDialog = true"> | |||||
| <div class="myRouter-item" @click="router.push('/voiceprint')"> | |||||
| <div class="icon"> | <div class="icon"> | ||||
| <el-icon><i-ep-phone /></el-icon> | <el-icon><i-ep-phone /></el-icon> | ||||
| </div> | </div> | ||||
| @@ -63,7 +63,7 @@ | |||||
| </template> | </template> | ||||
| <el-menu-item-group> | <el-menu-item-group> | ||||
| <el-menu-item index="1-1">{{ $t("cooperate.api.title") }}</el-menu-item> | <el-menu-item index="1-1">{{ $t("cooperate.api.title") }}</el-menu-item> | ||||
| <el-menu-item index="1-2">{{ $t("cooperate.privatization.title") }} </el-menu-item> | |||||
| <el-menu-item index="1-2" @click="router.push('/privatization')">{{ $t("cooperate.privatization.title") }} </el-menu-item> | |||||
| </el-menu-item-group> | </el-menu-item-group> | ||||
| </el-sub-menu> | </el-sub-menu> | ||||
| <el-sub-menu index="2"> | <el-sub-menu index="2"> | ||||
| @@ -221,7 +221,8 @@ const updateShowTalkUsDialog = (newValue: any) => { | |||||
| //#region 页面跳转 | //#region 页面跳转 | ||||
| function toUserModel() { | function toUserModel() { | ||||
| router.push("/userModel"); | |||||
| // router.push("/userModel"); | |||||
| window.location.href = '/priMakeHtml/dingzhifenshen/index.shtml' | |||||
| showTalkUsDialog.value = true; | showTalkUsDialog.value = true; | ||||
| } | } | ||||
| //#endregion ------------------------------------ | //#endregion ------------------------------------ | ||||
| @@ -172,6 +172,46 @@ export const constantRoutes: RouteRecordRaw[] = [ | |||||
| }, | }, | ||||
| ], | ], | ||||
| }, | }, | ||||
| { | |||||
| path: "/", | |||||
| component: Layout, | |||||
| redirect: "/separation", | |||||
| children: [ | |||||
| { | |||||
| path: "/separation", | |||||
| component: () => import("@/views/separation/index.vue"), | |||||
| name: "separation", | |||||
| meta: { | |||||
| title: "separation", | |||||
| icon: "homepage", | |||||
| affix: true, | |||||
| name: "separation.title", | |||||
| }, | |||||
| }, | |||||
| { | |||||
| path: "/voiceprint", | |||||
| component: () => import("@/views/voiceprint/index.vue"), | |||||
| name: "voiceprint", | |||||
| meta: { | |||||
| title: "voiceprint", | |||||
| icon: "homepage", | |||||
| affix: true, | |||||
| name: "separation.title", | |||||
| }, | |||||
| }, | |||||
| { | |||||
| path: "/privatization", | |||||
| component: () => import("@/views/privatization/index.vue"), | |||||
| name: "privatization", | |||||
| meta: { | |||||
| title: "privatization", | |||||
| icon: "homepage", | |||||
| affix: true, | |||||
| name: "separation.title", | |||||
| }, | |||||
| }, | |||||
| ], | |||||
| }, | |||||
| ]; | ]; | ||||
| @@ -2,6 +2,7 @@ | |||||
| export {} | export {} | ||||
| declare global { | declare global { | ||||
| const EffectScope: typeof import('vue')['EffectScope'] | const EffectScope: typeof import('vue')['EffectScope'] | ||||
| const ElForm: typeof import('element-plus/es')['ElForm'] | |||||
| const ElMessage: typeof import('element-plus/es')['ElMessage'] | const ElMessage: typeof import('element-plus/es')['ElMessage'] | ||||
| const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] | const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] | ||||
| const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] | const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] | ||||
| @@ -270,6 +271,7 @@ import { UnwrapRef } from 'vue' | |||||
| declare module 'vue' { | declare module 'vue' { | ||||
| interface ComponentCustomProperties { | interface ComponentCustomProperties { | ||||
| readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> | readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> | ||||
| readonly ElForm: UnwrapRef<typeof import('element-plus/es')['ElForm']> | |||||
| readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']> | readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']> | ||||
| readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']> | readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']> | ||||
| readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']> | readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']> | ||||
| @@ -0,0 +1,7 @@ | |||||
| <!-- | |||||
| * @Description: 定制分身 | |||||
| --> | |||||
| <template> | |||||
| <iframe src="https://mtest.metavatar.cc/priMakeHtml/siyouhuabushu/index.shtml" style="width: 100%;height:86vh"></iframe> | |||||
| </template> | |||||
| @@ -0,0 +1,6 @@ | |||||
| <!-- | |||||
| * @Description: 定制声纹 | |||||
| --> | |||||
| <template> | |||||
| <iframe src="https://mtest.metavatar.cc/priMakeHtml/dingzhishengwen/index.shtml" style="width: 100%;height:86vh"></iframe> | |||||
| </template> | |||||
| @@ -0,0 +1,6 @@ | |||||
| <!-- | |||||
| * @Description: 定制分身 | |||||
| --> | |||||
| <template> | |||||
| <iframe src="https://mtest.metavatar.cc/priMakeHtml/dingzhifenshen/index.shtml" style="width: 100%;height:86vh"></iframe> | |||||
| </template> | |||||