From aff38304638858f16394c5fbc2c394256f628b58 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 26 Jan 2022 16:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=BD=AE=E6=92=AD=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/wechat/AppCarousel/AppCarousel.vue | 47 ++++++++++----------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/packages/wechat/AppCarousel/AppCarousel.vue b/packages/wechat/AppCarousel/AppCarousel.vue index 74123791..e8d9ef6f 100644 --- a/packages/wechat/AppCarousel/AppCarousel.vue +++ b/packages/wechat/AppCarousel/AppCarousel.vue @@ -28,14 +28,15 @@ - -
+ + @@ -135,8 +136,8 @@ export default { formRules: { imgUrl: [{required: true, message: '请添加图片', trigger: 'blur'}], title: [{required: true, message: '请输入活动名称', trigger: 'blur'}], - type: [{required: true, message: '请选择链接类型', trigger: 'blur'}], - linkUrl: [{ required: true, message: '请输入链接', trigger: 'blur' }] + type: [{required: true, trigger: 'blur'}], + // linkUrl: [{ required: true, message: '请输入链接', trigger: 'blur' }] }, colConfigs: [ {prop: 'imgUrl', label: '首页封面', slot: 'imgUrl'}, @@ -221,27 +222,23 @@ export default { }, // 确定新增 addConfirm() { - this.$refs.ruleForm.validate((valid) => { - if (valid) { - this.instance.post(`/app/appbanner/addOrUpdate`, { - imgUrl: this.dialogInfo.imgUrl[0].url, - linkUrl: this.dialogInfo.linkUrl, - status: this.status, - title: this.dialogInfo.title, - type: this.dialogInfo.type, - id: this.dialogInfo.id, - }) - .then(res => { - if (res?.code == 0) { - this.$message.success(this.dialogInfo.id ? '编辑成功' : '新增成功') - this.visible = false - this.getList() - } - }) - } - }); // console.log('确定') - + this.instance + .post(`/app/appbanner/addOrUpdate`, { + imgUrl: this.dialogInfo.imgUrl[0].url, + linkUrl: this.dialogInfo.linkUrl, + status: this.status, + title: this.dialogInfo.title, + type: this.dialogInfo.type, + id: this.dialogInfo.id, + }) + .then(res => { + if (res?.code == 0) { + this.$message.success('新增成功') + this.visible = false + this.getList() + } + }) }, // 发布/取消发布 release(row) {