|
@@ -579,6 +579,8 @@ export default {
|
|
|
coverImageOrder: "before",
|
|
|
isShowCover: 0,
|
|
|
},
|
|
|
+ //引用的素材ID
|
|
|
+ fodderId: [],
|
|
|
coverImgBacList: [
|
|
|
{ txt: i18n.t("edit_settings.coverImgBacSelec1"), type: "colorFill" },
|
|
|
{ txt: i18n.t("edit_settings.coverImgBacSelec2"), type: "imgTile" },
|
|
@@ -608,9 +610,28 @@ export default {
|
|
|
...mapGetters({
|
|
|
info: "info",
|
|
|
}),
|
|
|
- coverPc: () => this.info.coverInfo.coverPc,
|
|
|
},
|
|
|
- watch: {},
|
|
|
+ watch: {
|
|
|
+ "info.coverInfo": {
|
|
|
+ handler(val) {
|
|
|
+ if (val) {
|
|
|
+ const folderIds = [
|
|
|
+ val.coverPcId,
|
|
|
+ val.coverMoId,
|
|
|
+ val.videoPcId,
|
|
|
+ val.videoMoId,
|
|
|
+ val.coverImgBacId,
|
|
|
+ val.videoBacImgId,
|
|
|
+ ].filter((i) => i);
|
|
|
+ console.log("folderIds", folderIds);
|
|
|
+ this.folderIds = folderIds;
|
|
|
+ // this.info.coverInfo.fodderId = folderIds;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true,
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
//是否显示
|
|
|
onSwitcherChange(data) {
|
|
@@ -639,50 +660,82 @@ export default {
|
|
|
handleSubmitFromMaterialSelector(selected) {
|
|
|
// 点击确定的时候是选择的图片上传
|
|
|
if (this.upTypeSta === "imgBac") {
|
|
|
- if (this.selectingFor === "pc")
|
|
|
+ if (this.selectingFor === "pc") {
|
|
|
this.info.coverInfo.coverPc = selected[0].icon;
|
|
|
- else if (this.selectingFor === "mobile")
|
|
|
+ this.info.coverInfo.coverPcId = selected[0].id;
|
|
|
+ } else if (this.selectingFor === "mobile") {
|
|
|
this.info.coverInfo.coverMo = selected[0].icon;
|
|
|
- else this.info.coverInfo.coverBac = selected[0].icon;
|
|
|
+ this.info.coverInfo.coverMoId = selected[0].id;
|
|
|
+ } else {
|
|
|
+ this.info.coverInfo.coverBac = selected[0].icon;
|
|
|
+ this.info.coverInfo.coverBacId = selected[0].id;
|
|
|
+ }
|
|
|
} else {
|
|
|
// 视频上传
|
|
|
if (this.selectingFor === "pc") {
|
|
|
console.log(selected[0], "selected[0]");
|
|
|
this.info.coverInfo.videoPc = selected[0].ossPath;
|
|
|
this.info.coverInfo.videoPcIcon = selected[0].icon;
|
|
|
+ this.info.coverInfo.videoPcId = selected[0].id;
|
|
|
} else if (this.selectingFor === "mobile") {
|
|
|
this.info.coverInfo.videoMo = selected[0].ossPath;
|
|
|
+ this.info.coverInfo.videoMoId = selected[0].id;
|
|
|
this.info.coverInfo.videoMoIcon = selected[0].icon;
|
|
|
- } else this.info.coverInfo.videoBacImg = selected[0].icon;
|
|
|
+ } else {
|
|
|
+ this.info.coverInfo.videoBacImg = selected[0].icon;
|
|
|
+ this.info.coverInfo.videoBacImgId = selected[0].id;
|
|
|
+ }
|
|
|
}
|
|
|
this.isShowSelectionWindow = false;
|
|
|
+
|
|
|
+ this.updateFolderIds();
|
|
|
},
|
|
|
onCancelPcTip() {
|
|
|
this.$nextTick(() => {
|
|
|
this.info.coverInfo.coverPc = "";
|
|
|
- console.log("onCancelPcTip-1",this.info.coverInfo);
|
|
|
+ this.info.coverInfo.coverPcId = null;
|
|
|
+ this.updateFolderIds();
|
|
|
+ console.log("onCancelPcTip-1", this.info.coverInfo);
|
|
|
});
|
|
|
},
|
|
|
onCancelAppTip() {
|
|
|
this.$nextTick(() => {
|
|
|
this.info.coverInfo.coverMo = "";
|
|
|
- console.log("onCancelPcTip-2", this.info.coverInfo);
|
|
|
+ this.info.coverInfo.coverMoId = null;
|
|
|
+ this.updateFolderIds();
|
|
|
});
|
|
|
},
|
|
|
onCancelBac() {
|
|
|
- this.info.coverInfo.coverBac = "";
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.info.coverInfo.coverBac = "";
|
|
|
+ this.info.coverInfo.coverBacId = null;
|
|
|
+ this.updateFolderIds();
|
|
|
+ });
|
|
|
},
|
|
|
// 关于视频
|
|
|
clearVideoPc() {
|
|
|
this.info.coverInfo.videoPc = "";
|
|
|
+ this.info.coverInfo.videoPcId = null;
|
|
|
this.info.coverInfo.videoPcIcon = "";
|
|
|
+ this.updateFolderIds();
|
|
|
},
|
|
|
clearVideoMo() {
|
|
|
this.info.coverInfo.videoMo = "";
|
|
|
+ this.info.coverInfo.videoMoId = null;
|
|
|
this.info.coverInfo.videoMoIcon = "";
|
|
|
+ this.updateFolderIds();
|
|
|
},
|
|
|
onCancelBac2() {
|
|
|
this.info.coverInfo.videoBacImg = "";
|
|
|
+ this.info.coverInfo.videoBacImgId = null;
|
|
|
+ this.updateFolderIds();
|
|
|
+ },
|
|
|
+ updateFolderIds() {
|
|
|
+ //fodderId 以前的字段有误在先
|
|
|
+ setTimeout(() => {
|
|
|
+ console.log("updateFolderIds:", this.folderIds);
|
|
|
+ this.info.coverInfo.fodderId = this.folderIds;
|
|
|
+ }, 300);
|
|
|
},
|
|
|
},
|
|
|
created() {
|