diff --git a/project/xiushan/apps/AppXsBanner/AppXsBanner.vue b/project/xiushan/apps/AppXsBanner/AppXsBanner.vue index bbd68197..b5fde196 100644 --- a/project/xiushan/apps/AppXsBanner/AppXsBanner.vue +++ b/project/xiushan/apps/AppXsBanner/AppXsBanner.vue @@ -39,7 +39,7 @@ - + @@ -61,8 +61,6 @@ - - @@ -80,8 +78,6 @@ {{ dialogInfo.showIndex }} - - @@ -214,19 +210,22 @@ export default { }, // 确定新增 addConfirm() { - // console.log('确定') - this.instance.post(`/appbanner/addOrUpdate`, { - imgUrl: this.dialogInfo.imgUrl?.[0]?.url, - linkUrl: this.dialogInfo.linkUrl, - status: this.status, - title: this.dialogInfo.title, - showIndex: this.dialogInfo.showIndex, - id: this.dialogInfo.id, - }).then(res => { - if (res?.code == 0) { - this.$message.success('提交成功') - this.visible = false - this.getList() + this.$refs.DialogForm.validate(v => { + if (v) { + this.instance.post(`/appbanner/addOrUpdate`, { + imgUrl: this.dialogInfo.imgUrl?.[0]?.url, + linkUrl: this.dialogInfo.linkUrl, + status: this.status, + title: this.dialogInfo.title, + showIndex: this.dialogInfo.showIndex, + id: this.dialogInfo.id, + }).then(res => { + if (res?.code == 0) { + this.$message.success('提交成功') + this.visible = false + this.getList() + } + }) } }) },