...
|
...
|
@@ -53,13 +53,15 @@ |
|
|
<div class="hot-image-list-body">
|
|
|
<div class="hot-image-list-item"
|
|
|
v-for="(item, index) in i.data"
|
|
|
:class="i.itemClass"
|
|
|
:key="index">
|
|
|
<img class="item-image"
|
|
|
|
|
|
:class="i.imageClass"
|
|
|
:src="item.src ? item.src.split('?')[0] : ''"
|
|
|
alt=""
|
|
|
srcset="" >
|
|
|
<p class="item-title" >{{item.title}}</p>
|
|
|
<p class="item-title"
|
|
|
:class="i.titleClass" >{{item.title}}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -118,7 +120,7 @@ |
|
|
|
|
|
<Modal v-model="show" @on-ok="onOk" @on-cancel="onCancel" :title="modalInfo.modalTitle" width="650">
|
|
|
<banner-editor ref="addEditor" v-model="modalData" :hideAddButton="modalInfo.hideAddButton"
|
|
|
:hideDeleteButton="true" :type="platform" :templateName="modalInfo.template_name"></banner-editor>
|
|
|
:hideDeleteButton="true" :type="platform" :templateName="modalInfo.template_name" :size="modalInfo.size"></banner-editor>
|
|
|
</Modal>
|
|
|
</div>
|
|
|
</LayoutContent>
|
...
|
...
|
@@ -310,7 +312,6 @@ |
|
|
template_name: 'tabFloor',
|
|
|
resContentId: 0
|
|
|
}, // 猜你喜欢Tab的基础数据
|
|
|
|
|
|
resId: null,
|
|
|
bg: '',
|
|
|
show: false, // 显示Modal
|
...
|
...
|
@@ -355,7 +356,18 @@ |
|
|
let item = JSON.parse(data[i].data);
|
|
|
item.resContentId = data[i].resContentId;
|
|
|
item.type = data[i].type;
|
|
|
|
|
|
if(item.template_name === 'imageList' && item.size == 5){
|
|
|
item.itemClass = 'hot-image-list-item-5';
|
|
|
item.titleClass = 'item-title-5';
|
|
|
item.imageClass = 'item-image-5';
|
|
|
}else {
|
|
|
item.itemClass = '';
|
|
|
item.titleClass = '';
|
|
|
item.imageClass = '';
|
|
|
}
|
|
|
this.floorList.push(item);
|
|
|
|
|
|
}
|
|
|
},
|
|
|
showModal(type, data, index) {
|
...
|
...
|
@@ -414,6 +426,7 @@ |
|
|
this.modalInfo.resContentId = data.resContentId;
|
|
|
this.modalInfo.template_intro = data.template_intro;
|
|
|
this.modalInfo.template_name = data.template_name;
|
|
|
this.modalInfo.size = data.size || '0';
|
|
|
this.modalInfo.floorIndex = index;
|
|
|
this.modalInfo.hideAddButton = hideAddButton;
|
|
|
this.show = true;
|
...
|
...
|
@@ -428,9 +441,13 @@ |
|
|
onOk: () => {
|
|
|
this.uploadData.items.splice(index, 1);
|
|
|
this.resourceService.addOrUpdateResourceDetail(this.uploadData).then(res => {
|
|
|
if (res && res.code === 200) {
|
|
|
if (res && res.code === 2000) {
|
|
|
this.$Message.success(res.message || '修改成功!');
|
|
|
this.getResourceDetailList();
|
|
|
} else {
|
|
|
this.$Message.error(res.message || '修改失败!');
|
|
|
}
|
|
|
//修改成功失败都需要初始化数据
|
|
|
this.modalData = [];
|
|
|
this.modalInfo = {
|
|
|
modalType: 0,
|
...
|
...
|
@@ -438,11 +455,9 @@ |
|
|
resContentId: 0,
|
|
|
floorIndex: -1,
|
|
|
template_intro: '',
|
|
|
template_name: ''
|
|
|
template_name: '',
|
|
|
size: '0'
|
|
|
};
|
|
|
} else {
|
|
|
this.$Message.error(res.message || '修改失败!');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -460,7 +475,8 @@ |
|
|
}
|
|
|
}
|
|
|
|
|
|
if(size != 0 && length != size) {
|
|
|
if(size && size != 0 && length != size) {
|
|
|
this.modalData = [];
|
|
|
this.$Message.error('请配置'+size+'个图片后再提交!');
|
|
|
return;
|
|
|
}
|
...
|
...
|
@@ -505,13 +521,15 @@ |
|
|
resContentId: 0,
|
|
|
floorIndex: -1,
|
|
|
template_intro: '',
|
|
|
template_name: ''
|
|
|
template_name: '',
|
|
|
size: '0'
|
|
|
};
|
|
|
this.show = false;
|
|
|
} else {
|
|
|
this.$Message.error(res.message || '修改失败!');
|
|
|
}
|
|
|
});
|
|
|
this.$refs.addEditor.reSetType();
|
|
|
},
|
|
|
onCancel() {
|
|
|
this.modalData = [];
|
...
|
...
|
@@ -521,7 +539,8 @@ |
|
|
resContentId: 0,
|
|
|
floorIndex: -1,
|
|
|
template_intro: '',
|
|
|
template_name: ''
|
|
|
template_name: '',
|
|
|
size: '0'
|
|
|
};
|
|
|
this.show = false;
|
|
|
}
|
...
|
...
|
@@ -682,6 +701,10 @@ |
|
|
flex-shrink: 0;
|
|
|
height: 150px;
|
|
|
}
|
|
|
.hot-image-list-item-5 {
|
|
|
flex: 0 0 20%;
|
|
|
height: 120px;
|
|
|
}
|
|
|
|
|
|
.item-image {
|
|
|
margin-top: 10px;
|
...
|
...
|
@@ -692,6 +715,10 @@ |
|
|
justify-content: center; */
|
|
|
}
|
|
|
|
|
|
.item-image-5 {
|
|
|
height: 80px;
|
|
|
}
|
|
|
|
|
|
.item-title {
|
|
|
width: 110px;
|
|
|
margin-top: 10px;
|
...
|
...
|
@@ -710,6 +737,10 @@ |
|
|
text-overflow: ellipsis;
|
|
|
}
|
|
|
|
|
|
.item-title-5 {
|
|
|
width: 88px;
|
|
|
}
|
|
|
|
|
|
.sort-tab-body {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
...
|
...
|
|