From 469563c45cd98fc9522ddd2dc2254df7b6bdc789 Mon Sep 17 00:00:00 2001 From: congzc Date: Thu, 27 Jul 2023 18:05:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=B7=AE=E4=B8=AA=E5=A3=B0=E9=9F=B3?= =?UTF-8?q?=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.test | 3 ++- src/components/cutImg.vue | 26 +++++++++++++++++++++++++- src/types/components.d.ts | 1 + src/views/createVideo/index.vue | 13 +++++++++++-- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/.env.test b/.env.test index ce525c5..d7924d5 100644 --- a/.env.test +++ b/.env.test @@ -5,4 +5,5 @@ NODE_ENV='test' VITE_APP_TITLE = 'Metavatar-PC' VITE_APP_PORT = 3000 -VITE_APP_BASE_API = 'https://photo.metavatar.cc/C' +# VITE_APP_BASE_API = 'https://photo.metavatar.cc/C' +VITE_APP_BASE_API = 'https://mtest.metavatar.cc/C' diff --git a/src/components/cutImg.vue b/src/components/cutImg.vue index ac6a5d3..bbb3ee1 100644 --- a/src/components/cutImg.vue +++ b/src/components/cutImg.vue @@ -13,6 +13,8 @@ props.videoType, + (newValue, oldValue) => { + if (props.type == 4 && props.videoType == 1) { + option.autoCropWidth = 1080 + "px"; // 默认生成截图框宽度 + option.autoCropHeight = 1920 + "px"; // 默认生成截图框高度 + option.fixed = true; + option.fixedNumber = [1080, 1920]; + } + if (props.type == 4 && props.videoType == 2) { + option.autoCropWidth = 1920 + "px"; // 默认生成截图框宽度 + option.autoCropHeight = 1080 + "px"; // 默认生成截图框高度 + option.fixed = true; + option.fixedNumber = [1920, 1080]; + } + }, + { deep: true } +); + //#endregion ------------------------ diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 1bbac71..a7c1bca 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -8,6 +8,7 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default'] + copy: typeof import('./../components/EditPosition copy.vue')['default'] CutImg: typeof import('./../components/cutImg.vue')['default'] CutImg1: typeof import('./../components/cutImg1.vue')['default'] EditPosition: typeof import('./../components/EditPosition.vue')['default'] diff --git a/src/views/createVideo/index.vue b/src/views/createVideo/index.vue index 73edc21..607812d 100644 --- a/src/views/createVideo/index.vue +++ b/src/views/createVideo/index.vue @@ -1204,7 +1204,7 @@ async function createVideo() { } //#endregion ---------------------------- -//#region +//#region 草稿回显 async function getModelDetailById() { const res = await getModelDetailByIdApi(route.query.id); workId.value = res.data.id; @@ -1212,12 +1212,17 @@ async function getModelDetailById() { title.value = res.data.title; //标题 textareaContent.value = res.data.paperwork; //语音内容 materialList.BGI.id = res.data.backgroundId + ""; //背景id + // language.value = res.data.voiceMouldId; + // sound.value = res.data.voiceMouldId; + // soundStyle.value = JSON.parse(res.data.voiceMouldSm).speakTypeStr; materialList.BGI.material = JSON.parse(res.data.backgroundSm).material; materialList.virtual = JSON.parse(res.data.personJson); materialList.virtual.id = res.data.personMouldId; //数字人id materialList.scList = res.data.materialAllJson ? JSON.parse(res.data.materialAllJson) : []; + console.log(sound.value); + console.log(); } //#endregion ---------------------------- @@ -1248,7 +1253,7 @@ onMounted(async () => { } getSystemSCIList(); if (route.query.id) { - // getModelDetailById(); + getModelDetailById(); } }); @@ -1423,6 +1428,8 @@ onMounted(async () => { transform: translate(-50%, -50%); height: 768px; width: 432px; + border-radius: 20px; + overflow: hidden; } .EditPositionBox2 { position: absolute; @@ -1431,6 +1438,8 @@ onMounted(async () => { transform: translate(-50%, -50%); height: 432px; width: 768px; + border-radius: 20px; + overflow: hidden; } .showImgInfoBox { position: absolute;