This commit is contained in:
liuye
2022-01-21 16:58:26 +08:00
parent fda3bf95f1
commit 4baae80558

View File

@@ -135,8 +135,8 @@ export default {
formRules: { formRules: {
imgUrl: [{required: true, message: '请添加图片', trigger: 'blur'}], imgUrl: [{required: true, message: '请添加图片', trigger: 'blur'}],
title: [{required: true, message: '请输入活动名称', trigger: 'blur'}], title: [{required: true, message: '请输入活动名称', trigger: 'blur'}],
type: [{required: true, trigger: 'blur'}], type: [{required: true, message: '请选择链接类型', trigger: 'blur'}],
// linkUrl: [{ required: true, message: '请输入链接', trigger: 'blur' }] linkUrl: [{ required: true, message: '请输入链接', trigger: 'blur' }]
}, },
colConfigs: [ colConfigs: [
{prop: 'imgUrl', label: '首页封面', slot: 'imgUrl'}, {prop: 'imgUrl', label: '首页封面', slot: 'imgUrl'},
@@ -221,23 +221,27 @@ export default {
}, },
// 确定新增 // 确定新增
addConfirm() { addConfirm() {
// console.log('确定') this.$refs.ruleForm.validate((valid) => {
this.instance if (valid) {
.post(`/app/appbanner/addOrUpdate`, { this.instance.post(`/app/appbanner/addOrUpdate`, {
imgUrl: this.dialogInfo.imgUrl[0].url, imgUrl: this.dialogInfo.imgUrl[0].url,
linkUrl: this.dialogInfo.linkUrl, linkUrl: this.dialogInfo.linkUrl,
status: this.status, status: this.status,
title: this.dialogInfo.title, title: this.dialogInfo.title,
type: this.dialogInfo.type, type: this.dialogInfo.type,
id: this.dialogInfo.id, id: this.dialogInfo.id,
}) })
.then(res => { .then(res => {
if (res?.code == 0) { if (res?.code == 0) {
this.$message.success(this.dialogInfo.id ? '编辑成功' : '新增成功') this.$message.success(this.dialogInfo.id ? '编辑成功' : '新增成功')
this.visible = false this.visible = false
this.getList() this.getList()
}
})
} }
}) });
// console.log('确定')
}, },
// 发布/取消发布 // 发布/取消发布
release(row) { release(row) {