From ba8549a0b8f35fe79b3ed77d371a1eb38e296d57 Mon Sep 17 00:00:00 2001 From: Vinjor Date: Fri, 27 Sep 2024 20:48:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E9=87=8D=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/active.vue | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/pages/home/active.vue b/pages/home/active.vue index 9db6566..2ad2d2d 100644 --- a/pages/home/active.vue +++ b/pages/home/active.vue @@ -42,6 +42,8 @@ export default { }, data() { return { + //可以点击 + canClick:true, value:"", index:0, array:[], @@ -149,20 +151,21 @@ export default { * @returns {Promise} */ async joinAct(item) { - let dataObj = {} - let url = "" - let method = "POST" - dataObj.cusId = this.customInfo.id - dataObj.activeId = item.id - url = "/userClient/customer/attendActive" - await request({ - url: url, - method: method, - data: dataObj - }).then((res) => { - this.getActive() - console.log(res); - }) + if(this.canClick){ + this.canClick = false + let dataObj = {} + dataObj.cusId = this.customInfo.id + dataObj.activeId = item.id + await request({ + url: "/userClient/customer/attendActive", + method: "POST", + data: dataObj + }).then((res) => { + this.getActive() + this.canClick = true + console.log(res); + }) + } }, /** * 参加开卡有礼活动