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); + }) + } }, /** * 参加开卡有礼活动