Преглед изворни кода

Merge branch 'ctt_dev' into dev

dev
chutingting пре 1 година
родитељ
комит
bf8c02b7d9
4 измењених фајлова са 30 додато и 4 уклоњено
  1. +12
    -0
      src/apis/createVideo.js
  2. BIN
      src/assets/img/gpt.png
  3. +0
    -2
      src/types/auto-imports.d.ts
  4. +18
    -2
      src/views/createVideo/index.vue

+ 12
- 0
src/apis/createVideo.js Прегледај датотеку

@@ -206,3 +206,15 @@ export function getLanguageApi(data) {
data data
}) })
} }

/**
* @description:视频校验
* @param {number} id
* @return data
*/
export function checkVideoApi(id) {
return request({
url: `/api/userVideo/checkVideo?id=${id}`,
method: 'get'
})
}

BIN
src/assets/img/gpt.png Прегледај датотеку

Before After
Width: 80  |  Height: 80  |  Size: 9.3 KiB

+ 0
- 2
src/types/auto-imports.d.ts Прегледај датотеку

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


+ 18
- 2
src/views/createVideo/index.vue Прегледај датотеку

@@ -376,7 +376,7 @@
<div @click="createVideo" class="customBtn"> <div @click="createVideo" class="customBtn">
<MyLoadingIcon :isLoading="createLoading"></MyLoadingIcon> <MyLoadingIcon :isLoading="createLoading"></MyLoadingIcon>
<div v-if="!createLoading"> <div v-if="!createLoading">
{{ $t("createVideo.generateVideo") }}
{{ $t("createVideo.generateVideo") }}111
</div> </div>
</div> </div>
</div> </div>
@@ -413,6 +413,7 @@
:class="tabItemActive == 4 ? 'tabItemActive' : ''" :class="tabItemActive == 4 ? 'tabItemActive' : ''"
@click="tabItemActive = 4" @click="tabItemActive = 4"
> >
<img class="gpt" src="../../assets/img/gpt.png" alt="">
{{ $t("createVideo.aiScript") }} {{ $t("createVideo.aiScript") }}
</div> </div>
<!-- <div <!-- <div
@@ -767,6 +768,7 @@ import {
createVideoApi, createVideoApi,
getModelDetailByIdApi, getModelDetailByIdApi,
getLanguageApi, getLanguageApi,
checkVideoApi
} from "@/apis/createVideo"; } from "@/apis/createVideo";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import Recorder from "js-audio-recorder"; //mp3插件 import Recorder from "js-audio-recorder"; //mp3插件
@@ -1641,7 +1643,12 @@ async function createVideo() {
res4.data.time res4.data.time
)} in length` )} in length`
); );
await saveOrUpdate("isCreate");
await saveOrUpdate("isCreate");
let checkVideo = await checkVideoApi(workId.value)
if (checkVideo.code !== 200) {
ElMessage.success(checkVideo.message);
return
}
const res2 = await createVideoApi(workId.value); const res2 = await createVideoApi(workId.value);
// 去充值 // 去充值
if (res2.code === 64001) { if (res2.code === 64001) {
@@ -2096,6 +2103,7 @@ onMounted(async () => {
// padding: 0 5px; // padding: 0 5px;
background-color: #000; background-color: #000;
user-select: none; user-select: none;
position: relative;
} }
.tabItemActive { .tabItemActive {
background-color: #fff; background-color: #fff;
@@ -2267,6 +2275,14 @@ onMounted(async () => {
transition: all 0.3s; transition: all 0.3s;
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
position: relative;
.gpt{
position: absolute;
right: -10px;
top: -10px;
transform: rotate(45deg);
width: 30px;
}
} }
.tabItemActive { .tabItemActive {
background-color: #000; background-color: #000;


Loading…
Откажи
Сачувај