Browse Source

填充id

release
HolyKnightIX 2 years ago
parent
commit
164f0368f7
5 changed files with 10 additions and 3 deletions
  1. +1
    -0
      src/components/common/tail.vue
  2. +0
    -1
      src/components/home/home.vue
  3. +1
    -0
      src/views/model/chooseModel.vue
  4. +5
    -2
      src/views/model/generateVideo.vue
  5. +3
    -0
      src/views/model/getPaper.vue

+ 1
- 0
src/components/common/tail.vue View File

@@ -104,6 +104,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.tailBox { .tailBox {
overflow: hidden; overflow: hidden;
padding-top: 20px;
.title { .title {
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;


+ 0
- 1
src/components/home/home.vue View File

@@ -621,7 +621,6 @@ export default {
.then((res) => { .then((res) => {
if (res.data.code == 1052) { if (res.data.code == 1052) {
this.$router.push("/login"); this.$router.push("/login");
Toast.fail("登录过期,请重新登录!");
return; return;
} else { } else {
this.$router.push("/myPage"); this.$router.push("/myPage");


+ 1
- 0
src/views/model/chooseModel.vue View File

@@ -135,6 +135,7 @@ export default {
path: "/getPaper", path: "/getPaper",
query: { query: {
modelDetail: modelDetail, modelDetail: modelDetail,
saveID: res.data.id,
}, },
}); });
} catch (error) { } catch (error) {


+ 5
- 2
src/views/model/generateVideo.vue View File

@@ -209,14 +209,16 @@ export default {
const res = await doCreateVideo(data); const res = await doCreateVideo(data);
console.log(res, "生成视频"); console.log(res, "生成视频");
Toast.success("提交成功!"); Toast.success("提交成功!");
// *#06#
setTimeout(() => { setTimeout(() => {
this.isShowCover = true; this.isShowCover = true;
}, 2000); }, 2000);
const timer = setInterval(() => { const timer = setInterval(() => {
// 重复调取此接口直到videoStatus == 2
// 重复调取此接口直到videoStatus == 2 || 3
this.getVideo(this.id); this.getVideo(this.id);
if (this.timerOver) { if (this.timerOver) {
clearInterval(timer); clearInterval(timer);
this.isShowCover = false;
} }
}, 1000); }, 1000);
} catch (error) { } catch (error) {
@@ -275,9 +277,9 @@ export default {
this.timerOver = true; this.timerOver = true;
return; return;
} else if (res.data.videoStatus == 3) { } else if (res.data.videoStatus == 3) {
this.isShowCover = false;
Toast.fail(`视频生成失败!失败原因:${res.data.videoMsg}`); Toast.fail(`视频生成失败!失败原因:${res.data.videoMsg}`);
this.timerOver = true; this.timerOver = true;
this.isShowCover = false;
return; return;
} }
} catch (error) { } catch (error) {
@@ -298,6 +300,7 @@ export default {
if (status == 1) { if (status == 1) {
// 组装参数 // 组装参数
const data = { const data = {
id: this.id,
...this.saveData, ...this.saveData,
...this.soundParams, ...this.soundParams,
...this.backGroundParams, ...this.backGroundParams,


+ 3
- 0
src/views/model/getPaper.vue View File

@@ -48,6 +48,7 @@ export default {
title: "", title: "",
modelDetail: {}, modelDetail: {},
id: "", id: "",
saveID: "",
}; };
}, },
computed: { computed: {
@@ -69,6 +70,7 @@ export default {


goNext() { goNext() {
let data = { let data = {
id: this.saveID,
type: 1, type: 1,
personMouldId: this.modelDetail.id, //模板id personMouldId: this.modelDetail.id, //模板id
personMouldSmId: this.modelDetail.mouldSmId, //模板标识 personMouldSmId: this.modelDetail.mouldSmId, //模板标识
@@ -124,6 +126,7 @@ export default {
this.modelDetail = this.$route.query.modelDetail; this.modelDetail = this.$route.query.modelDetail;
console.log(this.modelDetail, "modelDetail"); console.log(this.modelDetail, "modelDetail");
} }
this.saveID = this.$route.query.saveID;
}, },
mounted() { mounted() {
scrollToID("top"); scrollToID("top");


Loading…
Cancel
Save