防重点击

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) {
if(this.canClick){
this.canClick = false
let dataObj = {} let dataObj = {}
let url = ""
let method = "POST"
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: url, url: "/userClient/customer/attendActive",
method: method, method: "POST",
data: dataObj data: dataObj
}).then((res) => { }).then((res) => {
this.getActive() this.getActive()
this.canClick = true
console.log(res); console.log(res);
}) })
}
}, },
/** /**
* 参加开卡有礼活动 * 参加开卡有礼活动