Commit 0261115c by zhangquan

添加门店频道banner图

1 parent 893acda1
......@@ -35,6 +35,13 @@
<div class="el-form-item__error" v-if="channelImgFlag">请上传频道banner</div>
</el-form-item>
<div class="text-tip">建议尺寸:750*448</div>
<template v-if="channelForm.channelType == 6">
<el-form-item label="门店频道banner图:" prop="storeBannerImg" style="margin-top: 15px">
<glsx-preview :picOptions="merchantPicOptions" :imageUrlArr="channelForm.storeBannerImgArr" @change="changeChannelImg"></glsx-preview>
<div class="el-form-item__error" v-if="channelImgFlag">请上传门店频道banner</div>
</el-form-item>
<div class="text-tip">建议尺寸:750*264</div>
</template>
</el-form>
</div>
</div>
......@@ -76,7 +83,8 @@ export default {
channelImg: '',
channelChildName: '',
sort: '',
channelImgArr: []
channelImgArr: [],
storeBannerImgArr: []
},
channelImgbgArr: ['banner1', 'banner2'],
channelOtherImgbgArr: ['membrane', 'crowd', 'activity'],
......@@ -87,6 +95,12 @@ export default {
key: 'channelImg',
isClose: true
},
merchantPicOptions: {
width: '174px',
height: '104px',
key: 'storeBannerImg',
isClose: true
},
shareOptions: {
width: '120px',
height: '90px',
......@@ -107,6 +121,13 @@ export default {
promotion: [{ required: true, message: '请输入频道分享文案', trigger: 'blur' }],
channelChildName: [{ required: true, message: '请输入频道子名称', trigger: 'change' }],
sort: [{ required: true, message: '请输入频道顺序', trigger: 'change' }],
storeBannerImg: [{ required: true,validator: (rule, value, callback) => {
if(this.channelForm.channelType == 6 && !this.channelForm.storeBannerImg){
callback(new Error('请上传门店频道banner图'))
}else{
callback()
}
}, trigger: 'change' }]
}
}
},
......@@ -152,6 +173,7 @@ export default {
this.$refs.ruleForm.clearValidate(val.key)
},
handleSave() {
console.log(this.channelForm, 'this.channelForm')
this.$refs.ruleForm1.validate(valid1 =>{
if(valid1){
this.$refs.ruleForm.validate(valid => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!