diff --git a/src/apis/createVideo.js b/src/apis/createVideo.js
index d98a5ac..3ee2a7b 100644
--- a/src/apis/createVideo.js
+++ b/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 上传阿里云--裁剪后的个人背景图
diff --git a/src/components/cutImg.vue b/src/components/cutImg.vue
index bbb3ee1..017f163 100644
--- a/src/components/cutImg.vue
+++ b/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,
diff --git a/src/layout/index.vue b/src/layout/index.vue
index 210d256..6801b72 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -23,13 +23,13 @@
{{ $t("myCreating.title") }}
-
+
{{ $t("userModel.title") }}
-
+
@@ -63,7 +63,7 @@
{{ $t("cooperate.api.title") }}
- {{ $t("cooperate.privatization.title") }}
+ {{ $t("cooperate.privatization.title") }}
@@ -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 ------------------------------------
diff --git a/src/router/index.ts b/src/router/index.ts
index c1d1214..d5e2312 100644
--- a/src/router/index.ts
+++ b/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",
+ },
+ },
+ ],
+ },
];
diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts
index 9ea2d5d..e5c7bdb 100644
--- a/src/types/auto-imports.d.ts
+++ b/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
+ readonly ElForm: UnwrapRef
readonly ElMessage: UnwrapRef
readonly ElMessageBox: UnwrapRef
readonly asyncComputed: UnwrapRef
diff --git a/src/views/privatization/index.vue b/src/views/privatization/index.vue
new file mode 100644
index 0000000..d491958
--- /dev/null
+++ b/src/views/privatization/index.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/separation/index.vue b/src/views/separation/index.vue
new file mode 100644
index 0000000..09934f5
--- /dev/null
+++ b/src/views/separation/index.vue
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/views/voiceprint/index.vue b/src/views/voiceprint/index.vue
new file mode 100644
index 0000000..f774268
--- /dev/null
+++ b/src/views/voiceprint/index.vue
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file