@@ -5,4 +5,5 @@ NODE_ENV='test' | |||||
VITE_APP_TITLE = 'Metavatar-PC' | VITE_APP_TITLE = 'Metavatar-PC' | ||||
VITE_APP_PORT = 3000 | 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' |
@@ -13,6 +13,8 @@ | |||||
</el-upload> | </el-upload> | ||||
<!-- 弹框 --> | <!-- 弹框 --> | ||||
<el-dialog | <el-dialog | ||||
append-to-body="true" | |||||
destroy-on-close="true" | |||||
get-container="#app" | get-container="#app" | ||||
v-model="dialogVisible" | v-model="dialogVisible" | ||||
title="Tips" | title="Tips" | ||||
@@ -60,7 +62,7 @@ | |||||
// import "vue-cropper/dist/index.css"; | // import "vue-cropper/dist/index.css"; | ||||
// 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 } from "vue"; | |||||
import { ref, reactive, watch } from "vue"; | |||||
import { awsImgUpload, saveImgApi } from "../apis/createVideo"; | import { awsImgUpload, saveImgApi } from "../apis/createVideo"; | ||||
import { useI18n } from "vue-i18n"; | import { useI18n } from "vue-i18n"; | ||||
@@ -138,6 +140,28 @@ function sendImgData() { | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
//#endregion ------------------------ | |||||
//#region | |||||
watch( | |||||
() => 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 ------------------------ | //#endregion ------------------------ | ||||
</script> | </script> | ||||
@@ -8,6 +8,7 @@ export {} | |||||
declare module '@vue/runtime-core' { | declare module '@vue/runtime-core' { | ||||
export interface GlobalComponents { | export interface GlobalComponents { | ||||
Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default'] | Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default'] | ||||
copy: typeof import('./../components/EditPosition copy.vue')['default'] | |||||
CutImg: typeof import('./../components/cutImg.vue')['default'] | CutImg: typeof import('./../components/cutImg.vue')['default'] | ||||
CutImg1: typeof import('./../components/cutImg1.vue')['default'] | CutImg1: typeof import('./../components/cutImg1.vue')['default'] | ||||
EditPosition: typeof import('./../components/EditPosition.vue')['default'] | EditPosition: typeof import('./../components/EditPosition.vue')['default'] | ||||
@@ -1204,7 +1204,7 @@ async function createVideo() { | |||||
} | } | ||||
//#endregion ---------------------------- | //#endregion ---------------------------- | ||||
//#region | |||||
//#region 草稿回显 | |||||
async function getModelDetailById() { | async function getModelDetailById() { | ||||
const res = await getModelDetailByIdApi(route.query.id); | const res = await getModelDetailByIdApi(route.query.id); | ||||
workId.value = res.data.id; | workId.value = res.data.id; | ||||
@@ -1212,12 +1212,17 @@ async function getModelDetailById() { | |||||
title.value = res.data.title; //标题 | title.value = res.data.title; //标题 | ||||
textareaContent.value = res.data.paperwork; //语音内容 | textareaContent.value = res.data.paperwork; //语音内容 | ||||
materialList.BGI.id = res.data.backgroundId + ""; //背景id | 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.BGI.material = JSON.parse(res.data.backgroundSm).material; | ||||
materialList.virtual = JSON.parse(res.data.personJson); | materialList.virtual = JSON.parse(res.data.personJson); | ||||
materialList.virtual.id = res.data.personMouldId; //数字人id | materialList.virtual.id = res.data.personMouldId; //数字人id | ||||
materialList.scList = res.data.materialAllJson | materialList.scList = res.data.materialAllJson | ||||
? JSON.parse(res.data.materialAllJson) | ? JSON.parse(res.data.materialAllJson) | ||||
: []; | : []; | ||||
console.log(sound.value); | |||||
console.log(); | |||||
} | } | ||||
//#endregion ---------------------------- | //#endregion ---------------------------- | ||||
@@ -1248,7 +1253,7 @@ onMounted(async () => { | |||||
} | } | ||||
getSystemSCIList(); | getSystemSCIList(); | ||||
if (route.query.id) { | if (route.query.id) { | ||||
// getModelDetailById(); | |||||
getModelDetailById(); | |||||
} | } | ||||
}); | }); | ||||
</script> | </script> | ||||
@@ -1423,6 +1428,8 @@ onMounted(async () => { | |||||
transform: translate(-50%, -50%); | transform: translate(-50%, -50%); | ||||
height: 768px; | height: 768px; | ||||
width: 432px; | width: 432px; | ||||
border-radius: 20px; | |||||
overflow: hidden; | |||||
} | } | ||||
.EditPositionBox2 { | .EditPositionBox2 { | ||||
position: absolute; | position: absolute; | ||||
@@ -1431,6 +1438,8 @@ onMounted(async () => { | |||||
transform: translate(-50%, -50%); | transform: translate(-50%, -50%); | ||||
height: 432px; | height: 432px; | ||||
width: 768px; | width: 768px; | ||||
border-radius: 20px; | |||||
overflow: hidden; | |||||
} | } | ||||
.showImgInfoBox { | .showImgInfoBox { | ||||
position: absolute; | position: absolute; | ||||