瀏覽代碼

还差个声音回显

dev_YWQ
congzc 1 年之前
父節點
當前提交
469563c45c
共有 4 個檔案被更改,包括 39 行新增4 行删除
  1. +2
    -1
      .env.test
  2. +25
    -1
      src/components/cutImg.vue
  3. +1
    -0
      src/types/components.d.ts
  4. +11
    -2
      src/views/createVideo/index.vue

+ 2
- 1
.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'

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

@@ -13,6 +13,8 @@
</el-upload>
<!-- 弹框 -->
<el-dialog
append-to-body="true"
destroy-on-close="true"
get-container="#app"
v-model="dialogVisible"
title="Tips"
@@ -60,7 +62,7 @@
// import "vue-cropper/dist/index.css";
// import { VueCropper } from "vue-cropper";
import { ElMessage } from "element-plus/es";
import { ref, reactive } from "vue";
import { ref, reactive, watch } from "vue";
import { awsImgUpload, saveImgApi } from "../apis/createVideo";
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 ------------------------
</script>



+ 1
- 0
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']


+ 11
- 2
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();
}
});
</script>
@@ -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;


Loading…
取消
儲存