Explorar el Código

生成视频失败的处理

master
congzc hace 1 año
padre
commit
23d95ce164
Se han modificado 3 ficheros con 20 adiciones y 6 borrados
  1. +6
    -2
      src/mixins/leaveDialog.js
  2. +2
    -1
      src/views/model/editModel.vue
  3. +12
    -3
      src/views/model/videoFail.vue

+ 6
- 2
src/mixins/leaveDialog.js Ver fichero

@@ -29,12 +29,16 @@ export default {
},
beforeRouteLeave(to, from, next) {
console.log(to.path);
let that=this
if (this.videoStatus==3) {
next()
return
}
if (to.path=='/videoCreate') {
next()
return
}
let that=this
setTimeout(() => {
Dialog.confirm({
message: '需要保存草稿吗?',


+ 2
- 1
src/views/model/editModel.vue Ver fichero

@@ -361,6 +361,7 @@ export default {
scLoading1: true,
scLoading2: true,

videoStatus: null, //生成状态
soundTips: '',

timer: null,
@@ -752,7 +753,7 @@ export default {
try {
this.contentLoading = true;
const res = await getModelDetailById(id);
this.videoStatus = res.data.videoStatus;
// console.log(JSON.parse(res.data.personMouldSm))
this.materialList.BGI = JSON.parse(res.data.backgroundSm) || {};
// this.materialList.BGI.id = JSON.parse(res.data.backgroundSm).id + '';


+ 12
- 3
src/views/model/videoFail.vue Ver fichero

@@ -4,7 +4,8 @@
<HeadTop />
<div style="padding: 0 20px">
<h1 style="margin-top: 30px">视频生成失败</h1>
<h1 style="margin-top: 30px">失败原因是:</h1>
<h1 style="margin-top: 30px; margin-bottom: 10px">失败原因是:</h1>
<div style="text-indent: 2em; font-size: 14px">{{ message }}</div>
<h1 style="margin-top: 20px">
<i
@click="
@@ -37,6 +38,8 @@ import { mapState, mapActions } from 'vuex';
// 工具
import { scrollToID } from '../../utils';
import HeadTop from '../../components/common/head.vue';

import { doFindVideoById } from '@/api/generateVideo';
Vue.use(Toast);
export default {
components: {
@@ -44,7 +47,8 @@ export default {
},
data() {
return {
inPage: false
inPage: false,
message: null
};
},
computed: {
@@ -56,7 +60,12 @@ export default {
methods: {
...mapActions(['setCharacters'])
},
created() {},
async created() {
console.log(this.$route.query.id);
const res = await doFindVideoById(this.$route.query.id);
console.log(res);
this.message = res.data.videoMsg;
},
mounted() {
this.inPage = true;
scrollToID('top');


Cargando…
Cancelar
Guardar