Commit 43181b74 by chenwq

众筹-必填

1 parent 4debf274
......@@ -251,12 +251,13 @@ export default {
}
],
// 活动配置
customerServiceName: [{ required: true, message: '请输入客服名称', trigger: 'change' }],
customerServicePhone: [{ required: true, message: '请输入客服电话', trigger: 'change' }],
customerServiceQrImg: [{ required: true, message: '请选择客服二维码', trigger: 'change' }],
sponsorName: [{ required: true, message: '请输入主办方', trigger: 'change' }],
activityAddressDetailName: [{ required: true, message: '请选择活动地址', trigger: 'change' }],
// customerServiceName: [{ required: true, message: '请输入客服名称', trigger: 'change' }],
// customerServicePhone: [{ required: true, message: '请输入客服电话', trigger: 'change' }],
// customerServiceQrImg: [{ required: true, message: '请选择客服二维码', trigger: 'change' }],
// sponsorName: [{ required: true, message: '请输入主办方', trigger: 'change' }],
// activityAddressDetailName: [{ required: true, message: '请选择活动地址', trigger: 'change' }],
activityBigImg: [{ required: true, message: '请选择活动大图', trigger: 'change' }],
activityDetail: [{ required: true, message: '请输入活动详情', trigger: 'change' }],
forwardTitle: [{ required: true, message: '请输入转发标题', trigger: 'change' }]
},
// 表单设置
......@@ -426,7 +427,7 @@ export default {
type: 'upload',
width: '320px',
tips: '进入活动页的图片',
limitSize: 10,
limitSize: 5,
maxPhotoNum: 1,
isDisabled: false,
suffixSlot: 'activityBigImg',
......@@ -446,7 +447,7 @@ export default {
uploadType: 'video',
suffixSlot: 'activityVideos',
tips: '大图下可以展示视频,不上传则不显示',
limitSize: 50,
limitSize: 20,
maxPhotoNum: 6,
isDisabled: false,
handleUpload: (e, file, targetItem) => {
......@@ -827,8 +828,6 @@ export default {
checkValid(validList) {
for (let i = 0; i < validList.length; i++) {
let item = validList[i]
console.log(i)
console.log(item)
if (item.valid) {
this.whereToGo(Object.keys(item.errorObj)[0])
return false
......@@ -886,18 +885,18 @@ export default {
]
this.$refs.configEditFormRef.$refs[this.editChildRef].validate((configValid, configErrorObj) => {
validList.push({ valid: !configValid, errorObj: configErrorObj })
if (this.$refs.serviceEditFormRef) {
this.$refs.serviceEditFormRef.$refs[this.editChildRef].validate((serviceValid, serviceErrorObj) => {
validList.splice(2, 0, { valid: !serviceValid, errorObj: serviceErrorObj })
if (this.checkValid(validList)) {
this.addOrUpdate()
}
})
} else {
if (this.checkValid(validList)) {
this.addOrUpdate()
}
// if (this.$refs.serviceEditFormRef) {
// this.$refs.serviceEditFormRef.$refs[this.editChildRef].validate((serviceValid, serviceErrorObj) => {
// validList.splice(2, 0, { valid: !serviceValid, errorObj: serviceErrorObj })
// if (this.checkValid(validList)) {
// this.addOrUpdate()
// }
// })
// } else {
if (this.checkValid(validList)) {
this.addOrUpdate()
}
// }
})
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!