防重点击

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() {
return {
//
canClick:true,
value:"",
index:0,
array:[],
@ -149,20 +151,21 @@ export default {
* @returns {Promise<void>}
*/
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);
})
}
},
/**
* 参加开卡有礼活动