@@ -64,7 +64,7 @@ export default {
data() {
return {
inPage: false,
- type: 2,
+ type: 0,
currentId: "",
modeList: [], // 模板列表
};
@@ -106,6 +106,7 @@ export default {
// 获取模板列表
async loadModeList(sex) {
try {
+ sex = sex == 0 ? "" : sex;
const res = await getModeList(sex);
console.log(res, "获取模板列表");
this.modeList = res.data.list;
diff --git a/src/views/model/generateVideo.vue b/src/views/model/generateVideo.vue
index 11f9d0e..0b6dcec 100644
--- a/src/views/model/generateVideo.vue
+++ b/src/views/model/generateVideo.vue
@@ -53,7 +53,7 @@
@@ -294,43 +294,23 @@ export default {
}
},
- /**
- * @description:查询用户邀请码状态
- */
- async checkInviteCode() {
- try {
- const res = await doFindInviteCode();
- console.log(res, "查询用户邀请码数据");
- const status = res.data.status;
-
- if (status == 1) {
- // 组装参数
- const data = {
- id: this.id,
- ...this.saveData,
- ...this.soundParams,
- ...this.backGroundParams,
- };
- console.log(data, "最终提交的参数");
-
- if (
- !this.soundParams.voiceMouldId ||
- !this.soundParams.voiceMouldSmId
- ) {
- Toast.fail("请选择声音!");
- return;
- }
+ // 开始生成视频
+ submit() {
+ // 组装参数
+ const data = {
+ id: this.id,
+ ...this.saveData,
+ ...this.soundParams,
+ ...this.backGroundParams,
+ };
+ console.log(data, "最终提交的参数");
- this.saveOrUpdate(data);
- // 当没有邀请码时
- } else if (status == 0) {
- this.isShowMessageCover = true;
- return;
- }
- } catch (error) {
- console.log(error, "error");
- Toast.fail(error.message);
+ if (!this.soundParams.voiceMouldId || !this.soundParams.voiceMouldSmId) {
+ Toast.fail("请选择声音!");
+ return;
}
+
+ this.saveOrUpdate(data);
},
/**
diff --git a/src/views/model/getPaper copy.vue b/src/views/model/getPaper copy.vue
new file mode 100644
index 0000000..f419a67
--- /dev/null
+++ b/src/views/model/getPaper copy.vue
@@ -0,0 +1,258 @@
+
+
+
+
+
录入文案
+
+
+ 标题:
+ {{ title }}
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/model/getPaper.vue b/src/views/model/getPaper.vue
index 38f092d..dfc804f 100644
--- a/src/views/model/getPaper.vue
+++ b/src/views/model/getPaper.vue
@@ -3,9 +3,19 @@
录入文案
+
+
+ 标题:
+ {{ title }}
+
+
-
![]()
+
下一步
+
+
+
+
+
+
@@ -45,8 +67,11 @@ export default {
data() {
return {
inPage: false,
+ isActive: false,
+ isShowMessageCover: false,
paperwork: "",
title: "",
+ titlePre: "",
modelDetail: {},
id: "",
saveID: "",
@@ -69,6 +94,22 @@ export default {
this.$router.back();
},
+ showTitleInputBox() {
+ this.isShowMessageCover = true;
+ },
+
+ // 取消修改,将标题草稿同步至标题
+ messageCoverCancel() {
+ this.titlePre = this.title;
+ },
+
+ // 确认标题,将标题同步至标题草稿
+ messageCoverConfirm() {
+ this.title = this.titlePre;
+ },
+
+ expandImg() {},
+
goNext() {
let data = {
id: this.saveID,
@@ -76,11 +117,23 @@ export default {
personMouldId: this.modelDetail.id, //模板id
personMouldSmId: this.modelDetail.mouldSmId, //模板标识
paperwork: this.paperwork,
- title: this.modelDetail.title,
+ title: this.title,
};
+
if (this.id) {
data.id = this.id;
}
+
+ if (!this.title) {
+ Toast.fail("请输入标题!");
+ return;
+ }
+
+ if (!this.paperwork) {
+ Toast.fail("请输入文案!");
+ return;
+ }
+
this.saveOrUpdate(data);
},
@@ -90,7 +143,11 @@ export default {
async getDetailById(id) {
try {
const res = await getModelDetailById(id);
+ console.log(res, "根据id获取用户作品详情");
this.modelDetail = res.data.personMould;
+ this.paperwork = res.data.paperwork || ""; // 文案回填
+ this.title = res.data.title || ""; // 标题回填
+ this.titlePre = res.data.title || ""; // 将标题同步至标题草稿
} catch (error) {
console.log(error, "error");
Toast.fail(error.message);
@@ -156,6 +213,17 @@ export default {
margin: 10px auto;
margin-bottom: 25px;
}
+
+ .titleBox {
+ font-size: 14px;
+ font-weight: 600;
+ margin: 15px 0;
+ text-align: center;
+ .titleInput {
+ width: fit-content;
+ }
+ }
+
.content {
display: flex;
justify-content: space-between;
@@ -187,18 +255,6 @@ export default {
left: 0px;
bottom: -15px;
}
- .try {
- position: absolute;
- left: 20px;
- bottom: -35px;
- width: 80px;
- height: 25px;
- line-height: 25px;
- text-align: center;
- color: #0000004b;
- border: 1px solid #0000004b;
- border-radius: 5px;
- }
}
}
@@ -228,4 +284,15 @@ export default {
background-color: #ffffff00 !important;
}
}
+
+.titleInput {
+ text-align: center;
+ margin: 20px 0;
+ input {
+ height: 30px;
+ border-radius: 5px;
+ border: 1px solid #00000054;
+ padding: 8px 15px;
+ }
+}
diff --git a/src/views/myPage/myPage.vue b/src/views/myPage/myPage.vue
index 2ad593e..419e4f9 100644
--- a/src/views/myPage/myPage.vue
+++ b/src/views/myPage/myPage.vue
@@ -40,7 +40,21 @@
:items-per-page="4"
@change="pageChange"
/>
-
+ 创作新作品
+
+
+ 创作新作品
+
+
+
+
请添加微信与我们联系
+
+
或致电137******91
+
点击空白处关闭
+
+
@@ -72,6 +86,7 @@ export default {
data() {
return {
inPage: false,
+ isShowMessageCover: false,
videoList: [],
currentPage: 1,
pageSize: 4,
@@ -100,6 +115,13 @@ export default {
this.loadVideoList(this.currentPage, this.pageSize);
},
+ // 点击空白区域退出提示
+ exitCover(e) {
+ if (e.srcElement.id != "message") {
+ this.isShowMessageCover = false;
+ }
+ },
+
goDetail(item) {
const status = item.videoStatus;
if (status == 0) {
@@ -188,10 +210,12 @@ export default {
console.log(res, "查询用户邀请码数据");
const status = res.data.status;
- if (status == 1) {
+ // 当没有邀请码时
+ if (status == 0) {
+ scrollToID("top");
+ this.isShowMessageCover = true;
+ } else if (status == 1) {
this.goCreateNew();
- // 当没有邀请码时
- } else if (status == 0) {
}
} catch (error) {
console.log(error, "error");
@@ -353,5 +377,66 @@ export default {
margin-top: 25px;
margin-left: 190px;
}
+ .messageCover {
+ position: fixed;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background-color: #00000091;
+ transition: all 0.3s;
+ opacity: 0;
+ z-index: -1;
+ .message {
+ position: sticky;
+ top: 48%;
+ transform: translate(-50%, -50%);
+ width: 272px;
+ height: 290px;
+ border-radius: 5px;
+ background-color: #fff;
+ text-align: center;
+ transition: all 0.3s;
+ margin-left: 50%;
+
+ .connect {
+ font-size: 12px;
+ margin: 19px 0 10px 0;
+ }
+ .qrCode {
+ width: 203px;
+ height: 213px;
+ background-color: #ffffff;
+ border-radius: 5px;
+ border: solid 1px #595959;
+ margin: auto;
+ }
+ .phoneNum {
+ float: left;
+ font-size: 11px;
+ margin-top: 3px;
+ margin-left: 34px;
+ }
+ .close {
+ position: absolute;
+ top: 8px;
+ right: 15px;
+ font-size: 18px;
+ color: #000;
+ }
+ .clickToClose {
+ position: absolute;
+ font-size: 14px;
+ color: #fff;
+ left: 50%;
+ bottom: -20%;
+ transform: translateX(-50%);
+ }
+ }
+
+ &.active {
+ z-index: 100;
+ opacity: 1;
+ }
+ }
}