Authored by 邱骏

增加一些验证判断

1 -export default "development";  
  1 +export default "production";
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <template v-for="(i, index) in floorList"> 7 <template v-for="(i, index) in floorList">
8 <div class="floor-item"> 8 <div class="floor-item">
9 <div class="floor-image" v-if="i.template_name === 'singleImage'"> 9 <div class="floor-image" v-if="i.template_name === 'singleImage'">
10 - <img :src="i.data[0].src.split('?')[0]"> 10 + <img style="width: 100%" :src="i.data[0].src.split('?')[0] || require('assets/banner-img.png')">
11 <div class="floor-mask"> 11 <div class="floor-mask">
12 <div class="floor-edit-buttons"> 12 <div class="floor-edit-buttons">
13 <a href="javascript:void(0)" 13 <a href="javascript:void(0)"
@@ -18,8 +18,8 @@ @@ -18,8 +18,8 @@
18 </div> 18 </div>
19 </div> 19 </div>
20 <div class="floor-image" v-if="i.template_name === 'twoPicture'"> 20 <div class="floor-image" v-if="i.template_name === 'twoPicture'">
21 - <img style="width: 50%; height: 120px;" :src="i.data[0].src.split('?')[0]">  
22 - <img style="width: 50%; height: 120px;" :src="i.data[1].src.split('?')[0]"> 21 + <img style="width: 50%; height: 120px;" :src="i.data[0].src.split('?')[0] || require('assets/banner-img.png')">
  22 + <img style="width: 50%; height: 120px;" :src="i.data[1].src.split('?')[0] || require('assets/banner-img.png')">
23 <div class="floor-mask"> 23 <div class="floor-mask">
24 <div class="floor-edit-buttons"> 24 <div class="floor-edit-buttons">
25 <a href="javascript:void(0)" 25 <a href="javascript:void(0)"
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 </div> 36 </div>
37 <div class="button-container"> 37 <div class="button-container">
38 <i-button type="primary" @click="showModal('singleImage', singleData, -1)">一张图</i-button> 38 <i-button type="primary" @click="showModal('singleImage', singleData, -1)">一张图</i-button>
39 - <i-button type="primary" @click="showModal('twoPicture', twoData, -1)">张图</i-button> 39 + <i-button type="primary" @click="showModal('twoPicture', twoData, -1)">张图</i-button>
40 </div> 40 </div>
41 41
42 42
@@ -236,6 +236,13 @@ @@ -236,6 +236,13 @@
236 }, 236 },
237 onOk() { // 对话框点击确认时,保存数据 237 onOk() { // 对话框点击确认时,保存数据
238 let modalValue = this.$refs.addEditor.getValue(); 238 let modalValue = this.$refs.addEditor.getValue();
  239 + for(let key in modalValue) {
  240 + if (modalValue[key].url.url === '') {
  241 + this.modalData = [];
  242 + this.$Message.error('请勿提交空数据');
  243 + return;
  244 + }
  245 + }
239 let data = { 246 let data = {
240 id: this.modalInfo.resContentId, 247 id: this.modalInfo.resContentId,
241 contentName: '楼层' + (this.floorList.length + 1), 248 contentName: '楼层' + (this.floorList.length + 1),
@@ -307,7 +314,7 @@ @@ -307,7 +314,7 @@
307 } 314 }
308 315
309 .editor-container { 316 .editor-container {
310 - width: 50%; 317 + width: 500px;
311 height: 100%; 318 height: 100%;
312 flex-shrink: 0; 319 flex-shrink: 0;
313 border-right: 1px solid #e4e4e4; 320 border-right: 1px solid #e4e4e4;
@@ -317,7 +324,7 @@ @@ -317,7 +324,7 @@
317 324
318 .button-container { 325 .button-container {
319 width: 50%; 326 width: 50%;
320 - flex-shrink: 0; 327 + flex-grow: 1;
321 } 328 }
322 329
323 .button-container button { 330 .button-container button {
@@ -334,6 +341,10 @@ @@ -334,6 +341,10 @@
334 overflow: hidden; 341 overflow: hidden;
335 } 342 }
336 343
  344 + .floor-image {
  345 + width: 100%;
  346 + }
  347 +
337 .floor-image img { 348 .floor-image img {
338 width: 100%; 349 width: 100%;
339 float: left; 350 float: left;
@@ -88,8 +88,8 @@ export default { @@ -88,8 +88,8 @@ export default {
88 </div> 88 </div>
89 );*/ 89 );*/
90 return h('div',{},[ 90 return h('div',{},[
91 - h('i-button', {props: {type: 'primary', size: 'small'}, style:{marginRight: '20px', display: row.showEditButton}, on:{click: () => this.onEditResource(row)}}, '修 改'),  
92 - h('i-button', {props: {type: 'success', size: 'small'}, on:{click: () => this.onToEditor(row)}}, '内容编辑') 91 + h('i-button', {props: {type: 'success', size: 'small'}, on:{click: () => this.onToEditor(row)}}, '内容编辑'),
  92 + h('i-button', {props: {type: 'primary', size: 'small'}, style:{marginLeft: '20px', display: row.showEditButton}, on:{click: () => this.onEditResource(row)}}, '修改信息'),
93 ]); 93 ]);
94 } 94 }
95 }], 95 }],
@@ -31,6 +31,7 @@ module.exports = merge(webpackBaseConfig, { @@ -31,6 +31,7 @@ module.exports = merge(webpackBaseConfig, {
31 }) 31 })
32 ], 32 ],
33 devServer: { 33 devServer: {
  34 + host: '0.0.0.0',
34 openPage: 'dist/coupon.html', 35 openPage: 'dist/coupon.html',
35 proxy: { 36 proxy: {
36 '/ufoPlatform/**': { 37 '/ufoPlatform/**': {