Authored by 邱骏

增加一些验证判断

export default "development";
\ No newline at end of file
export default "production";
\ No newline at end of file
... ...
... ... @@ -7,7 +7,7 @@
<template v-for="(i, index) in floorList">
<div class="floor-item">
<div class="floor-image" v-if="i.template_name === 'singleImage'">
<img :src="i.data[0].src.split('?')[0]">
<img style="width: 100%" :src="i.data[0].src.split('?')[0] || require('assets/banner-img.png')">
<div class="floor-mask">
<div class="floor-edit-buttons">
<a href="javascript:void(0)"
... ... @@ -18,8 +18,8 @@
</div>
</div>
<div class="floor-image" v-if="i.template_name === 'twoPicture'">
<img style="width: 50%; height: 120px;" :src="i.data[0].src.split('?')[0]">
<img style="width: 50%; height: 120px;" :src="i.data[1].src.split('?')[0]">
<img style="width: 50%; height: 120px;" :src="i.data[0].src.split('?')[0] || require('assets/banner-img.png')">
<img style="width: 50%; height: 120px;" :src="i.data[1].src.split('?')[0] || require('assets/banner-img.png')">
<div class="floor-mask">
<div class="floor-edit-buttons">
<a href="javascript:void(0)"
... ... @@ -36,7 +36,7 @@
</div>
<div class="button-container">
<i-button type="primary" @click="showModal('singleImage', singleData, -1)">一张图</i-button>
<i-button type="primary" @click="showModal('twoPicture', twoData, -1)">张图</i-button>
<i-button type="primary" @click="showModal('twoPicture', twoData, -1)">张图</i-button>
</div>
... ... @@ -236,6 +236,13 @@
},
onOk() { // 对话框点击确认时,保存数据
let modalValue = this.$refs.addEditor.getValue();
for(let key in modalValue) {
if (modalValue[key].url.url === '') {
this.modalData = [];
this.$Message.error('请勿提交空数据');
return;
}
}
let data = {
id: this.modalInfo.resContentId,
contentName: '楼层' + (this.floorList.length + 1),
... ... @@ -307,7 +314,7 @@
}
.editor-container {
width: 50%;
width: 500px;
height: 100%;
flex-shrink: 0;
border-right: 1px solid #e4e4e4;
... ... @@ -317,7 +324,7 @@
.button-container {
width: 50%;
flex-shrink: 0;
flex-grow: 1;
}
.button-container button {
... ... @@ -334,6 +341,10 @@
overflow: hidden;
}
.floor-image {
width: 100%;
}
.floor-image img {
width: 100%;
float: left;
... ...
... ... @@ -88,8 +88,8 @@ export default {
</div>
);*/
return h('div',{},[
h('i-button', {props: {type: 'primary', size: 'small'}, style:{marginRight: '20px', display: row.showEditButton}, on:{click: () => this.onEditResource(row)}}, '修 改'),
h('i-button', {props: {type: 'success', size: 'small'}, on:{click: () => this.onToEditor(row)}}, '内容编辑')
h('i-button', {props: {type: 'success', size: 'small'}, on:{click: () => this.onToEditor(row)}}, '内容编辑'),
h('i-button', {props: {type: 'primary', size: 'small'}, style:{marginLeft: '20px', display: row.showEditButton}, on:{click: () => this.onEditResource(row)}}, '修改信息'),
]);
}
}],
... ...
... ... @@ -31,6 +31,7 @@ module.exports = merge(webpackBaseConfig, {
})
],
devServer: {
host: '0.0.0.0',
openPage: 'dist/coupon.html',
proxy: {
'/ufoPlatform/**': {
... ...