防重点击

This commit is contained in:
Vinjor 2024-09-27 20:48:40 +08:00
parent bd34071f8e
commit ba8549a0b8

View File

@ -42,6 +42,8 @@ export default {
}, },
data() { data() {
return { return {
//
canClick:true,
value:"", value:"",
index:0, index:0,
array:[], array:[],
@ -149,20 +151,21 @@ export default {
* @returns {Promise<void>} * @returns {Promise<void>}
*/ */
async joinAct(item) { async joinAct(item) {
let dataObj = {} if(this.canClick){
let url = "" this.canClick = false
let method = "POST" let dataObj = {}
dataObj.cusId = this.customInfo.id dataObj.cusId = this.customInfo.id
dataObj.activeId = item.id dataObj.activeId = item.id
url = "/userClient/customer/attendActive" await request({
await request({ url: "/userClient/customer/attendActive",
url: url, method: "POST",
method: method, data: dataObj
data: dataObj }).then((res) => {
}).then((res) => { this.getActive()
this.getActive() this.canClick = true
console.log(res); console.log(res);
}) })
}
}, },
/** /**
* 参加开卡有礼活动 * 参加开卡有礼活动