浏览代码

Merge branch 'ctt_dev' into dev

dev
chutingting 1年前
父节点
当前提交
d117cdedcf
共有 8 个文件被更改,包括 91 次插入5 次删除
  1. +19
    -0
      src/apis/createVideo.js
  2. +6
    -1
      src/components/cutImg.vue
  3. +5
    -4
      src/layout/index.vue
  4. +40
    -0
      src/router/index.ts
  5. +2
    -0
      src/types/auto-imports.d.ts
  6. +7
    -0
      src/views/privatization/index.vue
  7. +6
    -0
      src/views/separation/index.vue
  8. +6
    -0
      src/views/voiceprint/index.vue

+ 19
- 0
src/apis/createVideo.js 查看文件

@@ -96,6 +96,25 @@ export function previewAudioApi(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 上传阿里云--裁剪后的个人背景图


+ 6
- 1
src/components/cutImg.vue 查看文件

@@ -63,7 +63,7 @@
// import { VueCropper } from "vue-cropper";
import { ElMessage } from "element-plus/es";
import { ref, reactive, watch } from "vue";
import { awsImgUpload, saveImgApi } from "../apis/createVideo";
import { awsImgUpload, saveImgApi, checkPhotoApi } from "../apis/createVideo";
import { useI18n } from "vue-i18n";

const { locale } = useI18n();
@@ -116,6 +116,11 @@ const cropperOverData = ref(null);
function sendImgData() {
cropper.value.getCropBlob(async (data) => {
try {
const checkPhotoRes = await checkPhotoApi(data)
if (checkPhotoRes.code !== 200) {
ElMessage.error(checkPhotoRes.message);
return
}
const res = await awsImgUpload(data);
const res2 = await saveImgApi({
type: props.type,


+ 5
- 4
src/layout/index.vue 查看文件

@@ -23,13 +23,13 @@
</div>
{{ $t("myCreating.title") }}
</div>
<div class="myRouter-item" @click="toUserModel">
<div class="myRouter-item" @click="router.push('/separation')">
<div class="icon">
<el-icon><i-ep-user /></el-icon>
</div>
{{ $t("userModel.title") }}
</div>
<div class="myRouter-item" @click="showTalkUsDialog = true">
<div class="myRouter-item" @click="router.push('/voiceprint')">
<div class="icon">
<el-icon><i-ep-phone /></el-icon>
</div>
@@ -63,7 +63,7 @@
</template>
<el-menu-item-group>
<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-sub-menu>
<el-sub-menu index="2">
@@ -221,7 +221,8 @@ const updateShowTalkUsDialog = (newValue: any) => {

//#region 页面跳转
function toUserModel() {
router.push("/userModel");
// router.push("/userModel");
window.location.href = '/priMakeHtml/dingzhifenshen/index.shtml'
showTalkUsDialog.value = true;
}
//#endregion ------------------------------------


+ 40
- 0
src/router/index.ts 查看文件

@@ -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
- 0
src/types/auto-imports.d.ts 查看文件

@@ -2,6 +2,7 @@
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
const ElForm: typeof import('element-plus/es')['ElForm']
const ElMessage: typeof import('element-plus/es')['ElMessage']
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
@@ -270,6 +271,7 @@ import { UnwrapRef } from 'vue'
declare module 'vue' {
interface ComponentCustomProperties {
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 ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>


+ 7
- 0
src/views/privatization/index.vue 查看文件

@@ -0,0 +1,7 @@

<!--
* @Description: 定制分身
-->
<template>
<iframe src="https://mtest.metavatar.cc/priMakeHtml/siyouhuabushu/index.shtml" style="width: 100%;height:86vh"></iframe>
</template>

+ 6
- 0
src/views/separation/index.vue 查看文件

@@ -0,0 +1,6 @@
<!--
* @Description: 定制声纹
-->
<template>
<iframe src="https://mtest.metavatar.cc/priMakeHtml/dingzhishengwen/index.shtml" style="width: 100%;height:86vh"></iframe>
</template>

+ 6
- 0
src/views/voiceprint/index.vue 查看文件

@@ -0,0 +1,6 @@
<!--
* @Description: 定制分身
-->
<template>
<iframe src="https://mtest.metavatar.cc/priMakeHtml/dingzhifenshen/index.shtml" style="width: 100%;height:86vh"></iframe>
</template>

正在加载...
取消
保存